JFreeChart
JFreeChart
can be used to create a wide variety of charts.
Have a look at the site's
samples.
My Examples
Click on a chart image to load a bigger version:
- LineChartEx.java: uses
data stored in categories;
- XYLineChartEx.java:
uses (x,y) data; modified colors and grid lines
- XYLogAxisEx.java: (x,y) data
displayed using a log-scaled y-axis
- XYPlotEx.java:
the data is read from men.txt and
women.txt; the chart is saved as a
PNG file
- PlotFunctionEx.java: the (x,y)
data is generated from a PolynomialFunction2D
object; clicking on the panel or data points prints
coordinates
- TimeSeriesChartExample.java: two lines of time data are displayed;
- DynamicTimeSeries.java: time
data is generated at runtime using a Timer object
- DualAxisDemo.java: the two lines
use different y-axes; the data
points are visible
- ScatterPlotExample.java: (x,y) data shown as points; the axes are drawn; the data points are changed
to red crosses
- BarChartEx1.java:
data stored in categories;
- BarChartEx2.java:
horizontal bars; solid color bars; x-axis moved;
data built using DatasetUtils
- StackedBarChartExample.java:
data stacked in bars; bar color, margin, and spacing changes; simplified
legend
- OverlaidBarChartDemo.java: a bar chart with a line chart on top; both use the same x-axis categories;
rendering changes made to both charts
- StatisticalBarChartDemo.java:
data includes means and standard deviations; margin changes
- HistogramEx.java: data is organized
into bins and counted
- PieChartExample.java: labels reformatted; simplified pie coloring
- AreaChartDemo.java:
transparent areas; grid lines; margin changes;
simplified tick units; data built using DatasetUtils
- StackedAreaChartDemo.java:
same as Area Chart example, but data is now stacked
- BubbleChartExample.java: (x,y,z) data drawn as bubbles -- the z- value becomes the
bubble size; x- any y- axis ranges are adjusted
- PolarChartExample.java: three
lines of (angle, radius) polar data; rotated radius axis labels
Other Links
Dr. Andrew Davison
E-mail: ad@coe.psu.ac.th
Back to the third-party libraries page