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

Home » Public Forums » archive » How to rotate a figure in PLOT?
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
How to rotate a figure in PLOT? [message #48565] Sun, 30 April 2006 19:50 Go to next message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Hi, all,
I still do not figure out how to solve this. Hopefully
I could get some hints here.
I set my output as 'ps'. I want to plot three plots
in one page. Here is the basic idea:

------------------------------------------------------------ --
set_plot,'ps'
device,filename=..., /landscape

;plot the first figure

plot, x1, y1, position=[0.0,0.0,0,7,0.7]

;plot the second figure: histogram of x1

plot, x1, PSYM=10, position=[0.0,0.71,0.7,1.0]

;plot the third figure: histogram of y1
;I HAVE BIG PROBLEMS HERE. I want to plot this
;by rotation of 90 degrees (similar as portrait). I tried
;to simply exchange the order of x, y paramters but
;it does not work. By the way, /orientation is not accepted
;in plot.

------------------------------------------------------------ ---------

Thanks for kindly help,

Caitouer
Re: How to rotate a figure in PLOT? [message #48628 is a reply to message #48565] Wed, 03 May 2006 10:20 Go to previous messageGo to next message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Do anybody have an idea why this happens?
Thanks for any hint,
Caitouer
Re: How to rotate a figure in PLOT? [message #48676 is a reply to message #48565] Tue, 09 May 2006 07:33 Go to previous message
caitouer is currently offline  caitouer
Messages: 21
Registered: June 2005
Junior Member
Hi, all,
I figure out how to do this. I post it here in case
anyone need it.

;----------------------------------------------------------- -------------
;I set minimum and maximum to do histogram
;----------------------------------------------------------- -------------
mbinsize=10
hist=HISTOGRAM(Bx, binsize=mbinsize, min=0.0, max=200.0)
npts=N_ELEMENTS(hist)
bins=FINDGEN(n_elements(hist))*mbinsize+0.0

hist_x=FLTARR(2*npts+2) & hist_y=FLTARR(2*npts+2)
FOR i=0, npts-1 DO BEGIN
hist_x(i*2)=bins(i)
hist_x(i*2+1)=bins(i)
hist_y(i*2+1)=hist(i)
hist_y(i*2+2)=hist(i)
ENDFOR
hist_x(2*npts)=bins(npts-1) & hist_x(2*npts+1)=bins(npts-1)
hist_y(2*npts+1)=0 & hist_y(0)=0
hist_x=REVERSE(hist_x, /overwrite)
hist_y=REVERSE(hist_y, /overwrite)

PLOT, hist_y, hist_x, pos=[0.76,0.0,1.0,0.74]

;----------------------------------------------------------- --------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: the mathematical meaning of Correlate(a,b) when a and b are 2-dimensional matrixes
Next Topic: hist_nd for creative grid resampling on big arrays

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

Current Time: Fri Oct 10 11:28:18 PDT 2025

Total time taken to generate the page: 0.64056 seconds