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

Home » Public Forums » archive » Re: Image scrolling, displaying axes from outside the visible window
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: Image scrolling, displaying axes from outside the visible window [message #31599 is a reply to message #31593] Thu, 01 August 2002 07:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lord Fahruz (Fahruz@hotmail.com) writes:

> Okay, sorry for my poor phrasing.
> Simply put: I would like to display a coordinate system with its
> origin outside the visible window when using negative values in the
> position vector.
> For example:
>
> IDL> window, /free
> IDL> x=findgen(200)*0.1
> IDL> plot, x, cos(x), /device, position=[-90,-90,200,200]
>
> When I type this I would like the lower and left axes not to be
> displayed in the window and the tickmarks to be accordingly shifted
> for the other 2 axes. However it seems that no matter what negative
> value I type in, the axes still appear at the bottom and to the left
> of the window.

Oh, right. Yes, I thought we were dealing with scrolling windows.

Yes. In direct graphics IDL is "protecting" you by making sure
that the POSITION keyword draws something in the graphics window.
If you want to do something really dumb (like drawing something
outside the graphics window) you have to use object
graphics, which is more powerful than direct graphics. :-)

I've modified my XPLOT program to allow you to position the plot
in the window with the POSITION keyword:

http://www.dfanning.com/programs/xplot.pro

The POSITION keyword uses "normalized" coordinates, which assumes
that the visible portion of the plot window goes from 0 to 1 in
both X and Y directions. For example, for a normal plot:

IDL> XPlot, Findgen(100), Position=[0.15, 0.15, 0.9, 0.85]

For a plot with the Y axis origin out of the window:

IDL> XPlot, Findgen(100), Position=[0.15, -0.2, 0.9, 0.85]

Cheers,

David

P.S. Tell me again why something like this is useful?

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: integer?
Next Topic: Re: saving variables between calls to a procedure?

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

Current Time: Fri Oct 10 19:28:50 PDT 2025

Total time taken to generate the page: 1.36070 seconds