[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot a square.
Peter Brooker <ra5589@email.sps.mot.com> writes:
> Assume that I have the following data
> x=[0,1,1,0]
> y=[0,0,1,1]
>
> this defines a square.
>
> plot,x,y
>
> results in a "non-square" plot.
>
> Is there an easy way to tell IDL to adjust the window size so that the
> square will plot as a square on my screen?
Did you mean:
window, win, 100, 100
Or, will this get you started?
plots, [0,100,100,0], [0,0,100,100], /device
The device keyword forces the operation to occur in pixel space.
Since your coordinate axes don't seem to matter to you, this is
probably the best option. Note you can get the display size in pixels
from the !D system variable, in case you need to scale accordingly.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------