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

Home » Public Forums » archive » positioning a TV image within plotting region
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
positioning a TV image within plotting region [message #77882] Thu, 29 September 2011 06:50 Go to previous message
Matthew is currently offline  Matthew
Messages: 18
Registered: February 2006
Junior Member
I am writing a program in which I need to display an image within a
set of axes (frequency vs. time with electric field power spectral
density in color). The problem is that, while the position keyword
specifies the lower left corner of the plotting region, the plot
procedure draws the x and y axes on the inside of this space. So, when
I plot my image using the same position that I supplied to the
plotting routine, the image covers the x and y axes -- it is drawn on
starting on the outer corner of the axes, not on the inner corner.

This would be fine if the axes had a fixed width, but they do not. If
I reposition or resize the plot, the axis width changes and the image
does not fit snugly within the axes. Is there a trick to get around
this?

This happens no matter what coordinates I am using (device,
normal, ...). I already know about TVIMAGE and IMDISP, but want to be
able to fix the problem myself.


position = [x0, y0, x1, y1] ;position in normal coordinates
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

loadct, 13
plot, time, freq, position=position, /normal, /nodata, /noerase
tvscl, congrid(alog(transpose(E_pwr_dens)), xsize, ysize), xstart,
ystart
[Message index]
 
Read Message
Read Message
Previous Topic: Re: positioning a TV image within plotting region
Next Topic: Re: printing with a format in exponent!

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

Current Time: Fri Oct 10 17:08:57 PDT 2025

Total time taken to generate the page: 0.88031 seconds