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

Home » Public Forums » archive » tvimage followed by contour in ps... positioning not coming out right
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
tvimage followed by contour in ps... positioning not coming out right [message #45497] Tue, 13 September 2005 12:13 Go to previous message
Turamarth is currently offline  Turamarth
Messages: 4
Registered: January 2005
Junior Member
My question has to do with using tvimage from the programming library
at www.dfanning.com. I am using it to plot an image in a postcript
file and then I use contour - overplotting on top of that image. I am
making multiple plots on one page so I have set the !P.multi variable.
Simply put my code is (I can give the full code if necessary):

set_plot, 'ps'
DEVICE, FILENAME = pathname + 'VelContours.ps', /color,
BITS=8,xsize=7,ysize=10,/inches,$
ENCAPSULATED = 0, /portrait, XOFFSET = 1, YOFFSET = 1
!P.Multi = [0,2,4]

TVSCALE, image, /keep_aspect_ratio, position = get_position
contour, arr, /noerase, position = get_position,c_colors = color, $
level = levelset

Well, as I understood it, this was supposed to overplot a contour
exactly on top of my image. It does not do this, the contour instead
plots with a different aspect ratio then the image, such that the two
sides and bottom all mach up, but the contour is short of the top!

I thought it might have something to do with this line in TVIMAGE:

xsize = (position(2) - position(0)) * !D.X_VSIZE
ysize = (position(3) - position(1)) * !D.Y_VSIZE
xstart = position(0) * !D.X_VSIZE
ystart = position(1) * !D.Y_VSIZE

as the ratio that it was off was exactly (!D.Y_VSIZE/float(
!D.X_VSIZE)). But that is only true for the first image that is
plotted! After the first plot the ratio was different.. although I
have not really looked into THAT much yet.

This all seems very strange to me. Is tvimage supposed to work like I
think it should, or am I using it wrong?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: tvimage
Next Topic: Re: CALL_EXTERNAL and Progress Bar

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

Current Time: Thu Oct 09 21:11:40 PDT 2025

Total time taken to generate the page: 1.28141 seconds