| ★ wanayoo — archive 1999 http://feff.phys.washington.edu/~ravel/gnuplot/gui.html | Nouvelle recherche | Portail wanayoo |
Version 0.5 of gnuplot mode contains a new graphical interface to setting command arguments in your gnuplot script. This will only work with Emacs 20 or XEmacs 20 or with version 19 of either editor if you have installed the widget package separately. You can access this new system by placing the screen cursor over a command and hit C-c C-c or placing the mouse over a command and hit shift-mouse-2.
The motivation for writing this was that I have trouble remembering option and command arguments and the order in which they must appear. For example, I regularly use the postscript terminal driver, but have trouble remembering all of its arguments. Another personal bugaboo is remembering that, in a plot command, the thru argument comes before the title and the title comes before the with <linetype> argument.
When executing one of those key-sequences, a small frame will appear near the center of the window. The buffer displayed in this frame will contain widgets for setting all possible arguments to the selected command. Green buttons are sensitive to the middle mouse button and pop-up selection menus. Grey areas are text boxes for filling in numeric or string arguments. On the first line of this buffer is a black button which, when pressed, will open up a frame displaying the info page for the selected command.
There are widget types for every kind of argument that gnuplot uses. In addition to the list, numeric, and string widget, there are widgets for entering file names, tic labels, and data ranges. This widget set is a quirky and behaves slightly differently from typical X Windows widget sets. But once you get the hang of it, the GUI is pretty handy.
The last line of this buffer contains four buttons. The button labeled "Set Options" will write the selected arguments to your script. The "Reset" button resets all widgets to the values currently in your script and the "Clear" button clears all values from all widgets. The "Cancel" button closes the frame without writing anything new to your script.
There are various types of widgets for entering different kinds of arguments. The text-field widget for entering a file name (say, for the load command) comes with a press-button for browsing the directory tree. Numerical arguments use widgets which only accept numerical values. There is even a special widget for inserting arrays of user-defined tic labels.
There are some shortcomings of this system.
set arrow from 0,0 to 10,10
index, every, using)
used by plot, splot, and fit
are of this form.