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 
Return to the default flat view Create a new topic Submit Reply
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]

;----------------------------------------------------------- --------------------
[Message index]
 
Read Message
Read Message
Read Message
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: Sun Oct 12 14:55:42 PDT 2025

Total time taken to generate the page: 1.84558 seconds