jQuery in Action, 3rd edition
The moose likes Other JSE/JEE APIs and the fly likes Drawing graphs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Drawing graphs" Watch "Drawing graphs" New topic

Drawing graphs

Christopher Arthur
Ranch Hand

Joined: Mar 09, 2004
Posts: 149

I'm wondering there is a nice open-source or public domain set of examples or classes showing how to make 2D graphs. I want to have a graph of a function in a window with some interactivity--the user should be able to move a marker from left to right across the graph, and then the program will display the value of the function at that point.


Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I've seen several mentioned in the sun forums, JFreeChart the most often.
Carl Wilburn

Joined: Jun 17, 2004
Posts: 9
Craig, thanks for the code sample. Probably could find others with a little searching, but yours is here. My son is just starting a CompSci degree and has just started a Java class and a Calculus class. Your code may be interesting to him.

Live, learn and do!
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
Here is link of JFreeChart.
Another interesting open-source about create 2D is JCharts.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Guys, JFreeChart crashes, when your web application was deployed in Unix-based servers... I experienced it four months ago, when I was leading a project based on JRun running on AIX of IBM...

So be aware of the compatibility issue, whenever you try to use the ready-made packages...

Co-author of SCMAD Exam Guide, Author of JMADPlus
I agree. Here's the link: http://aspose.com/file-tools
subject: Drawing graphs
jQuery in Action, 3rd edition