Core Plot :Move only Data - iphone

I have created a scatter graph with three plot spaces. One for two y-axis each and one for the x-axis. I am able to show data for both y-axis. However now i want to move only the data,i.e. two line and not the two y-axis.Only the data and x-axis should move.
I have tried allowUserinteraction property. However is I enable it for x-axis, x axis moves without the data. If i enable it for both/either of axis, y axis also moves with data and scale of y-axis is not visible all the time. Can someone help pleas.e This is my first work with core plot.
I will add code if required.
Thanks

Since each plot space has both x and y ranges, I would just use two plot spaces for this situation. Use the same xRange for both plot spaces and assign the x-axis to one of them.
The easiest way to make them scroll only in the X direction is to set the globalYRange to the same range as the yRange for both plot spaces. Set allowsUserInteraction to YES for both plot spaces. If you need to change the yRange later, set the globalYRange to nil before you change the yRange and reset it afterwards. If you ever update the X range manually, be sure to always set it on both plot spaces.

Related

Can set axis with decimal power of 10? [duplicate]

I have plotted to vectors against each other, and they are already logarithmic and everything is fine with that. But now that I have my plot i want the grid to be logarithmic. I write "grid on" in my code, and I think there should be a way to do this in the plot, but I can't remember how. How do I make the grid logarithmic?
If you use loglog, semilogx or semilogy instead of plot, the grid will automatically be on a log scale for the corresponding axes when using grid on.
If you have already plotted the axes, you can execute the following on the command line:
set(gca,'yscale','log') %# to set the y-axis to logarithmic
set(gca,'xscale','log') %# to set the x-axis to logarithmic
Have a look at axes properties to find out what else you can modify.

How do you accurately set the offset of an axisLabel in CorePlot?

Problem Statement:
A bar plot in created with CorePlot has a Y-axis that features a dynamic range. The minimum value of this range is presumed to be <= 0. The maximum value of the range is presumed to be > 0.
The bar plot features custom X-axis labels which have an offset to distance themselves from the 0 line of the Y-axis. (label.offset)
However, because the exact location of the 0 line may change during runtime, a static value to offset the X-axis labels is not sufficient.
Question:
What is the appropriate way to accurately set the offset of Axis labels, when axis parameters change at runtime?
Screenshot attached to show problem. Labels should be below the ($200,000) line, but because the top end value is dynamic, they move up and down.
http://i.imgur.com/jdwy1c2.png
From the linked picture, it doesn't look like you're drawing the axis line. Use axis constraints to hold the x-axis at the bottom of the plot area. If you do want to draw an axis line, e.g., at y = 0, add a second x-axis. Use one to draw the axis line and the other to position the labels. Set all of the line style properties of the second axis to nil so it doesn't draw any lines and use constraints to hold it at the bottom of the plot area.

How do you edit the x-axis, but not change the scale of the graph/2D image on Matlab?

I have a time spatial 2D graph, and currently the axis is 1-101. However I need to change these values so it -0.0005 to 0.0005; however when I change put these values in the X limits, the graph just goes to -0.0005-0.0005 and cuts out all the data.
I would just like to change the x-axis data values independent of the graph. If this makes sense?
You should change the ticklabels of the axis (that is, the strings that are shown for the ticks), not the axis values.
Alternatively, you can re-scale the image (for example, specifying x and y vectors in the imagesc() command.
edit: see here for an example: http://www.mathworks.nl/help/matlab/creating_plots/setting-axis-parameters.html#f6-27790
search in the page for: "You can adjust the axis tick-mark locations and the labels appearing at each tick mark."
You would need to change the XTickLabels of the current axis. You can do this by modifying the XTickLabel as seen in the example below:
plot(1:5)
set(gca,'Xtick',1:5,'XTickLabel',{'7', '8', '9', '10', '11'})

Is there any way to change the xy positions in scatter graph in core plot

I am creating scatter graph, I need to change the x and y positions in scatter graph. Graph always starts with (0,0) positions but i need to show the starting points (7000, 800). Is there any way to change the x and y positions in scatter graph in core plot.
After showing the graph need to draw the line manually and get those values to search the properties.
Please help me.
Thanks in advance.
to set the point where the co-ordinates meet you have to set the orthogonal co-ordinate decimal
x.orthogonalCoordinateDecimal = CPTDecimalFromString(#"800");
y.orthogonalCoordinateDecimal = CPTDecimalFromString(#"740000");
and for setting the range of values to be plotted set the visibleRange for both the axes
These are features of the "plot space" in Core Plot. It defines the coordinate mapping between the plot area (basically the rectangle that contains all plot drawing) in data coordinates and the view in drawing coordinates. The xRange and yRange control the x and y range of the plot space, respectively.
The plot space converts coordinates in both directions—from data to view when drawing and from view to data when (for example) responding to touch events on a plot. See the plot space docs for a list of the available coordinate conversion methods.

Core Plot Y axis expandRangeByFactor depends on data?

i have this problem with gap between Y axis changed when different data is being enter.
First: the third data point is close with other points
Second: the third data point is slightly further
Third: the third data point is even further from the other points
Somehow i change expandRangeByFactor then different kind of gap will appear between each Y axis line.
I wonder how can i have the Y axis gap being fix(not affected by the data that i've put in)?
Thanks
Don't change the yRange of the plot space. Be aware that methods like -scaleToFitPlots: and user interaction (scrolling, zooming) can change the ranges, too.