prateek verma
prateek verma

Reputation: 45

How to define end of x and y axis in core plot for ipad application

I am working on graph for an iPad application, I am able to plot the graph perfectly but I cannot figure out how to end the y or x axis after the max and min value on either axes. Right now, I can only play around with the axis labels (remove, hide, change value) but straight line remains there.

Upvotes: 0

Views: 182

Answers (1)

Jesse Crocker
Jesse Crocker

Reputation: 873

Im assuming that you don't have data going past where you wan't your axis to stop. So the easiest way to is to decrease the size of your CPTGraphHostingView so your graphs go to the edge, or set the padding values for your graph:

CGFloat BoundsPadding = 10.0;
graph.paddingLeft = boundsPadding;
graph.paddingRight = boundsPadding;
graph.paddingTop = boundsPadding;
graph.paddingBottom = boundsPadding;

or set padding on your plotAreaFrame:

graph.plotAreaFrame.paddingLeft = 10;

Upvotes: 1

Related Questions