views:

2239

answers:

3

Has anyone worked with JFreeChart-open source library for plotting xy plots?

Could someone post an example of how to create an xy plot dynamically with the x and y values generated from the program?

And where can i get a turorial doc or something of that kind to know about how to use the JFreeChart for developing applications?

Thanks in advance..

+1  A: 

I hope, the following links will help you,

Jfree chart sample

Swing Sightings Volume 7

adatapost
+3  A: 

Have you tried looking at the JFreeChart demos? See here.

If you find a sample that suits what you want to do, searching for the name of the demo in Google often pulls up the demo source code from (for example) Koders: PieChartDemo1.java

butterchicken
Just ensure that any updates to the data model are done on the event dispatch thread as JFreechart is not thread safe.
pjp
Another useful website with JFreeChart examples (available for free): http://www.java2s.com/Code/Java/Chart/JFreeChartDynamicDataDemo.htm
pako
+1  A: 

This is a sizeable set of JFreeChart examples, including source code for each example. There's a set of XY-chart examples. I did pay for the manuals some time ago, but in fact the examples above are sufficient to get you where you want to be.

Note that JFreeChart claims not to be suitable for fast dynamic updating, although in practice I've never found any problems with this.

Brian Agnew