Reputation: 2625
Am trying to draw a simple line plot using Core Plot. The plot labels seem to get sliced off near the ends.
Am setting the padding this way :
self.graph.plotAreaFrame.paddingBottom = 25.0;
self.graph.plotAreaFrame.paddingTop = 25.0;
self.graph.plotAreaFrame.paddingLeft = 25.0;
self.graph.plotAreaFrame.paddingRight = 25.0;
And setting the axes to nil
[self.graph addPlot:plot];
self.graph.axisSet = nil;
self.graphHostView.allowPinchScaling = YES;
self.graphHostView.hostedGraph = self.graph;
[self.view addSubview:self.graphHostView];
Upvotes: 0
Views: 717
Reputation: 27381
Expand the xRange
and/or yRange
of the plot space a bit so the plot points don't fall right on the edge of the plot area. Look at the "Control Chart" demo in the Plot Gallery example app for sample code.
Upvotes: 1