Jean
Jean

Reputation: 2625

Core Plot : Grid lines appear once per two plots

Am using Core Plot to plot some memory statistics for an iPhone App. Here is a sample plot

enter image description here

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

Answers (1)

Eric Skroch
Eric Skroch

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

Related Questions