The current code i use is:
JavaPlot plotter = new JavaPlot();
plotter.setTitle("Title");
plotter.addPlot(data1);
plotter.addPlot(data1);
plotter.plot();
But I want to be able to set the labels in de legend (now they are: Datafile 1, Datafile2) and also the name of the axis.
I've looked into the documentation of JavaPlot but I haven't found something.
Maybe something with GNUPlotParameters
Thanks!
You can set gnuplot parameters with the JavaPlot.set(String, String) method. In your example:
Notice that you have to use "'x'" and not just "x".
For the plot title you can use the AbstractPlot.setTitle(String) method.
If you create your plot like this
then you can set the title by casting data1 to AbstractPlot
or declare data1 as AbstractPlot right away