Graphsics with pstricks

Denis Girou Denis.Girou at idris.fr
Wed Oct 28 23:09:43 CET 1998


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Wilman.Brito" == Wilman Brito <wbrito at ciens.ula.ve> writes:

    Wilman.Brito> I made a graph of a arbitrary function defined by parts using the pscurve
    Wilman.Brito> command of  Pstricks. I want to know if it is possible that said graph a
    Wilman.Brito> dotted line it begins,  continue with one continuous and finish with
    Wilman.Brito> another.
    Wilman.Brito> The idea is that if I have the graph of a function anyone, I would like
    Wilman.Brito> that the graph of  its restriction was shown, in an only drawing, with a
    Wilman.Brito> different line.
    Wilman.Brito> Of  being that possible, how is it made?

  You can't do it. \pscurve use the OpenCurve PostScript macro, which use
"global" attributes for the line.

  A workaround for most cases is to redraw parts of lines which must have
different attributes (it is a general technic with PostScript to redraw
several times the same area of a figure in different ways, as only the last
effect will be shown). For that, the \psecurve macro is useful. But this work
only for groups of at least three points (so at least two segments by two
segments), and the first and last segments must have the same attributes
(or you must write two intermediate macros between \pscurve and \psecurve,
which doesn't draw the first or last point, respectively).

  Look at the following example:

\documentclass{article}

\usepackage{pstricks}

\pagestyle{empty}

\begin{document}

\psset{linewidth=1mm}

\begin{pspicture}(4,2)
  \pscurve[arrows=<->](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
\end{pspicture}

\begin{pspicture}(4,2)
  \pscurve[arrows=<->](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
  \psecurve[linecolor=red](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
\end{pspicture}

\begin{pspicture}(4,2)
  \pscurve[arrows=<->](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
  \psecurve[linecolor=white](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
  \psecurve[linestyle=dotted](0,1.3)(0.7,1.8)(3.3,0.5)(4,1.6)(0.4,0.4)
\end{pspicture}

\begin{pspicture}(4,3)
  \pscurve[arrows=<->](0,2)(1,0.5)(1.5,2.5)(3,2)(2,2)(4,3)(3,1)(2,0.3)(0,0)
\end{pspicture}

\begin{pspicture}(4,3)
  \pscurve[arrows=<->](0,2)(1,0.5)(1.5,2.5)(3,2)(2,2)(4,3)(3,1)(2,0.3)(0,0)
  \psecurve[linecolor=white](3,2)(2,2)(4,3)(3,1)(2,0.3)
  \psecurve[linestyle=dotted](3,2)(2,2)(4,3)(3,1)(2,0.3)
\end{pspicture}

\begin{pspicture}(4,3)
  \pscurve[arrows=<->,linestyle=dotted]
          (0,2)(1,0.5)(1.5,2.5)(3,2)(2,2)(4,3)(3,1)(2,0.3)(0,0)
  \psecurve[linecolor=white](0,2)(1,0.5)(1.5,2.5)(3,2)(2,2)
  \psecurve(0,2)(1,0.5)(1.5,2.5)(3,2)(2,2)
  \psecurve[linecolor=white](1.5,2.5)(3,2)(2,2)(4,3)(3,1)(2,0.3)
  \psecurve[linestyle=dashed](1.5,2.5)(3,2)(2,2)(4,3)(3,1)(2,0.3)
\end{pspicture}

\end{document}

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list