0
votes

Am trying to draw a simple line plot using Core Plot. The plot labels seem to get sliced off near the ends.

enter image description here

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];
1

1 Answers

1
votes

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.