|
Hiding symbols in dataset |
Posted by Chris on Mar-03-2011 12:14 |
|
I'm trying to create a chart like the attached using PHP.
It's no problem generating the basic whisker/symbol plot, but can you suggest a way to offset the whisker data so that scheme1, scheme1 in the attached are displayed with just their single points.
This works to get the basic plot, but I haven't found a way to position these to leave space for the scheme scatter data.
$c->addScatterLayer(null,$Q2Data,'average',DiamondSymbol,10,0xffccff);
$c->addScatterLayer(null,$Q4Data,'median1',DiamondSymbol,10,0x00ffcc);
$c->addScatterLayer(null,$Q0Data,'median2',DiamondSymbol,10,0x000000);
$boxWhiskerLayerObj = $c->addBoxWhiskerLayer(null,null, $Q4Data, $Q0Data, null, Transparent, 0xff00ff);
$boxWhiskerLayerObj->setLineWidth(2);
$boxWhiskerLayerObj->setDataGap(1.0); # so no whisker lines drawn
|
Re: Hiding symbols in dataset |
Posted by Peter Kwan on Mar-03-2011 13:18 |
|
Hi Chris,
I am not too sure if I understand your enquiry. You mentioned "can you suggest a way to offset the whisker data so that scheme1, scheme1 in the attached are displayed with just their single points". I cannot find any "scheme1" in your chart. Do you mean "scheme A" and "scheme B", and that you would like to plot a single scatter point for at these two x-positions? To achieve this, the code is:
$c->addScatterLayer(array(0), array($valueForSchemeA), DiamondSymbol, 10, 0xff00ff);
$c->addScatterLayer(array(1), array($valueForSchemeB), DiamondSymbol, 10, 0x00cc00);
Hope this can help.
Regards
Peter Kwan |
|