Re: Plotting a compass [message #81904 is a reply to message #81903] |
Fri, 09 November 2012 14:47   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Davide writes:
> So, how do I put a colorbar when I use cgImage to print on a eps?
> cgColorbar comes after the instruction that directs the output to the eps.
>
> cgIMAGE, f, POSITION=p, /KEEP_ASPECT_RATIO, MINVALUE = 0, outfilename='wanderfulplot.eps', OUTPUT = 'EPS'
> cgColorbar, FORMAT='(F2.0)', Position=[p[2], p[1], p[2]+0.015, p[3] ], ncolors=256, /vertical, /right, Divisions=4, Range=[minc, maxc]
>
I would do it pretty much the way you were doing it before:
PS_Start, 'wanderfulplot.eps'
cgIMAGE, f, POSITION=p, /KEEP_ASPECT_RATIO, MINVALUE = 0
cgColorbar, FORMAT='(F2.0)', Position=[p[2],p[1],p[2]+0.015 p[3]], $
ncolors=256, /vertical, /right, Divisions=4, Range=[minc, maxc]
PS_End
> For what concerns the arrows, I guess that the problem is that I am using normal coordinates, that's why they are not orthogonal. I should switch to the data coordinates. Anyway, they look the same than the arrows obtained with the old function.
Well, you will certainly have to take into account the aspect
ratio of the plotting window if you are going to use normalized
coordinates. But, that is just another good reason to use polar
coordinates. R and Theta are both going to be easy to calculate! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|