Using SYMCAT with LEGEND [message #56495] |
Thu, 25 October 2007 13:37 |
willettk
Messages: 20 Registered: October 2006
|
Junior Member |
|
|
Gday all,
I have a small problem using two programs that are pretty much
everyday for me when I'm plotting in IDL; David's excellent SYMCAT
program and the LEGEND program in the Goddard astro library. The
problem is that, when trying to put my user defined symbols in the
legend, it will display the _last_ symbol used for all of my user-
defined symbols using SYMCAT.
For example, say I'm scatter plotting three data sets with a legend:
;;
x1 = findgen(10) & x2 = findgen(10)*2 & x3 = findgen(10)/2
y1 = x1 & y2 = x2 & y3 = x3
plot, x1, y1, psym = symcat(14)
oplot,x2, y2, psym = symcat(15)
oplot,x3, y3, psym = symcat(16)
legend, ['Data1','Data2','Data3'],
psym=[symcat(14),symcat(15),symcat(16)], /top, /right
;;
When I execute this, however, LEGEND plots all three datasets as
filled circles (SYMCAT(16)), when it should go [filled diamond, filled
square, filled circle]. There are ways around this (making my own
legend by hand, for a start), but I'd like to know if anyone has a
quick solution for making these two programs work with each other.
Thanks very much!
-KW
|
|
|