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

Home » Public Forums » archive » Re: Polar plots with aspect ratio =1
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Polar plots with aspect ratio =1 [message #4217] Fri, 12 May 1995 00:00
afl is currently offline  afl
Messages: 51
Registered: December 1994
Member
In article <3ovpas$dll@ra.nrl.navy.mil>, nicholas@uap.nrl.navy.mil (Andy
Nicholas) writes:
|> Any know of a simple way to make the aspect ratio of a polar plot 1. I
|> can do it using !p.position, just wondering if there is an easier way.
|>


From one Andrew to another, here are some suggestions...

1) If you are talking about polar as in polar stereographic,
try using the /isometric keyword to map_set.

2) If not using map_set, I have used this code provided to the
group by Dr. Kenneth Bowman


PRO SET_ASPECT, aspect, MARGIN = margin

; This program sets the plot position, !P.POSITION
; to ensure the desired aspect ratio for the final
; plot with a margin on each side.

;Find the aspect ratio of the current window
daspect = FLOAT(!D.Y_SIZE)/FLOAT(!D.X_SIZE)
IF NOT KEYWORD_SET(margin) THEN margin = 0.05

IF(aspect LE daspect) THEN BEGIN
x0 = margin
y0 = 0.50 - (0.5 - margin)*(aspect/daspect)
x1 = 1.0 - margin
y1 = 0.50 + (0.5 - margin)*(aspect/daspect)
ENDIF ELSE BEGIN
x0 = 0.50 - (0.5 - margin)*(daspect/aspect)
y0 = margin
x1 = 0.50 + (0.5 - margin)*(daspect/aspect)
y1 = 1.0 - margin
ENDELSE
!P.POSITION = [x0, y0, x1, y1]

RETURN
END

--

Andrew F. Loughe email: afl@cdc.noaa.gov
University of Colorado, CIRES voice: (303) 492-0707
Campus Box 449 fax: (303) 497-7013
Boulder, CO 80309-0449 USA
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL> Looking for routine to list subdirectories.
Next Topic: Re: Reading IEEE floating point on DEC OpenVMS

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

Current Time: Fri Oct 10 10:15:29 PDT 2025

Total time taken to generate the page: 1.27828 seconds