pChart 2.x forum
http://wiki.pchart.net/forum/

Cartesian coordinate system
http://wiki.pchart.net/forum/viewtopic.php?f=3&t=2130
Page 1 of 1

Author:  chartbreaker [ Tue Aug 09, 2011 2:00 pm ]
Post subject:  Cartesian coordinate system

is it possible to realize mathematical "curve sketching"?
it should be possible to combine 4 single charts yet, but that means a lot of preprocessing for the data-series
it would be nice to draw some mathematical functions

Image
Image Image

Author:  jean-damien [ Wed Aug 10, 2011 12:28 pm ]
Post subject:  Re: Cartesian coordinate system

Good idea indeed ;o)

Just added the createFunctionSerie() function to the pData classe that accepts a formula as input and populate the associated dataset with the values.

Code:
$MyData = new pData(); 
$MyData->createFunctionSerie("Serie 1","log(z)",array("AutoDescription"=>TRUE,"MinX"=>-10,"MaxX"=>10,"XStep"=>1,"RecordAbscissa"=>TRUE,"AbscissaSerie"=>"Labels"));
$MyData->createFunctionSerie("Serie 2","z*z*z",array("AutoDescription"=>TRUE,"MinX"=>-10,"MaxX"=>10,"XStep"=>1));
$MyData->createFunctionSerie("Serie 3","(z*15)*z",array("AutoDescription"=>TRUE,"MinX"=>-10,"MaxX"=>10,"XStep"=>1));
$MyData->setAxisName(0,"functions");
$MyData->setAbscissa("Labels");


JD.

Attachments:
example_createFunctionSerieCAZPLGD3.png
example_createFunctionSerieCAZPLGD3.png [ 31.87 KiB | Viewed 7655 times ]
example_createFunctionSerieCA98QAHY.png
example_createFunctionSerieCA98QAHY.png [ 26.91 KiB | Viewed 7658 times ]

Author:  chartbreaker [ Wed Aug 10, 2011 8:38 pm ]
Post subject:  Re: Cartesian coordinate system

it is amazing how fast you're evolving and enhancing pChart
it is really a living and constantly becoming a more powerful tool as it already is
thanks for that
great job

Author:  jean-damien [ Thu Aug 11, 2011 7:09 am ]
Post subject:  Re: Cartesian coordinate system

Thanks for your encouragements ;o)

This is a project I like. Without the community and the ideas popping up on this forum it wouldn't be evolving so fast.

I'll do the same now for 2 dimensional functions using the scatter extension.

JD.

Attachments:
example.createFunctionSerie.scatter.png
example.createFunctionSerie.scatter.png [ 33.73 KiB | Viewed 7639 times ]
example_createFunctionSerie_scatterCANOC7S0.png
example_createFunctionSerie_scatterCANOC7S0.png [ 29.39 KiB | Viewed 7642 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/