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 #31576] Fri, 02 August 2002 05:54 Go to previous message
fahruz is currently offline  fahruz
Messages: 3
Registered: August 2002
Junior Member
>> 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.

That's what I'm attempting in the end but I agree I shouldn't have
mentioned it at this stage so as to not get you confused.

> 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. :-)

Call dumb what you can't admit you can't do (or can but in a very
convoluted way), I've heard of such bad loser marketing policies. :))
Seriously, I would've appreciated a tad more flexibility and choose
myself whether I want that "protection" or not.

> 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]

Ok, I tried it and -surprise- it works. But I can hardly integrate it
in my code. I'd rather opt for that nifty solution suggested by Don
(thanks Don !!) with pixmaps.

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

Any kind of application which needs to display specific areas of a
plot.

Anyway, thanks for your prompt answers and valuable help!

FM
[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: Thu Oct 09 23:03:31 PDT 2025

Total time taken to generate the page: 0.63843 seconds