kaiserfarrell / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Lines for axes not shown #514

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Use the white theme:

[graph applyTheme:[CPTTheme themeNamed:kCPTPlainWhiteTheme]];

2.  Create a plot space with X and Y axis:

CPTXYPlotSpace *plotSpace = (CPTXYPlotSpace *)graph.defaultPlotSpace;
CPTXYAxisSet *xyAxisSet = (CPTXYAxisSet *)graph.axisSet;
CPTXYAxis *xAxis = xyAxisSet.xAxis;

3. Define the line style and assign it to the x axis:

CPTMutableLineStyle *axisLineStyle = [xAxis.axisLineStyle mutableCopy];
axisLineStyle.lineWidth = 0.5;
axisLineStyle.lineCap   = kCGLineCapRound;
axisLineStyle.lineColor = [CPTColor darkGrayColor];
xAxis.axisLineStyle = axisLineStyle;    

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

A horizontal line for the x-axis (= the axis itself) should be shown.

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

The latest release (pulled from the repository).

Original issue reported on code.google.com by Alexande...@gmail.com on 27 Feb 2013 at 7:48

Attachments:

GoogleCodeExporter commented 8 years ago
Can you reproduce this behavior in one of the example apps? I pasted your code 
into one of the samples in the Plot Gallery and it worked as expected.

Make sure you're not inadvertently resetting the line style elsewhere in the 
app.

Original comment by eskr...@mac.com on 2 Mar 2013 at 2:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It seems that the problem of missing axis lines only occurs when 
graph.plotAreaFrame.borderLineStyle is set to nil. 

However, I want to plot only the axis lines, but no border lines around the 
plot area. 
This seems to impossible when border lines are set to nil.

Please refer to the full source code and screen shot attached.

Thank you!

Original comment by Alexande...@gmail.com on 2 Mar 2013 at 11:02

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 9 Mar 2013 at 1:30

GoogleCodeExporter commented 8 years ago
Upon closer inspection, I determined that Core Plot is working as designed. In 
the sample code provided, the axes were being drawn, but they were clipped by 
the edges of the plot area frame. Adding padding to the plot area frame fixed 
the problem.

    graph.plotAreaFrame.paddingLeft = 15;
    graph.plotAreaFrame.paddingBottom = 15;

Original comment by eskr...@mac.com on 18 Mar 2013 at 12:01