Core Plot ios animate scatter plot from plain, straight line to plot with actual data - iphone

I've been using Core Plot for my iPhone application and have been displaying a scatter plot. I was wondering if upon appearance of the view, there is anyway to have the scatter plot start off as just a horizontal line with all y-values the same, and then have some sort of 0.5 second, for example, animation that slowly moves each data point up or down to its appropriate position?? Or, more generally, if the scatter plot can be animated in any way using core plot? Thank you all in advance.

There's nothing like that built in at the moment. Each plot is drawn in its own CALayer which can be animated like any other layer. For example, you can slide it into place or fade it into view.

Related

What is the best way in unity to draw 3D objects which are lines (axis, grids, wired surfaces)?

I want to make a 3d graph in unity and on that graph draw curves and surfaces etc. on surfaces I may have the grid texture applied on them, all of this is achievable. but there is one thing effect which I do not know how to achieve.
Many components in this app will be lines, Like the x-axis, y-axis, z-axis, & some grid on the surface, now I want these lines to have constant thickness, I may zoom into or zoom out of stuff but these lines should always be of constant thickness on the screen, a 1px line
should always be 1 pixel no matter I zoom close to it or I zoom away from it.
How can we do it? Is it an Image effect or a Shader or some other trick, I need to know what is the right approach for something like this.
If you need that for editor usage you can use UnityEditor.Handles but you would need Renderers (feg. LineRenderer) to draw it in build

SWIFT: Compass-like animation

I have configured Core Motion manager in order to access the rotation coordinates and use them to animate deviation, like in native compass application. So here is what I want to achieve:
It is this green line showing the deviation. I've tried simply to animate bezier's curve by setting it in
manager.startDeviceMotionUpdates(to: OperationQueue.current!, withHandler:)
method, but it didn't work - the animation was starting each time coordiantes was changing and filling the center with lines. I suppose that this animation should run on different thread, and motion manager should update only end point of bezier's curve. I have no idea how to do it. Any tips or examples would be appreciated!

Customizing a 3D Plotly Visualization with a slider bar

I've been exploring Plotly recently. I've made a contourslice of a 3D Value function using the Plotly MATLAB API's fig2plotly(). However, I've been researching how to further customize the plot, and I can't figure out how exactly I'd go about doing this.
My current plot is here:
https://plot.ly/~txizzle/81
It's basically different contours stacked on top of each other.
My goals:
I'd like to add a slider bar that will show just one contour slice at a time (maybe by changing visibility). Ideally, I could fix an eagle-eye view from the top, so moving the slider will make it appear as if the plot is 2D.
My thoughts on how to approach this:
1) https://plot.ly/javascript-graphing-library/range-slider/ seems to be an HTML/JS implementation of a custom slider bar that changes the x-axis range of a line chart. From what I've read, this approach seems to be Node.js only. Ideally, I'd like to implement something in just HTML/JS/JQuery/D3.js.
2) Alternatively, I could use a 2D contour plot instead of a 3D contourslice:
https://plot.ly/49/~txizzle/
However, now, I will need to have many of these contour plots. I'm not sure how I would switch between different contour plots with a slider.
My Questions:
1) How do I customize Plotly plots? Is this possible without relying on Node.js? I don't want to just embed the plots using Plotly's given auto-embedder, because it abstracts everything away.
2) Should I do a contourslice or many different contour plots?
3) How do I add a slider bar to switch the visibility of different contour slices, or how do I add a slider bar to switch different plots entirely?
Thank you for your time! Looking forward to explore Plotly more.
Since you used the MATLAB library to generate the plotly figure, you can add slider effects by embedding the plotly figure as an iframe in an offline HTML doc, then using Plotly's postmessage API.
Here's an example:
https://plot.ly/matlab/range-slider/
postMessage API:
https://github.com/plotly/postMessage-API

iPhone Core-plot: Chart Zoom In Zoom out, Y axis Bigger, Y axis Smaller

I am now using Core-plot for iPhone chart Development.
But it has some requirement i can not reach.
I am now using CorePlot 0.4, example code AAPLot to develop
Please have a look the following image, then you will know what is my problem
Thank you very much...
I really need help for this problem,
thank you
i want my result like this application
I see several questions here:
Y-axis scale: Try the CPTAxisLabelingPolicyAutomatic labeling policy on your y-axis. If that doesn't give you enough control, use a different labeling policy and use a plot space delegate to adjust the labeling parameters as the user zooms in and out.
Disappearing x-axis: Make it a "floating" axis. For example,
x.axisConstraints = [CPTConstraints constraintWithLowerOffset:0.0];
Maximum zoom level: Use the globalXRange and globalYRange plot space properties. If you need more control, you can use a plot space delegate.
Scroll bars: This isn't directly supported. You could use a plot space delegate to update the scroll bar position.

Core Plot: Data point labels shown, or when data points touched?

Is there a way using Core Plot to have periodic labels assigned to data plots? Such as 10-20 labels listed across my plot points.
Here is an example (mockup) of what I am hoping to do:
Is it possible to do this when the graph loads, or maybe when you swipe across the graph you see the data points showing their call out?
You'll have to draw the callout bubbles yourself, but it is possible to label data points. To make a callout, you could subclass CPTextLayer and have it draw the bubble around the text. Use this new class to make your labels.
You can implement a datasource method to inform Core Plot which data points should be labeled and provide your own labels if you wish (this is how you'd do the callouts). You can also respond to touch events (click events on the Mac) and show a label for the point that was touched. You have to touch each point individually--you won't get the delegate notification if you drag from one point to the next.
The examples included with Core Plot demonstrate how both techniques work.