comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » FG Bug -- Legend/Cleanup
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: FG Bug -- Legend/Cleanup [message #90483 is a reply to message #90482] Wed, 04 March 2015 13:30 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
Another bug:

In legend, I can specify an array of target objects, each with different text colors (actually, the text color keyword changes the sample line color, not the text color)

win = window()
p1 = plot(/TEST, /CURRENT, LAYOUT=[1,2,1], NAME='Plot 1', COLOR='Black')
p2 = plot(/TEST, /CURRENT, LAYOUT=[1,2,2], NAME='Plot 2', COLOR='Blue')
leg1 = legend(TARGET=[p1, p2], LABEL='Plot X', TEXT_COLOR=['Black', 'Blue'])


But if I try to specify two labels, I get an error


win = window()
p1 = plot(/TEST, /CURRENT, LAYOUT=[1,2,1], NAME='Plot 1', COLOR='Black')
p2 = plot(/TEST, /CURRENT, LAYOUT=[1,2,2], NAME='Plot 2', COLOR='Blue')
leg1 = legend(TARGET=[p1, p2], LABEL=['Plot X', 'Plot Y'], TEXT_COLOR=['Black', 'Blue'])
% Expression must be a scalar in this context: <BYTE Array[2]>.


I either have to change the label after the legend is created or add the label separately

leg1[1].LABEL = 'Plot Y'

leg1 -> Add, p2, LABEL='Plot Y', TEXT_COLOR='Blue'
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Passing string from IDL to Fortran
Next Topic: Using 1D FFT to decompose the provided hurricane data in terms of wavenumbers.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 03:20:43 PDT 2025

Total time taken to generate the page: 1.27921 seconds