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

Home » Public Forums » archive » Plotting a horizontal line over a cgImage
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 horizontal line over a cgImage [message #93585 is a reply to message #93583] Mon, 29 August 2016 12:29 Go to previous messageGo to previous message
Christina Haig is currently offline  Christina Haig
Messages: 4
Registered: August 2016
Junior Member
On Monday, August 29, 2016 at 2:20:04 PM UTC-4, wlandsman wrote:
> On Monday, August 29, 2016 at 12:03:11 PM UTC-4, Christina Haig wrote:
>
>> As you can see, the yrange goes roughly from 1 to 100ish.
>
> Actually we can't see ;-) We (the readers of this newsgroup) don't know the content of your variables, and we can't see the output plot.
>
> But your code looks like it should work. Does the CGPLOT command come immediately after the CGIMAGE command or is there something in between that could reset the positioning?
>
> Also I would set COLOR='green' (or something similar) in your CGPLOT command, in case there is something funky with the color table.
>
> Also check the coordinate transformation between data and device coordinates
>
> IDL> print,convert_coord(mint,maxt],[2.0,2.0],/data,/to_device)
>
> to make sure the line is in the physical area of the window. --Wayne

Hi Wayne, thanks for your reply. I decided to try your suggestion of 'green', and also 'black', just in case. Also, my color table goes from black to white (255 to 0), and I tried both of those.

I also tried the convert_coord command, but /to_device gives some weirdly large numbers that I don't quite understand. I then tried convert_coord with /to_normal and got:

0.088541664 0.95833331 0.0000000
0.35069446 0.95833331 0.0000000

This looks like it should be somewhere in the plot area, in the general region of the upper-lefthand-corner where the underlying plot is. There is nothing between the cgplot and cgimage command. Is there something about either cgplot or cgimage that doesn't like one writing over the other perhaps? Is there a way to override this?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need e-book of Image Analysis, Classification and Change Detection in Remote Sensing: With Algorithms for ENVI/IDL and Python by Mort Canty
Next Topic: Convert MJD date range to number of days elapsed in IDL

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

Current Time: Wed Oct 08 17:47:20 PDT 2025

Total time taken to generate the page: 0.00369 seconds