help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gset left top Left reverse


From: John W. Eaton
Subject: gset left top Left reverse
Date: Thu, 14 Jan 2010 16:30:40 -0500

On 14-Jan-2010, Thorsten Meyer wrote:

| with older versions of octave which still had the old plotting system, I used 
to
| be able to set the position and text formatting in the plot legend with 
commands
| like
| gset("key left top Left reverse")
| or __gnuplot_set__("key left top Left reverse")
| 
| Now, with the matlab like plotting system, I can indeed reproduce most of this
| via properties:
| # legend in the top left corner of the plot area
| set(gca, "keypos", "northwest");
| # line markers left of legend text
| set(gca, "keyreverse", "on");
| What I haven't found is a way to change from right alignment to left alignment
| in the legend (which the "Left" did in the gnuplot command).
| 
| Have I missed it or has it not yet been implemented?

Legends are not fully implemented yet.  We currently cheat by using
properties like "key", "keybox", "keyreverse", and "keypos".  With the
gnuplot backend, we just use these and issue a "set key" command.  But
this is all incompatible with Matlab, and not the solution we should
really have.  Instead, the legend should really be a separate axes
object containing line and text objects.  Then you could set the
"horizontalalignment" property for the text objects to get the effect
you want.

But someone needs to write the code.  I think the difficult part is
computing the correct size of the legend axes object and placing the
elements inside it so they don't overlap or have too much space
between them.  Is anyone interested in working on this project?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]