Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plot Graphs in Java

The Java Swing GUI that I'm developing needs to plot a 2D graph based on the x and y coordinates generated in the program.

Is there a Swing component for that?

Or is there any other open source package for the purpose?

like image 822
tamizhan Avatar asked Aug 14 '09 10:08

tamizhan


4 Answers

You should check out JFreeChart which has Swing support. Here are some samples:

http://www.jfree.org/jfreechart/samples.html

like image 139
Olly Avatar answered Nov 13 '22 15:11

Olly


You should look at JFreeChart.

like image 43
Mark Avatar answered Nov 13 '22 16:11

Mark


check out the feature comparison for Java report and charting libraries; http://java-source.net/open-source/charting-and-reporting

like image 11
n002213f Avatar answered Nov 13 '22 16:11

n002213f


Here is a related answer of me: I have summary of existing tools and show a alternative option to create interactive charts with Gnuplot in a JPanel

Java 3D plot library?

For your case (2d charts) JFreeChart is OK. But sometimes JFreeChart is overkill for simple charts.

like image 1
timaschew Avatar answered Nov 13 '22 17:11

timaschew