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

Home » Public Forums » archive » new graphics legend function: problems with symbol fill color
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
new graphics legend function: problems with symbol fill color [message #81812] Thu, 25 October 2012 09:57
manodeep@gmail.com is currently offline  manodeep@gmail.com
Messages: 33
Registered: June 2006
Member
Hey everyone,

I am trying to use the IDL 8.0 legend function but I can not make it use the correct symbol fill color. Here is an example code:

------------------------
;;; generate some data
N = 10
x = dindgen(10)
y = randomu(seed,N)

;;; create the plot
p = plot(x,y,symbol='s',color='black',/sym_filled,sym_fill_color ='red')
l = legend(target=p) ;;; symbols are filled black squares and not red squares with a black outline

IDL> print,!version
{ x86_64 linux unix linux 8.0 Jun 18 2010 64 64}

------------------------

The legend function seems to only care about the color used in the plot and not
the actual fill color for the symbol. Any idea how to get the correct behaviour?

On a side-note, legend() seems to always plot 3 symbols in the legend and the documentation did not indicate any way of changing that. Does anybody know how to control the number of symbols (something like number and pspacing in al_legend)?

Thanks in advance,
Manodeep
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: VALUE_LOCATE and NaNs
Next Topic: Re: new graphics legend function: problems with symbol fill color

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

Current Time: Wed Oct 08 15:17:29 PDT 2025

Total time taken to generate the page: 0.00498 seconds