Re: cgContour: the inexplicable Scale_Vector Error [message #80089 is a reply to message #80088] |
Mon, 07 May 2012 14:27  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
allisonjaynes@gmail.com writes:
> Hello! Here is a small issue that I've dealt with for a while now, but I'd like to ask: a) what is going on? and b) is there a way to end it?
>
> Whenever I start up a fresh IDL session and run a simple code calling cgContour whilst the ONIMAGE keyword is set, I get the following error...
>
> 'SCALE_VECTOR: Range max and min are coincidental'
>
> However, if I take 5 seconds to delete /ONIMAGE, run the code again, then replace /ONIMAGE, the problem goes away until the next session reset.
>
> I've searched for others' solution to this, to no avail. Any suggestions?
The ONIMAGE keyword to cgContour assumes you have
first displayed an image with cgImage. But, more than
that, it assumes you have displayed the image in a way
that has set up a data coordinate system that cgContour
can draw on. That is to say, you have called cgImage
with either the SAVE or AXES keywords set, so that
a data coordinate system is set up.
Here is an article with a more detailed discussion:
http://www.idlcoyote.com/cg_tips/linesonimage.php
I presume it works *after* you remove the ONIMAGE from
cgContour because then cgContour will do the job that
cgImage was suppose to be doing and sets up a data
coordinate system (although maybe the wrong one!)
that the ONIMAGE keyword can use. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|