new graphics legend function: problems with symbol fill color [message #81812] |
Thu, 25 October 2012 09:57 |
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
|
|
|