|
From: Theo H. <th...@ph...> - 2006-10-08 16:48:08
|
Keir Mierle wrote: > I have a simple suggestion to improve the usability of the plot command. > Currently, I am not a huge fan of the way point styles are specified; mainly > because I do not find having to memorize different plot styles as numbers > remotely intuitive. Also, it is very difficult to tell from the documentation > exactly how to plot squares or other points instead of crosses (for, i.e. > overplotting two scatter plots to see where points line up). > > What am I suggesting? Instead of writing: > > gnuplot> plot 'file1' with points 4 3 > gnuplot> plot 'file2' with points 1 4 > > I suggest that we support (*in addition* not instead of) two new methods of > specifying plot styles, one which follows the convention of Matlab and Matplotlib > (Python's plotting package), and another which is so blatently obvious everyone > will understand it. > > Note that in the above script, no one could possibly guess what 4 3 or 1 4 > means if they are not a frequent gnuplot user. I actually did not figure out > that this was the command I was looking for until after several passes through > the documentation; I erroneously expected the command to be obvious. > > 1) The really obvious version > ----------------------------- > > gnuplot> plot 'file1' with points 'red squares' > gnuplot> plot 'file2' with points 'blue crosses' > gnuplot> plot 'file1' with points 'orange octagons' > gnuplot> plot 'file1' with points 'orange stippled-squares' > gnuplot> plot 'file1' with points 'violet filled-circles' [...] First of all: after reading this thread, I'm surprised no one has mentioned the `test` command. From `help plot style`: "If you wish to choose the line or point type for a single plot, <line_type> and <point_type> may be specified. These are positive integer constants (or expressions) that specify the line type and point type to be used for the plot. Use `test` to display the types available for your terminal." The "really obvious" syntax can be implemented using macros. See `help macros` for an example. It may be that a single command file containing macro definitions may be shared among many terminals (for example, the postscript-based ones), although certainly some terminals will demand their own macro definitions due to differing line- and point types. Feel free to contribute such macro definitions for commonly used terminals. THeo |