Name:plotting in color
Category:IDL
Author:Sun
Tip:

 

I've heard a lot of people complain about the difficulties of plotting in color with IDL.

Copy this awesome program into your idl directory:

 http://hea-www.harvard.edu/PINTofALE/pro/util/peasecolr.pro


Then anytime you need to plot in color, simply call procedure like this. Depending on your idl setup you might need to call peasecolr twice, only the first time you start up idl though.

IDL> peasecolr

IDL> plot,x,y,col=1

 

col=1 is blue

col=2 is red

col=3 is green

etc etc etc..

 

AND... for even more perks, download this program:

http://hea-www.harvard.edu/PINTofALE/pro/util/setkolor.pro

and you can set your own colors (sort of). but i think you have to call peasecolr first.

IDL> peasecolr

IDL> setkolor,'purple',2

IDL> plot,x,y

IDL> oplot,x,y,col=2

voila! who wants to start a club working on writing programs for new psyms?? (plot,x,y,psym=whale,/blowhole) . email me for details.

 

Also, there are tons of other useful IDL programs here:  http://hea-www.harvard.edu/PINTofALE/pro/

 

For those who absolutely must know how everything works, read this to learn more than you wanted to learn about color and how it works in IDL.