|
setLineWidth() |
Posted by Brian on Jul-11-2014 19:03 |
|
# Add a line layer for coverage
$c->yAxis2()->setTitle("Percentage Coverage");
$c->yAxis2()->setColors( 0x000000, 0x000000, 0x000000 );
$c->addLineLayer( [@coverage], 0x000000, "Coverage", )
->setLineWidth(5)->setUseYAxis2();
Can anyone tell me why i can't get the line to be wider.. i always get an error which is...
Can't locate object method "setUseYAxis2" via package "LineLayer.setLineWidth" (perhaps you forgot to load "LineLayer.setLineWidth"?) at /home/bfogarty/ADSIMworkspace/ADSIMchanges/adsim_regr_plot3.pl line 230, <IN> line 19. |
Re: setLineWidth() |
Posted by Peter Kwan on Jul-11-2014 23:26 |
|
Hi Brian,
The setUseYAxis2 is a method of the LineLayer object. The LineLayer object is the returned
value of addLineLayer, not the returned value of setLineWidth. So you cannot call
setUseYAxis2 using the returned value of setLineWidth.
The correct code is:
my $lineLayerObject = $c->addLineLayer( [@coverage], 0x000000, "Coverage");
$lineLayerObject->setLineWidth(5);
$lineLayerObject->setUseYAxis2();
Hope this can help.
Regards
Peter Kwan |
|