Ganesh Kumar Palani Ganesh Kumar Palani - 4 months ago 17x
iOS Question

How do i show Grid lines vertically in Core plot graph?

I have used Core Plot and i need to get the grid lines vertically,

  • List item

    I have tried custom labels in x axis

    x.labelingPolicy = CPTAxisLabelingPolicyNone;

But I didn't get the grid lines vertically.Can anyone help me with this?

enter image description here

//Add plot space

    CPTXYPlotSpace *plotSpace       = (CPTXYPlotSpace *)graph.defaultPlotSpace;

    plotSpace.delegate              = self;

    plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromInt(0.0) length:CPTDecimalFromInt(25)];

then change x axis label policy like this

x.labelingPolicy = CPTAxisLabelingPolicyFixedInterval;