adityamishra90 / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

gridline setup? #195

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What is the expected output? What do you see instead?

I want to add GridLines in a ScatterPlot. My code is:

    x.majorGridLineStyle = [CPLineStyle lineStyle];
    x.majorGridLineStyle.lineWidth = 0.1;

And i also add:

[graph setTopDownLayerOrder:[NSArray arrayWithObjects: [NSNumber 
numberWithInt:CPGraphLayerTypePlots],  [NSNumber 
numberWithInt:CPGraphLayerTypeMajorGridLines], 30.0f,30.0f, nil]];

But the GridLines doesn't appear (in the BarChart, this works fine)

What version of the product are you using? On what operating system?

The newest one.

Thank you very much vor help.. My intention is to add the gridlines just in the 
positive range, is this possible? (For x-axis and y-axis of course)

Original issue reported on code.google.com by Hummer10...@gmail.com on 19 Aug 2010 at 9:42

GoogleCodeExporter commented 8 years ago
The grid lines are associated with the axes--the type of plot doesn't matter. 
You also shouldn't need to set the layer order--plots are on top of the grid 
lines by default.

You can set the gridLinesRange property for your axes to limit the length of 
the grid lines. This is similar to the visibleRange property for the axis line 
itself.

Do the lines appear if you use a larger line width? A line only 0.1 pixels wide 
might be getting lost in the anti-aliasing.

Original comment by eskr...@mac.com on 20 Aug 2010 at 1:35

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 4 Sep 2010 at 12:02

GoogleCodeExporter commented 8 years ago
I 've been trying all kinds of stuff to put grid lines at the location of my 
custom labels , it is not working when i have labelPolicyNone, is there a work 
around for this??

Original comment by dam...@gmail.com on 15 Nov 2011 at 3:37

GoogleCodeExporter commented 8 years ago
The grid lines are drawn at the tick locations (major and minor). With 
CPTAxisLabelingPolicyNone, the tick locations are independent of the label 
locations and you have to provide them. If you don't want tick marks, set those 
line styles to nil.

Original comment by eskr...@mac.com on 15 Nov 2011 at 11:25