Shaw003 / core-plot

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

y-axis title not showing, even if single character. #190

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
code:
CPXYAxis *y = axisSet.yAxis;
    y.majorIntervalLength = CPDecimalFromFloat((maxy1-miny1)/3.0);
    y.minorTicksPerInterval = 2;
    y.orthogonalCoordinateDecimal = CPDecimalFromFloat((xHigh-xLow)*0.1f);
    NSNumberFormatter* lf=[[[NSNumberFormatter alloc] init] autorelease];
    [lf setNumberStyle:kCFNumberFormatterDecimalStyle];
    [lf setAllowsFloats:YES];
    y.labelFormatter=lf;
    CPTextStyle *tsy = [[[CPTextStyle alloc] init] autorelease];
    tsy.color = [CPColor whiteColor];
    tsy.fontSize = 9.0;
    y.labelingPolicy=CPAxisLabelingPolicyAutomatic;

    y.labelTextStyle=tsy;
    y.title=@"m";

What is the expected output? What do you see instead?
i see the axis labels, but not the title.

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

Please provide any additional information below.

Original issue reported on code.google.com by morp...@gmail.com on 1 Aug 2010 at 8:42

GoogleCodeExporter commented 8 years ago
You probably need to increase the padding (graph.plotAreaFrame.paddingLeft) to 
make room for it. Core Plot doesn't do this automatically. You could also 
adjust the titleOffset to move it closer to the axis line.

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

GoogleCodeExporter commented 8 years ago
perfect! now i am looking for a way to move the title vertically, so it doesnt 
overwrite the X axis labels.

tnx

Original comment by morp...@gmail.com on 1 Aug 2010 at 2:39

GoogleCodeExporter commented 8 years ago
You can use the titleLocation property to move the title.

Original comment by eskr...@mac.com on 1 Aug 2010 at 8:10