First of all i would like to thanks the all team of Jfreechart which has made a wonderful job. I unfortunatly just dicovered this library one week ago...
I just wanted to know how to plot a non linear XYplot.
for example i would like to plot a square with those coordonates:
(-1,-1) (1,-1)(1,1)(-1,1)! see what i mean???
unfortunatly Jfreechart doesn t seem to do that! maybe i didn t look on the right place, but i don t think so.
So my question was: Is it possible? and if not which part of the library should i develop to make it possible?
thanks in advance, and another time for your really GREAT job.
long life to JfreeChart
Help requested
Solid geometry
Hi,
you need to write a (XY) renderer to superimpose solid geometry over charts.
For some fixed shape that is an easy one.
Have a look at e.g. LineAndShapeRenderer and hack upon the draw(...) method.
If you want to draw the shape according to some dataset it could be difficult writing a custom dataset that adheres to XYDatasets contract.
cu,
Christian
you need to write a (XY) renderer to superimpose solid geometry over charts.
For some fixed shape that is an easy one.
Have a look at e.g. LineAndShapeRenderer and hack upon the draw(...) method.
If you want to draw the shape according to some dataset it could be difficult writing a custom dataset that adheres to XYDatasets contract.
cu,
Christian
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
That is the approach I would use, but note that the XYSeries class sorts items by x-values, so you'll need to modify that or write your own XYDataset implementation.jdemumbr wrote:doesn't the normal xy plot do a "connect-the-dots" rendering? try adding the points with the first one at the end also so it reads (-1,-1) (1,-1) (1,1) (-1,1) (-1,-1) so it draws that last side.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Polygons
Hi,
Davids idea is neat. The x-value sorting is the thing that stops one from doing arbitrary shapes -- so just replace the dataset and keep the renderer.
User raghu has a more detailed shape example in the thread "Ploygons on XYplot..REPLY ASAP".
cu,
Christian
Davids idea is neat. The x-value sorting is the thing that stops one from doing arbitrary shapes -- so just replace the dataset and keep the renderer.
User raghu has a more detailed shape example in the thread "Ploygons on XYplot..REPLY ASAP".
cu,
Christian
Re: Polygons
zany wrote:Hi,
Davids idea is neat. The x-value sorting is the thing that stops one from doing arbitrary shapes -- so just replace the dataset and keep the renderer.
User raghu has a more detailed shape example in the thread "Ploygons on XYplot..REPLY ASAP".
cu,
Christian
thanks for your support it s great, but could you plz tell me where i can find that fuc**** x-value sorting thing if you know that.
cu and plot good graphs
I ve found 2 java class made by V. Molokoov to plot polygones. If you want i can ask him if i can give it away. I tried it and it s very uselful i could really easyly plot a square!!!
If your interested, plz send me a mail : thomas_rien@hotmail.com
If your interested, plz send me a mail : thomas_rien@hotmail.com