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

Home » Public Forums » archive » Re: more log-scaled images
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: more log-scaled images [message #64286 is a reply to message #64277] Wed, 17 December 2008 02:31 Go to previous messageGo to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Tue, 16 Dec 2008 10:23:08 -0800 (PST), "ben.bighair"
<ben.bighair@gmail.com> wrote:

> Here is what I came up with: http://www.tidewater.net/~pemaquid/hbb_logimage.pro

I always get very depressed when doing this type of plotting :-). It's
all in the details, half pixel shifts etc. I tried to compare your's
with Paolo Grigis' procedure and it's different (see below).

I think you need to set xrange=[min(x),max(x)] and
yrange=[min(y),max(y)] (don't ask me why). Furthermore you have the
half-pixel difference and additionally some small aberration in your
case (check xaxis at 3).

PRO TEST_LOGIMAGE
nx = 300
ny = 1000
image = rebin(lindgen(1,ny),nx,ny,/sample)
image[*,0:4] = rebin(lindgen(nx)*4,nx,5,/sample)
image = bytscl(image)

print,'First color x:',min(where(image[*,0] ne 0))
print,'First color y:',min(where(image[0,*] ne 0))

loadct,38

window,0
x = FINDGEN(nx)+1
y = FINDGEN(ny)+1
PLOT, x,y, /XLOG, /YLOG, /NODATA, XSTYLE = 1, YSTYLE = 1
logimage = HBB_LOGIMAGE(image, x,y, /XLOG, /YLOG, $
ODIM = odim, TRUE = true, START = start)
TV, logimage, start[0],start[1], XSIZE = odim[0], YSIZE = odim[1]
PLOT, x,y, /XLOG, /YLOG, /NODATA, /NOERASE, XSTYLE = 1, YSTYLE = 1

window,1
x = FINDGEN(nx)+1
y = FINDGEN(ny)+1
pg_plotimage,image,x,y,/xlog,/ylog,/xs,/ys
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Generating a widget 'event' from an external program...
Next Topic: more log-scaled images

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

Current Time: Wed Oct 08 19:58:03 PDT 2025

Total time taken to generate the page: 0.00463 seconds