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

Home » Public Forums » archive » Re: Plotting a compass
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Plotting a compass [message #81904 is a reply to message #81903] Fri, 09 November 2012 14:47 Go to previous messageGo to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Library Updates
Next Topic: color table

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

Current Time: Fri Oct 10 15:33:42 PDT 2025

Total time taken to generate the page: 0.96427 seconds