Discussion:
alignment in key title
(too old to reply)
i***@curtin.edu.au
2014-08-26 01:31:30 UTC
Permalink
The gnuplot documentation says that key title alignment is same as in the key. However, I find that it is always centered, irrespective of "set key Left/Right". Am I missing something? It would be great to have flexibility to build aligned tables as in Google-Scholar, e.g. top right of http://scholar.google.com.au/citations?hl=en&user=6eaYJHwAAAAJ

I presently use gnuplot-4.6, and have been a very grateful gnuplot user for almost two decades.
i***@curtin.edu.au
2014-08-26 23:02:49 UTC
Permalink
Post by i***@curtin.edu.au
The gnuplot documentation says that key title alignment is same as in the key. However, I find that it is always centered, irrespective of "set key Left/Right". Am I missing something? It would be great to have flexibility to build aligned tables as in Google-Scholar, e.g. top right of http://scholar.google.com.au/citations?hl=en&user=6eaYJHwAAAAJ
I presently use gnuplot-4.6, and have been a very grateful gnuplot user for almost two decades.
I found an ugly workaround: set key outside top Left title sprintf("All career\n%-15s%5g\n%-15s %5g\n..., see graphic at http://atom.curtin.edu.au/
Karl
2014-08-27 09:31:07 UTC
Permalink
This post might be inappropriate. Click to display it.
i***@curtin.edu.au
2014-08-29 01:12:27 UTC
Permalink
Post by Karl
Post by i***@curtin.edu.au
Post by i***@curtin.edu.au
The gnuplot documentation says that key title alignment is same as in the key. However, I find that it is always centered, irrespective of "set key Left/Right". Am I missing something? It would be great to have flexibility to build aligned tables as in Google-Scholar, e.g. top right of http://scholar.google.com.au/citations?hl=en&user=6eaYJHwAAAAJ
I presently use gnuplot-4.6, and have been a very grateful gnuplot user for almost two decades.
I found an ugly workaround: set key outside top Left title sprintf("All career\n%-15s%5g\n%-15s %5g\n..., see graphic at http://atom.curtin.edu.au/
sp1="&{longspacer}"
sp2="&{spacer}"
tl1="Titletitle\n"
set key title tl1.tl2.tl3.tl4
If all table lines have the same length (using spacers over everything),
they even stay aligned when centred. I guess you tried to do the same,
but sprintf obviously doesn�t take the character widths into account.
Unrelated, it�d be nice to be able to control the justification of the
legend title, i.e.
set key title left|cent|right <titletext>
perhaps set up a feature request on sourceforge.net/p/gnuplot
The documentation is indeed wrong, and the behaviour described there
also wouldn�t make much sense, imho.
Or you could use the epslatex/cairolatex/.. terminal and then add a
nicely streamlined table as latex code.
Best regards,
Karl
Thanks for the reply Karl, and confirming that the documentation is wrong! I used a fixed width font to avoid the problem you identified. Cheers, Igor.
Loading...