plots and dotangle

Denis Girou Denis.Girou at
Fri Oct 17 23:31:29 CEST 1997

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.

    To: pstricks at 
    Subject: plots and dotangle 
    From: Greg Byrd <gbyrd at> 
    Date: Fri, 1 Aug 1997 14:33:56 -0700 (PDT) 

    Greg.Byrd> When I tried to use dotangle to rotate the dots used in a plot,
    Greg.Byrd> the placement of the dots themselves got rotated, rather than
    Greg.Byrd> the symbol used to draw the dot.

    Greg.Byrd> The following example should produce a row of dots above a row
    Greg.Byrd> of dashes.  Instead, it produces a row of dots and a vertical
    Greg.Byrd> column of vertical lines.

    Greg.Byrd> \documentclass{article}
    Greg.Byrd> \usepackage{pstricks,pst-plot}
    Greg.Byrd> \pagestyle{empty}
    Greg.Byrd> \begin{document}
    Greg.Byrd> \begin{pspicture}(8,2)
    Greg.Byrd> \psset{plotstyle=dots,plotpoints=9}
    Greg.Byrd> \psplot[dotstyle=*,dotsize=4pt 0]{0}{8}{1}
    Greg.Byrd> \psplot[dotstyle=|,dotangle=90]{0}{8}{0}
    Greg.Byrd> \end{pspicture}
    Greg.Byrd> \end{document}

    Greg.Byrd> In pst-plot.tex, I found the following correction:

    Greg.Byrd> \def\beginqp at dots{%
    Greg.Byrd>   \psk at dotsize
    Greg.Byrd>   \@nameuse{psds@\psk at dotstyle}
    Greg.Byrd> % Modification Denis GIROU (CNRS/IDRIS - France) - &lt;Denis.Girou at; - 14 Jun. 1996
    Greg.Byrd> %  Dot }
    Greg.Byrd> %\def\doqp at dots{Dot }
    Greg.Byrd> %% SPQR remove the translate after gsave????
    Greg.Byrd> /TheDot { gsave \psk at dotangle \psk at dotscale Dot grestore } def
    Greg.Byrd>   TheDot }
    Greg.Byrd> \def\doqp at dots{TheDot }

    Greg.Byrd> I replaced the modification with the original, and the example
    Greg.Byrd> produced the desired result.  I don't know enough PostScript to figure
    Greg.Byrd> out what's going on -- maybe Denis can remember the motivation behind the
    Greg.Byrd> original modification.

    To: PSTricks mailing list <pstricks at> 
    Subject: Re: A bug in PSTricks 
    From: Denis Girou <Denis.Girou at> 
    Date: Fri, 8 Aug 1997 15:49:54 +0200 

    D.G.>   Nevertheless, all code for dots seems to verify. Greg Byrd
    D.G.> <gbyrd at> report last week on this list another bug with
    D.G.> dotangle parameter usage, in the \psplot macro. Code for dots is used in
    D.G.> various places (showpoint, \psplot, \psdot, \psdots, \dataplot and other
    D.G.> \...plot macros) with several bundles. The change noticed by Greg on the code
    D.G.> of the 0.93a patched 2 version was motivated by a bug reported in June 1996
    D.G.> on dotstyle usage for \fileplot. His correction (to come back to the previous
    D.G.> code) correct the problem, but not other one which can be found. And I also
    D.G.> see in my tests that my previous solution of the problem reported by Ivan
    D.G.> Maio <maio at> on \psdot cause another problem by side effect.
    D.G.> I have found some corrections which in my tests seems to work in all (?!)
    D.G.> situations, but I'm not very pleased with that because it require some small
    D.G.> changes in several macros.

  I apologize to be so late on this problem, even if it is a difficult one...

  Recently I study again these problems related to dots and to dots parameters.
I agree to remove the correction of 0.93a patched 2 version of pst-plot
to come back to 0.93a version.

  * 97/08/04 pst-plot.tex (93a/b-97-patch 2): Using the dotangle parameter
with \psplot produce wrong results
(reported by Greg Byrd <gbyrd at>)

\def\beginqp at dots{%
  \psk at dotsize
  \@nameuse{psds@\psk at dotstyle}
% DG/SR modification begin - Aug. 4, 1997
  Dot }
\def\doqp at dots{Dot }
%/TheDot { gsave \psk at dotangle \psk at dotscale Dot grestore } def
%  TheDot }
%\def\doqp at dots{TheDot }
% DG/SR modification end

  But, as I said at the beginning of August, it doesn't solve all the
problems. We can see on the following test that the dotscale parameter doesn't 
work correctly.








  To solve it, I study again the problem, and found a correction not so huge
than the one I found in August, which required less modifications. First, I
remove the correction introduced in patch 3.

/#3 \psk@@dotangle [#2] \tx at FontDot
/Dot { moveto #4 show } bind def }}
/#3 \psk@@dotangle [#2] \tx at FontDot
/Dot {
gsave \pst at usecolor\psfillcolor #5 show grestore
#4 show
} bind def }}

  And I introduce the following one:

\def\psset at dotscale#1{%
\pst at getscale{#1}\psk at dotscale
\ifx\psk at dotscale\@empty
\def\psk at xdotscale{1 }%
\def\psk at ydotscale{1 }%
\let\psk at xdotscale\pst at tempg
\let\psk at ydotscale\pst at temph
% DG/SR modification begin - Oct. 16, 1997
\pst at getdotsize%
\psset at dotsize{\pst at dimg\space\pst@@dimtonum\pst at dimh}}
%\psset at dotscale{1}
% DG/SR modification end
\def\pst at Getangle#1#2{%
\pst at getangle{#1}\pst at tempg
\def\pst at temph{0. }%
\ifx\pst at tempg\pst at temph
\edef#2{\pst at tempg\space rotate }%
\def\psset at dotangle#1{%
\pst at getangle{#1}\psk@@dotangle
\let\psk at dotangle\@empty
% DG/SR modification begin - Aug. 7, 1997
%\edef\psk at dotangle{\psk@@dotangle rotate }
\edef\psk at dotangle{\psk@@dotangle rotate }%
% DG/SR modification end
\psset at dotangle{0}
\def\pst at getdotsize{%
\pst at dimg=\psk@@@dotsize\pslinewidth
\advance\pst at dimg\psk@@dotsize\p@
\pst at dimh=\psk at ydotscale\pst at dimg
\pst at dimg=\psk at xdotscale\pst at dimg
\divide\pst at dimh 2
\divide\pst at dimg 2\relax}
% DG/SR modification begin - Oct. 16, 1997
\psset at dotscale{1}
% DG/SR modification end

  It appear that it doesn't solve all problems. We can see that for dotstyle=| 
it doesn't work as specified in the Beta documentation page 1. The tbarsize
parameter is inefficient and the size of the bar is not the length expected.
For tbarsize, I think that documentation was not updated. It seems that there
is some dead code for this part (around 30 lines) and that it was rewritted.
So dotsize seems to work also for dotstyle=| .. but doesn't give the correct
lengths. My correction for that is under investigation, as in my installation
it is correct with ghostscript ... and incorrect on printer...






  \psdot[tbarsize=3cm](0,0) % Inefficient


  So, situation is improved, even if it is not yet perfect...


The list interface (subscription, information, access to the archives) is on:
Otherway to unsubscribe, send mail to pstricks-request at
with a blank subject and in body the line unsubscribe <email-address>

More information about the PSTricks mailing list