Reputation: 2625
Am using Core Plot to plot some memory statistics for an iPhone App. Here is a sample plot
Why is the grid line appearing only for every alternating plot? I want it to appear for every plot. How do I do it? Here's the code where I configure the grid line.
CPTMutableLineStyle *majorGridLineStyle = [CPTMutableLineStyle lineStyle];
majorGridLineStyle.lineWidth = 0.5f;
majorGridLineStyle.lineColor = [CPTColor lightGrayColor]; //[[CPTColor lightGrayColor] colorWithAlphaComponent:0.6f];
axisSet.xAxis.majorGridLineStyle = majorGridLineStyle;
axisSet.yAxis.majorGridLineStyle = majorGridLineStyle;
Please help.
Upvotes: 2
Views: 1388
Reputation: 27381
The majorGridLineStyle
is for the grid lines at the major tick locations, i.e., the ones with the labels in your sample image. Set the minorGridLineStyle
to draw lines at the minor tick locations between the major ticks. The two line styles can be different, for example to emphasize the major grid lines.
Upvotes: 4