|
From: Ethan A M. <sf...@us...> - 2016-07-13 17:12:19
|
On Wednesday, 13 July, 2016 18:49:41 Liu Guibin wrote: > I still expect the support for multiple keys. > > Using labels is too complicated and inconvenient. > Label is only suitable for adding text, but incapable of adding lines, > points, linepoints, histograms, etc. > For example, I don't know how to use label to mimic the key in the > following plot statement: > > plot 'data1' t 'test1' w p pt 7 ps 2, \ > 'data2' t 'test2' w l lw 2 lt 3,\ > 'data3' t 'test3' w lp lt 1 lw 2 pt 6 ps 2,\ > 'data4' t 'test4' w histograms > > > 在 2015-12-11 7:43, Tait 写道: > >> <1>. Multiple keys > >> ... > >> set key 1 top right > >> set key 2 bottom left > >> plot 'data' key 1, '' key 1, '' key 2, '' key 2 > >> > >> Thus, if I have many legends and there's no space to put them together, > >> I can divide them into two groups > >> "key 1" and "key 2" and put them at different places. > > Don't labels (as in, "help set label") offer a more flexible and > > comprehensive solution to this problem? Current cvs (version 5.1) supports individual placement of key items. Demo is here: http://gnuplot.sourceforge.net/demo_cvs/custom_key.html Help text is here: gnuplot> help plot title By default each plot is listed in the key by the corresponding function or file name. You can give an explicit plot title instead using the `title` option. Syntax: title <text> | notitle [<ignored text>] title columnheader | title columnheader(N) {at {beginning|end}} {{no}enhanced} [...] The `at` keyword allows you to place the plot title somewhere outside the auto-generated key box. The title can be placed immediately before or after the line in the graph itself by using `at {beginning|end}`. This option may be useful when plotting `with lines` but makes little sense for most other styles. To place the plot title at an arbitrary location on the page, use the form `at <x-position>,<y-position>`. By default the position is interpreted in screen coordinates; e.g. `at 0.5, 0.5` is always the middle of the screen regardless of plot axis scales or borders. The format of titles placed in this way is still affected by key options. See `set key`. Ethan |