0

I currently have the wind chart shown below working with the mean, low and high values.

enter image description here

What i would like to add but i can figure out is:

I need a plot a right hand scale that would show the wind force. I would guess this would be set as a label for a specific value.

So in this case

label for force 1 should be in line with wind speed 1

label for force 2 should be in line with wind speed 4

label for force 3 should be in line with wind speed 7

label for force 4 should be in line with wind speed 11

label for force 5 should be in line with wind speed 17

is there anyway i can create a y axis that shows a specic label at specific value?

thus creating something like this: but where the numbers line up to the right values

enter image description here

Steve Taylor
  • 301
  • 3
  • 14

1 Answers1

0

Here is what worked for my application. I was making a particle count graph:

$MyData->addPoints(array(7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24),"ISO");
$MyData->setSerieOnAxis("ISO",1);
$MyData->setAxisName(1,"ISO Code");
$MyData->setAxisPosition(1,AXIS_POSITION_RIGHT);
$MyData->setSerieDrawable("ISO", FALSE); //dont plot results just show axis

then further down where you do your scale:

$AxisBoundaries = array(0=>array("Min"=>0,"Max"=>5),1=>array("Min"=>7,"Max"=>24));
$ScaleSettings  = array("Mode"=>SCALE_MODE_MANUAL,"ManualScale"=>$AxisBoundaries);
$myPicture->drawScale($ScaleSettings); 

So you set the scale for the left and right axis there. In my application my right side needed to go from 7 to 24 and my left side from 0 to 5. I didnt plot my right side graph, as I just wanted to show the scale.

You pretty much have to fiddle with your min and max to get them to line up where you want and you have to make sure the left axis is fixed. If its dynamic then it will be different each time depending on your data.

Michael Fever
  • 845
  • 2
  • 8
  • 26
  • Forgot to mention these points are in addition to my other data points. These points reflect only the right side axis. For my left side I have 5 different data sets. – Michael Fever Apr 14 '14 at 20:28