Re: Image scrolling, displaying axes from outside the visible window [message #31576] |
Fri, 02 August 2002 05:54  |
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
|
|
|