What is JGNUplot? |
JGNUplot is a graphical user interface for gnuplot. So why would somebody want to have a user interface for something which is so great because it has none? Gnuplot is a fairly mighty plotting software. But when one has to deal with a large number of datasets, the typing of the plot commands over the keyboard can become fairly tedious. Sometimes the fields in the datasets have to be combined using more complex formula. In such cases you end up with very complicated plot commands. Sometimes one may want to quickly add or delete a certain dataset from the plot. Or maybe pick a different color or linestyle. JGNUplot is a JAVA written interface which uses gnuplot as plotting engine. JGNUplot allows to define a pre-plot command. This can either be any system function like sort, grep, awt, sed or a program provided by the user. This allows to pre-process the datafiles before thy are plotted. For example one might want to sort them or to delete blank lines. Currently the only supported operating system is Linux. JGNUplot is distributed under the GPL license. |
Download |
JGNUplot can be downloaded from sourceforge. |
Documentation |
PrerequisitesYou need to have gnuplot installed. See http://www.gnuplot.info/. It is recommended to install version 4.1 to get all features. The executeable must be in your path to allow JGNUplot to find it. JGP was compiled for JAVA 5.0. You will need a proper runtime or jdk. See http://java.sun.com/. JGP does make use of JGP features, don't try to compile it with an older JAVA version. InstallationUnzip the zip archive into a directory of you choice.
Make the file jgp executeable # chmod +x jgp and execute it. Do not background the process. JGP was found to crash if backgrounded. You may also start JGP with # java -cp ./classes jgp.gui.JGP CompilingThe source is provided along the JAVA binaries. To compile JGP
make the file makeJGNUplot executeable # chmod +x makeJGNUplot and execute it or run # javac -d classes ./src/jgp/*.java ./src/jgp/gui/*.java QuickstartPlotting a function
Start JGNUplot using the script # ./jgp (no, please don't background the process).
Click on Add. Select function, replace 1:2 in the function field by a function like sin(x). Enter a title and click Ok. Click on Plot, a sine should appear on your screen. If not, check that gnuplot is installed and that it is in your path. Plotting a datafileCreate a ASCII data file, use a text editor, create two colums of data separated by ","'s.
Click on Add. Make sure that file is selected, enter the path to the file or use the file browser to search for it (button next to the file textfield). Enter a the datastring 1:2 into the datastring textfield (should actually be there already. Enter a title and click Ok. Click on Plot, and the datafile should appear on your screen. Next steps...
Click on the preview plotsting button. It lets you examine the plotstring which
is passed to gnuplot. It might be a good idea to try to became familiar with
the commands in the plot string, i.e. read the gnuplot manual or start gnuplot and use the
help command. |
Features |
Preprocessing your datafiles
JGNUplot can run an arbitrary program on your datafile before plotting it: sort $if > $of or a grep to remove empty lines cat $if | grep -v "^$" $if > $of where JGNUplot will replace the variable $if with your data filename defined above and $of with the name of a temporary file. Of course you can enter any sophisticated awk command here or just preprocess the data though are program you wrote yourself. GNUplot and String variables
Normal gnuplot variables can be defined, but also string replace variables: set variable_name = value The second type is a STRING variable. If you assign the name variable_name to a string variable, JGNUplot will first generate a plotstring and the search for the occurrence of any "$variable_name" substring in the plotstring. You may therefore use $variable_name at ANY other place like for additional style definitions etc. Additional plot commands
By no means JGNUplot tried to provide GUI access to all gnuplot features, but
you can define additional plot commands. This allows access to most gnuplot commands: set key X,Y in the Add(itional) plot commands field, where X,Y are the desired coordinates for the legend. |
Screenshots |
Screenshots can be found on sourceforge. |
Contact |
Please use the forum or the tracker on sourceforge for contact. |