Re: More Function Graphics Fun! [message #77587 is a reply to message #77585] |
Mon, 12 September 2011 10:10   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 12 sep, 17:45, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> OK, having solved the contour plot problem, I am ready
>> for the *next* essay question on the exam. :-)
>
>> I am interested in legends. I am using this code
>> as a test example:
>
>> p1 = Plot(Findgen(20)+1, Name='Line 1')
>> p2 = Plot(Findgen(20)*2+1, Name='Line 2', LineStyle=2, /Overplot)
>> leg = Legend(Position=[3,30], /Data)
>
>> It works great. Well, it's OK. The legend appears
>> reasonable close to where I want it to appear at
>> [3,30] in data coordinates. At least it does until
>> I resize the window. Then only God knows where it
>> might show up!
>
>> Does anyone know how I might keep the legend in
>> the same location as I resize the graphics window?
>
> Now that I think about it, maybe this is the same
> bug that causes the legend to completely disappear
> on log plots. Is that possible?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
I have no answer to your question. I only note that using /NORMAL
instead of /DATA is no more reliable !
But you can get something worse with your simple code: without
resizing the window, please push the UNDO button. The legend
disappears, not unexpectedly since that is the last object created in
your plot. But, now, please push the REDO button ... On my screen, the
legend is now partly overrided by a big grey square with a border,
without any possibility to recover it ! Likely, some pointer has been
lost in the operation.
alain.
|
|
|