Though I've done the usual "web search" and found jFreeChart, jCharts,
and PlotPackage, I thought I'd post here in case I've missed any
options for a simple, free two axis XY plotting package/class.
jFreeChart is overkill ... the other two look like possibilities.
Of course, I can just use AWT's Graphics or Graphics3d class, but am
hoping to find a slighter higher-level implementation.
Thanks for your ideas!
--
Prof Kenneth H Jacker khj@cs.appstate.edu
Computer Science Dept www.cs.appstate.edu/~khj
Appalachian State Univ
Boone, NC 28608 USA
|
|
0
|
|
|
|
Reply
|
Kenneth
|
3/28/2005 2:51:22 PM |
|
Kenneth Jacker wrote:
> Though I've done the usual "web search" and found jFreeChart, jCharts,
> and PlotPackage, I thought I'd post here in case I've missed any
> options for a simple, free two axis XY plotting package/class.
>
> jFreeChart is overkill ...
JFreeChart is a big library, but we work hard to make it use sensible
defaults so that you don't have to write a lot of code to get great
looking charts. For example, here is a scatter plot demo written using
the JFreeChart API:
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.ui.ApplicationFrame;
import org.jfree.ui.RefineryUtilities;
public class ScatterPlotDemo extends ApplicationFrame {
public ScatterPlotDemo(String title) {
super(title);
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries series1 = new XYSeries("Series 1");
series1.add(1.0, 4.5);
series1.add(4.4, 3.2);
dataset.addSeries(series1);
XYSeries series2 = new XYSeries("Series 2");
series2.add(3.2, 8.5);
series2.add(4.9, 3.7);
dataset.addSeries(series2);
JFreeChart chart = ChartFactory.createScatterPlot(
"Scatter Plot Demo", // title
"X", "Y", // axis labels
dataset, // dataset
PlotOrientation.VERTICAL,
true, // legend? yes
true, // tooltips? yes
false // URLs? no
);
ChartPanel chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
}
public static void main(String[] args) {
ScatterPlotDemo demo = new ScatterPlotDemo("Scatter Plot Demo");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
}
}
I hope you'll give JFreeChart a try!
Regards,
Dave Gilbert
JFreeChart Project Leader
|
|
0
|
|
|
|
Reply
|
David
|
3/28/2005 9:45:43 PM
|
|
Kenneth Jacker wrote:
> Of course, I can just use AWT's Graphics or Graphics3d class, but am
> hoping to find a slighter higher-level implementation.
Pipe the data into good olf gnuplot if you can live with an non all-Java
solution and a separate application.
/Thomas
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
|
|
0
|
|
|
|
Reply
|
Thomas
|
3/29/2005 7:11:39 AM
|
|
|
2 Replies
343 Views
(page loaded in 0.36 seconds)
Similiar Articles: Simple XY Plot - comp.lang.java.guiThough I've done the usual "web search" and found jFreeChart, jCharts, and PlotPackage, I thought I'd post here in case I've missed any options for a simple, free two ... Plotting XY-data over time - comp.graphics.apps.gnuplotHi all! Im posting here, since reading the gnuPlot docs did not really make clear to me, if it can do what i am trying to achieve. I have sets of simple XY-data ... Store data by clicking on data point in plot - comp.soft-sys ...Plotting XY-data over time - comp.graphics.apps.gnuplot I have sets of simple XY-data, which i need to plot over time. ... vertical one, i'd have all my data-points as XZ ... ifdef not working (GNU make) - comp.unix.programmeri have the code : all: ifdef MYDIR echo "defined" endif MYDIR holds a directory path n is exported .. i get the ouptut :- if... Logarithmic axes in imagesc and contour - comp.soft-sys.matlab ...Hello, I want to plot the results of a spectrogram in a ... Is there any easy way to awoid this warning? In fact ... I'm generating a single contour from underlying XY data. plot and curve fit - comp.soft-sys.matlabI am interested in modelling a simple peak and fit to the following formula; c*x^... ... > > I then it will be used when I plot a 2 compartment fit to another dataset (same t ... Plot problem in fourier series exercise - comp.soft-sys.matlab ...I would like to find the sum of the fourier coefficients, the first ten at first, using a for loop and then plot them against t (duration).And then I must also plot the ... fixed label position? - comp.graphics.apps.gnuplotOffset XY Plot - comp.soft-sys.matlab I know why it doesn't but I cant come up with a ... The color labels make it really easy to confirm resistor ... to the 100 file ... Fill a single contour - comp.soft-sys.matlabI'm overlaying this on a pcolor plot, so I can't paint the outside ... chuck3...@yahooremovethis.com> wrote: > What I wanted is quite simple to explain. =A0Say I have XY ... plotting a 3D data in plane by color - comp.soft-sys.matlab ...Plotting XY-data over time - comp.graphics.apps.gnuplot I don't know what your really want to do, but a 3D plot is very simple with splot 'data.dat' u a:b ... one in 3D ... simple xy plot using MFC: xy, mfc, plot, usingsimple xy plot code using MFC? ... This question has been solved and asker verified All Experts Exchange premium technology solutions are available to ... Simple XY Plot - comp.lang.java.gui | Computer GroupThough I've done the usual "web search" and found jFreeChart, jCharts, and PlotPackage, I thought I'd post here in case I've missed any options for a simple, free two ... 7/25/2012 11:30:42 PM
|