Re: Plotting a compass [message #81914 is a reply to message #81905] |
Fri, 09 November 2012 11:36  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Davide writes:
> Hi guys, I am trying to plot something like a compass on top of an image (a 2D matrix filled with floats. It is supposed to be a flux map for an astronomical object. No reliable wcs system inside). So I ended up using "arrow".
> I am having difficulties plotting two orthogonal arrows. The code (see below) seems fine to me. Is that something related to some rescaling? (Or maybe I made some awkward mistake).
> Also, can you suggest something more up to date than tvscale? Consider that my goal is have maps with a color bar and spatial scales along x and y.
Oh, dear! :-(
I don't know where to start. I guess I'd start
by updating your Coyote Library to something
that was written in the, I don't know, last 10
years or so. Things have changed. In fact, things
have changed TODAY!
http://www.idlcoyote.com/programs/coyoteprograms.zip
Humm. The cgImage program is perfectly capable of adding
axes with different ranges so you can set up a data
coordinate system, etc. And cgArrow can make prettier
arrows than you are making.
I guess if I were going to think about drawing orthogonal
vectors I would be thinking about working in polar coordinates,
rather than rectangular coordinates. The angle thing would
be a LOT easier! You can use CV_COORD to do the conversions
for you.
Weird dimensions on the PostScript file, too. What are
you going to do with that thing when you are done with it?
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.")
|
|
|