Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2567

Re: alignment in key title

Newsgroups comp.graphics.apps.gnuplot
Date 2014-08-28 18:12 -0700
References <d6bd6b2b-1849-439d-8830-722cd3d77920@googlegroups.com> <4834312f-c477-4d9e-9325-e7aea2dab32f@googlegroups.com> <ltk8b0$knd$1@news.rz.uni-karlsruhe.de>
Message-ID <d67ebc7f-d82d-47e6-bfea-e1af915854ba@googlegroups.com> (permalink)
Subject Re: alignment in key title
From i.bray@curtin.edu.au

Show all headers | View raw


On Wednesday, 27 August 2014 17:31:07 UTC+8, Karl  wrote:
> Am 27.08.2014 01:02, schrieb i.bray@curtin.edu.au:
> 
> > On Tuesday, 26 August 2014 09:31:30 UTC+8, i.b...@curtin.edu.au  wrote:
> 
> >> 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/
> 
> > 
> 
> 
> 
> You could use enhanced text mode to typeset a table:
> 
> 
> 
> sp1="&{longspacer}"
> 
> sp2="&{spacer}"
> 
> 
> 
> tl1="Titletitle\n"
> 
> tl2="@{Test}".sp1."@{12}".sp2."\n"
> 
> tl3="@{Testen}".sp1."@{4}".sp2."\n"
> 
> tl4="@{Tes}".sp1."@{654}".sp2
> 
> 
> 
> 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.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

alignment in key title i.bray@curtin.edu.au - 2014-08-25 18:31 -0700
  Re: alignment in key title i.bray@curtin.edu.au - 2014-08-26 16:02 -0700
    Re: alignment in key title Karl <mail.kfr@gmx.net> - 2014-08-27 11:31 +0200
      Re: alignment in key title i.bray@curtin.edu.au - 2014-08-28 18:12 -0700

csiph-web