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 
Switch to threaded view of this topic 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 next 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?
Re: tvimage [message #60928 is a reply to message #45497] Tue, 24 June 2008 12:20 Go to previous message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
haha~ Thank you very much~~ I think I missed the colorpick lib there.
;)
Xiao
Re: tvimage [message #60929 is a reply to message #45497] Tue, 24 June 2008 10:48 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> Hi~ all , has anyone ever use the tvimage procedure wriitten by
> David ?

one or two among us might have... ah ah ah

No, seriously, download the whole Coyote library... you are certainly
missing a few routines required by TVImage

Jean

When I tried to use it . It reminds me that there are errros
> in these two lines:
>
> % Compiled module: TVIMAGE_ERROR.
>
> Erase, Color=FSC_Color(background,BREWER=brewer)
>
> ^
> % Syntax error.
>
> IF Size(acolor, /TNAME) EQ 'STRING' THEN acolor =
> FSC_COLOR(acolor, BREWER=brewer)
>
> ^
>
>
> Thanks~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: tvimage
Next Topic: Re: CALL_EXTERNAL and Progress Bar

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

Current Time: Wed Oct 08 17:40:11 PDT 2025

Total time taken to generate the page: 0.00547 seconds