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

Home » Public Forums » archive » Re: tvimage, imcontour and ps dimensions
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: tvimage, imcontour and ps dimensions [message #43517 is a reply to message #43513] Sun, 17 April 2005 15:36 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Stefano writes:

> Here is my code. I get the same problem even if I do not redefine all
> the ! variables.
>
> Thanks,
>
> Stefano
>
> file='file.fits'
> im=readfits(file,hdr)
>
> file2='file2.fits'
> hst=readfits(file2,hdr2)
>
> hextract, hst, hdr2, 100, 480, 220, 460
>
> hastrom, im, hdr, hdr2, MISSING=0
>
> sm=smooth(im,15,/edge_truncate)
>
> set_plot, 'ps'
> device, filename='test_paper.ps', xsize=20, ysize=20, /color
>
> !P.charsize=0.8
> !P.thick=5
> !X.thick=3
> !Y.thick=3
> !P.charthick=3
>
> erase
>
> tvimage,bytscl(-hst,min=-20,max=0),/keep_aspect, position=pos
>
> imcontour, alog(sm), hdr, nlevels=3, min_value=-0.6, max_value=3,
> position=pos, /TYPE, /noerase,color=fsc_color('black'), subtitle="",
> title="Test"
>
> device, /close_file

Ah, right. I see you *were* reading the header documentation.
Sometimes that's the problem. :-)

What you want to do is define the variable "pos" before
you use it in the TVIMAGE command. That will solve
all your problems, I think:

pos = [0.1, 0.1, 0.9, 0.9]
tvimage,bytscl(-hst,min=-20,max=0),/keep_aspect, position=pos
imcontour, alog(sm), hdr, nlevels=3, min_value=-0.6, max_value=3, $
position=pos, /TYPE, /noerase,color=fsc_color('black'), $
subtitle="", title="Test"

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: structure access using strings for tag-names
Next Topic: collecting points with "cursor" procedure for several classes

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

Current Time: Fri Oct 10 03:50:30 PDT 2025

Total time taken to generate the page: 0.55893 seconds