[pstricks] Help with a Phase Diagram

Dougherty, Michael michael.dougherty at swosu.edu
Tue Nov 2 16:01:58 CET 2004


Sorry for what is likely a stupid question, but Herbert, when I latex the file you sent I get lots of errors, the first being 
! LaTeX Error: Unknown option `dvipsnames' for package `pstricks'.
Then it sayes \definecolor is an Undefined control sequence.
Then with the colors all undefined they get spit out as text on the diagram, but the phase diagram itself looks OK.

So I guess I'm missing something that gives me the dvipsnames option for pstricks?

I'm on a Fedora Core 2 installation of Linux.

Though I'm not working on any such thing right now, I don't like when I can't compile the examples (generously) given on the list.  Any help appreciated.

--Mike Dougherty





-----Original Message-----
From: pstricks-bounces at tug.org on behalf of Herbert Voss
Sent: Tue 11/2/2004 12:32 AM
To: pstricks at tug.org
Subject: Re: [pstricks] Help with a Phase Diagram
 
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}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20041102/3bc1c05b/attachment.html 


More information about the PSTricks mailing list