[pstricks] Help with a Phase Diagram

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Tue Nov 2 07:32:00 CET 2004


Professor Angelo R. Rossi wrote:

> I teach freshman chemistry and try to use pstricks as much as possible.  For
> example, I have used pstricks to draw a version of a phase diagram, but it
> doesn't look all that great.  Also, I would like to draw a beaker with water
> and a solid at the bottom of the beaker in equilibrium with the liquid.

you can stretch the image with \psscalebox

Herbert


\documentclass[a4paper,12pt]{article}
\usepackage[dvipsnames]{pstricks}
\usepackage{pst-node}

\SpecialCoor
\definecolor{gray95}{gray}{0.95}
\definecolor{gray90}{gray}{0.90}
\definecolor{gray85}{gray}{0.85}
\definecolor{gray80}{gray}{0.80}
\begin{document}

\begin{pspicture}(-1.25,-0.75)(4,4)
   \psframe[fillstyle=solid,fillcolor=cyan](4,4)
   \pnode(1,1){A}\pnode(2.667,2){B}\pnode(3.7,3.6){C}
   \pscustom[fillstyle=solid,fillcolor=gray80]{
     \pscurve(0,0)(0.5,0.4)(A)
     \pscurve(A)(B)(C)
     \psline(C)(4,4|C)(4,0)(0,0)
   }
   \pscustom[fillstyle=solid,fillcolor=YellowGreen]{
     \pscurve(0,0)(0.5,0.4)(A)
     \psline(A)(0.9,4)(0,4)(0,0)
   }
   \pscircle*[linecolor=red](0,2){3pt}
   \psframe[fillstyle=solid,fillcolor=gray95](C)(4,4)
   \psline[linestyle=dashed,linewidth=1pt](0,2)(4,2)
   \qdisk(A){3pt}\qdisk(B){3pt}\qdisk(C){3pt}
   \uput[-90](1,0){\footnotesize 0.01}
   \uput[-90](B|,0,0){\footnotesize 100}
   \uput[-90](C|,0,0){\footnotesize 374}
   \uput[180](0,1){\footnotesize 0.006}
   \uput[180](0,0|C){\footnotesize 218}
   \rput(2,-0.75){\footnotesize Temperature (C)}
   \rput{90}(-1.25,2){\footnotesize Pressure (Atm)}
\end{pspicture}

\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list