Re: Polar plots with aspect ratio =1 [message #4217] |
Fri, 12 May 1995 00:00 |
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
|
|
|