Problem with linewidth in pstricks v. 97

Denis Girou Denis.Girou at idris.fr
Tue Jul 20 21:35:26 CEST 1999


-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

The following message is a courtesy copy of an article
that has been posted to comp.text.tex as well.

>>>>> "Rafal.Podeszwa" == Rafal Podeszwa <poszwa at tiger.chem.uw.edu.pl> writes:

    Rafal.Podeszwa>   I created a plot using gnuplot with pstricks driver and wanted to make
    Rafal.Podeszwa> the lines in dots thicker. I used \psset{linewidth=...} but it didn't
    Rafal.Podeszwa> work. To test it I made a simple LaTeX code:

    Rafal.Podeszwa> \documentclass[a4paper]{article}
    Rafal.Podeszwa> \usepackage{pstricks}
    Rafal.Podeszwa> \pagestyle{empty}
    Rafal.Podeszwa> \begin{document}
    Rafal.Podeszwa> \begin{pspicture}(0,0)(10,10)
    Rafal.Podeszwa> \psset{linewidth=1pt,linestyle=solid}\psline(0,0)(10,10)
    Rafal.Podeszwa> \psset{linewidth=8pt, dotstyle=+, dotangle=45, dotsize=20pt}\psdots(5,5)
    Rafal.Podeszwa> \end{pspicture}
    Rafal.Podeszwa> \end{document}

    Rafal.Podeszwa> It didn't work correctly using the latest pstricks package from CTAN (v.
    Rafal.Podeszwa> 97 patch) and the version 93a/b-97 patch 3 from my tetex 0.9 distribution

  This is not the current version (which is "patch 10"), but in any case this
will not change the situation that you describe.

    Rafal.Podeszwa> in RedHat 5.2 which I use. The cross should be thick (8pt) but it didn't.
    Rafal.Podeszwa> I checked the same code with a very old version of pstricks (v. 0.93a) and
    Rafal.Podeszwa> it works excellent (the cross was thick enough).
    Rafal.Podeszwa>    I could use the old pstricks package but newer gnuplot programs create
    Rafal.Podeszwa> pstricks code which is incompatible with it. Old versions of gnuplot make
    Rafal.Podeszwa> compatible code but I got used to the new one in which corrections like
    Rafal.Podeszwa> line width change can be made globally in one place only.
    Rafal.Podeszwa>   Has anyone got the same problem? Maybe it is not only the problem of
    Rafal.Podeszwa> pstricks? Or it has a bug?

  I'm afraid that you must rather consider it as a feature... This change
of behaviour is rather old (1994) and was introduced by Timothy van Zandt
in the `pst-beta' package made available at this time. All this new code was
introduced in the PSTricks 97 distribution, and the rewritted code of the
version 93 was of course replaced.

  All the management of dots (\psdots, dotstyle and the new \psdot macro)
was drastically changed. In version 0.93, dots were build as small PSTricks
objects, which explain that they obey to parameters like "linewidth".
In `pst-beta' (and later PST 97), this was replaced by an extraction of
a character in a PostScript font. So, you can still change the size of it
by the "dotscale" and "dotsize" parameters, but you can't change it design any
more (which could be considered as an unexpected manipulation).

  So in your case, I see only two possibilities: ever you could be satisfied
to use the bold version of your symbol which is "B+" (this is undocumented but
some characters also exist in a bold font version: you can access to B+, Bo,
B|, Btriangle, Bsquare, Bpentagon and Basterisk) or ever, you restore
temporarily a definition of a cross in the PSTricks way, using the old code.


\documentclass[a4paper]{article}

\usepackage{pstricks}

\pagestyle{empty}

\begin{document}

\psset{dotstyle=+,dotangle=45,dotsize=20pt}

\begin{pspicture}(3,3)
  \psline[linewidth=1pt](3,3)
  \psdots(0,0)(1,1)(2,2)(3,3)
\end{pspicture}
\hfill
\begin{pspicture}(3,3)
  \psline[linewidth=1pt](3,3)
  \psdots[dotstyle=B+](0,0)(1,1)(2,2)(3,3)
\end{pspicture}
\hfill
%
\makeatletter
\def\pst at gdot#1{/Dot { gsave T \psk at dotangle \psk at dotscale #1 grestore } def }
\@namedef{psds at +}{%
/DS DS 1.253 mul def
\pst at gdot{DS 0 moveto DS neg 0 L stroke 0 DS moveto 0 DS neg L stroke}}
\makeatother
%
\begin{pspicture}(3,3)
  \psline[linewidth=1pt](3,3)
  \psdot(0,0)
  \psdot[linewidth=2pt](1,1)
  \psdot[linewidth=4pt](2,2)
  \psdot[linewidth=8pt](3,3)
\end{pspicture}

\end{document}

Denis Girou
-- 
--------------------------------------------------------------------------
Institut du Développement et des Ressources en Informatique Scientifique |
Centre National de la Recherche Scientifique                             |
Bâtiment 506 - B.P. 167 - 91403 Orsay Cedex - France                     |
--------------------------------------------------------------------------

-----------------------------------------------------------------------------
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