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

Home » Public Forums » archive » Re: 3D phase diagram drawing
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: 3D phase diagram drawing [message #62301] Tue, 02 September 2008 02:23
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On Mon, 1 Sep 2008 10:48:26 -0700 (PDT), rincvent@gmail.com wrote:

> Hi,
>
> I'm looking for a way to draw some diagram like that one:
> http://www.geology.iastate.edu/gccourse/hydro/aspects/images /diagram.gif
>
> My data would come as points organised in "1d sequences" (obtained
> from a numerical code with incrementation of one parameter), from
> which I would like to extrapolate some surfaces to separate various
> domains (so something really close to the figure given as a link). I
> tried to look whether someone already did that on IDL but didn't find
> anything.
>
> Any advice will be greatly appreciated, even if it were to give me the
> name of some other software that would be better for that job (free
> would be better of course).
>
> Thanks.

The code bellow will give you something to start with. Check also
PLOT_3DBOX. I seem to remember there was also something in the IDL
demo (itools?) what looks like this....


; Make data
n=100
m=2.
X=indgen(n)-n/2.
Y=X
Z=DIST(n)
YZ=max(Z,dim=1)
XZ=max(Z,dim=2)

; Set 3D
device,decompose=0
loadct,39
pos=[0.25, 0.25, 0.75, 0.75]
surface,Z,X,Y,/save,/nodata,xstyle=5,ystyle=5,zstyle=5,/norm al,pos=pos

; XZ-plane
PolyFill, [!X.Crange[0], !X.Crange, !X.Crange[1]], $
Replicate(m*!Y.Crange[1],4),[!Z.Crange, !Z.Crange[1],$
!Z.Crange[0]],/T3D,color=50
Axis, !X.Crange[0], m*!Y.Crange[1], !Z.Crange[0], /XAXIS,
/T3D,charsize=1.5
Axis, !X.Crange[0], m*!Y.Crange[1], !Z.Crange[0], /ZAXIS,
/T3D,charsize=1.5
plots,!X.Crange[[0,0]],[!Y.Crange[1],m*!Y.Crange[1]],!Z.Cran ge[[0,0]],linestyle=4,/T3D
plots,!X.Crange[[1,1]],[!Y.Crange[1],m*!Y.Crange[1]],!Z.Cran ge[[0,0]],linestyle=4,/T3D
Plots, X, replicate(m*!Y.Crange[1],n), XZ, /T3D,linestyle=0

; YZ-plane
PolyFill, Replicate(m*!X.Crange[1],4), $
[!Y.Crange, !Y.Crange[1], !Y.Crange[0]],$
[!Z.Crange[0], !Z.Crange, !Z.Crange[1]],$
/T3D, COLOR=50
Axis, m*!X.Crange[1], !Y.Crange[1], !Z.Crange[0], /YAXIS,
/T3D,charsize=1.5
Axis, m*!X.Crange[1], !Y.Crange[1], !Z.Crange[0], /ZAXIS,
/T3D,charsize=1.5
plots,[!X.Crange[1],m*!X.Crange[1]],!Y.Crange[[0,0]],!Z.Cran ge[[0,0]],linestyle=4,/T3D
plots,[!X.Crange[1],m*!X.Crange[1]],!Y.Crange[[1,1]],!Z.Cran ge[[0,0]],linestyle=4,/T3D
Plots, replicate(m*!X.Crange[1],n), Y, YZ, /T3D,linestyle=0

; Plot surface
surface,Z,X,Y,/noerase,xstyle=5,ystyle=5,zstyle=5,/normal,po s=pos,SKIRT=0

; Line on surface
Plots, X, replicate(Y[n/3],n), Z[n/3,*],
/T3D,linestyle=0,color=250,symsize=10
Re: 3D phase diagram drawing [message #62306 is a reply to message #62301] Mon, 01 September 2008 18:25 Go to previous message
russell.grew is currently offline  russell.grew
Messages: 74
Registered: February 2005
Member
If you want to go outside IDL but retain the numerical side of figure
generation with code something like PStricks might suffice. Also
Pyscript. Google them if you wish.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Creating an IDL array within C?
Next Topic: Passing Batch File Names

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

Current Time: Wed Oct 08 17:10:12 PDT 2025

Total time taken to generate the page: 0.00446 seconds