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

Home » Public Forums » archive » Re: tv with axes routine
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: tv with axes routine [message #51619 is a reply to message #51618] Sat, 02 December 2006 14:08 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Larsen writes:

> Has anyone out there written a wrapper for tv that makes the output
> look like contour?
>
> By like contour I mean with axes, and in the center of the window,
> scalable zrange, log scales, ability to add a colorbar (using colorbar
> would work separately also so long as position works)
> Contour is great but it inherently smooths and takes forever, I don't
> want either.
>
> This would be a blocky version of
> IDL> contour, dist(100), /fill, nlevels=100
>
> but of course
> IDL> tvscl, dist(100)
> doesn't have any axes, is in the wrong place and all.
>
> This would be the equivalent then of imagesc() in matlab.

xrange = [-5, 5]
yrange = [5, 15]
image = Dist(256)
LoadCT, 33, NColors=100, Bottom=1, /Silent
position = [0.1, 0.1, 0.9, 0.75]
TVImage, BytScl(image, Top=99), Position=position, $
/Keep_Aspect, /Erase, /NoInterpolate
Plot, xrange, yrange, XRANGE=xrange, YRANGE=yrange, $
Position=position, XStyle=1, YStyle=1, /NoData, /NoErase
Colorbar, Range=[Min(image), Max(image)], Divisions=10, $
Minor=5, NColors=100, Bottom=1, $
Position=[position[0], 0.88, position[2], 0.95]

You could easily slap this into a wrapper procedure if you
like. Call it IMAGESC. :-)

You can find the relevant programs in the Coyote Library.

http://www.dfanning.com/documents/programs.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: objects, crashes, and negative memory oh my
Next Topic: Can I Pass an object to IDL_IDLBridge session?

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

Current Time: Sat Oct 11 07:47:43 PDT 2025

Total time taken to generate the page: 1.19974 seconds