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

Home » Public Forums » archive » Re: Overplot data on a 2d histogram
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: Overplot data on a 2d histogram [message #73179] Wed, 27 October 2010 18:06 Go to previous message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Oct 27, 8:29 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Oct 27, 10:11 pm, "Jeff N." <jeffnettles4...@gmail.com> wrote:
>
>> I mostly use IDL to write custom routines for ENVI, so I don't usually
>> have to use IDL's plotting routines very much.  But I'm slowly but
>> surely developing a need to plot some 2d histograms for a couple
>> projects i'm working on.  I can make the 2d histograms with HIST_2D()
>> (or J.D.'s HIST_ND) with no trouble.  And I can also display the
>> resulting image with no trouble, even with axes on the image if i'd
>> like.  But the axes would have pixel coordinates as values, where i'd
>> like the axes to have values of the data that went into the hist_2d.
>> And then I'd like to be able to overplot stuff (more points,
>> polygons,etc.) on the plot, in the dataspace of the original data of
>> course (not the pixel coords of the histogram image).  This is a more
>> complicated plot than i'm used to making :(  Can anyone give me some
>> pointers about the best way to approach this?  I really don't even
>> care which graphics system - whatever's simplest! :)
>
> Sounds like you might want something like
>
> IDL> imd=dist(200);make up some data to display
> IDL> im=image(imd,
> 5.75+dindgen(200)*0.0093,-17.+dindgen(200)*0.00595,axis_styl e=2)
>
> The first argument to image is the 2D array with the data, the second
> is a 1D array with the x location of each column, and the third is a
> 1D array with the y location of each line.

Perfect! So simple! I'd spent all my time pouring over the help for
the PLOT() function, didn't even think to look at IMAGE() first :(

Thanks Paulo!
[Message index]
 
Read Message
Read Message
Previous Topic: Overplot data on a 2d histogram
Next Topic: POLY_2D and anti-aliasing

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

Current Time: Sat Oct 11 03:02:53 PDT 2025

Total time taken to generate the page: 1.67769 seconds