[Problem] dotscale and dotangle parameters have wrong effects

Denis Girou Denis.Girou at idris.fr
Wed Dec 22 22:51:06 CET 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.
-----------------------------------------------------------------------------

  Etienne Riga <etienne.riga at skynet.be> recently show me that the dotscale
(and dotangle too) parameters have clearly incorrect effects. In fact,
I already made some corrections for the dotscale and dotsize parameters
in 1997, but if dotsize seems correct, my tests at this time failed to show
me that dotscale was incorrectly managed.

  Some new changes are required in pstricks.tex and pst-plot.tex too.

% In pstricks.tex

\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 }%
\else
\let\psk at xdotscale\pst at tempg
\let\psk at ydotscale\pst at temph
% DG/SR modification begin - Dec. 15, 1999
%\fi
%\pst at getdotsize%
%\psset at dotsize{\pst at dimg\space\pst@@dimtonum\pst at dimh}}
\fi}
% DG/SR modification end

\def\newpsfontdot#1[#2]#3#4{%
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx at FontDot
% DG/SR modification begin - Dec. 12, 1999
%/Dot { moveto #4 show } bind def }}
/Dot { moveto gsave \psk at dotscale #4 show grestore } bind def }}
% DG/SR modification end
\def\newpsfontdotH#1[#2]#3#4#5{%
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx at FontDot
/Dot {
moveto
\iftrue
gsave \pst at usecolor\psfillcolor #5 show grestore
\fi
% DG/SR modification begin - Dec. 12, 1999
% #4 show
gsave \psk at dotscale #4 show grestore
% DG/SR modification end
} bind def }}

% In pst-plot.tex

\def\beginqp at dots{%
  \psk at dotsize
  \@nameuse{psds@\psk at dotstyle}
% DG/SR modification begin - Dec. 12, 1999
  Dot }
%\def\doqp at dots{TheDot }
\def\doqp at dots{Dot }
% DG/SR modification end

  To test these modifications without changing the files themselves, take care 
to reexecute the following lines, which define the "real" macro used by the
the dotstyles (this is a two stages process).

\newpsfontdot{*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(b)}
\newpsfontdotH{o}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(c)}{(b)}
\newpsfontdotH{Bo}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(C)}{(b)}
\newpsfontdotH{triangle}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(t)}{(u)}
\newpsfontdotH{Btriangle}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(T)}{(u)}
\newpsfontdot{triangle*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(u)}
\newpsfontdotH{square}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(s)}{(r)}
\newpsfontdotH{Bsquare}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(S)}{(r)}
\newpsfontdot{square*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(r)}
\newpsfontdotH{pentagon}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(p)}{(q)}
\newpsfontdotH{Bpentagon}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(P)}{(q)}
\newpsfontdot{pentagon*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(q)}
% DG/SR modification begin - Mar. 18, 1997
%\newpsfontdot{diamond*}%
%[1.9 0.0 0.0 1.9 -0.4598 -0.70775]{Symbol}{<E0>}
%\newpsfontdot{diamond}%
%[2.3 0.0 0.0 2.3 -0.8533 -0.5336]{Symbol}{<A8>}
\newpsfontdot{diamond}%
[1.9 0.0 0.0 1.9 -0.4598 -0.70775]{Symbol}{<E0>}
\newpsfontdot{diamond*}%
[2.3 0.0 0.0 2.3 -0.8533 -0.5336]{Symbol}{<A8>}
% DG/SR modification end
\newpsfontdot{oplus}%
[1.44928 0.0 0.0 1.44928 -0.562319 -0.478261]{Symbol}{<C5>}
\newpsfontdot{otimes}%
[1.44928 0.0 0.0 1.44928 -0.562319 -0.475362]{Symbol}{<C4>}
\newpsfontdot{x}%
[1.8 0.0 0.0 1.8 -0.495 -0.4788]{Symbol}{<B4>}
\newpsfontdot{+}%
[2.3 0.0 0.0 2.3 -0.6486 -0.5819]{Times-Roman}{<2B>}
\newpsfontdot{asterisk}%
[2.43309 0.0 0.0 2.43309 -0.609489 -1.14477]{Times-Roman}{<2A>}
\newpsfontdot{B+}%
[2.3 0.0 0.0 2.3 -0.6555 -0.5819]{Times-Bold}{<2B>}
\newpsfontdot{Basterisk}%
[2.29358 0.0 0.0 2.29358 -0.576835 -1.08486]{Times-Bold}{<2A>}
\newpsfontdot{|}%
% DG/SR modification begin - Oct. 27, 1997 - Patch 7
%[1.98413 0.0 0.0 1.98413 -0.258929 -0.712302]{Helvetica}{(|)}
[1.98413 0.0 0.0 1.38 -0.258929 -0.5]{Helvetica}{(|)}
% DG/SR modification end
\newpsfontdot{B|}%
% DG/SR modification begin - Oct. 27, 1997 - Patch 7
%[1.98413 0.0 0.0 1.98413 -0.277778 -0.78302]{Helvetica-Bold}{(|)}
[1.98413 0.0 0.0 1.38 -0.277778 -0.5]{Helvetica-Bold}{(|)}
% DG/SR modification end

  The test case given by Etienne Riga was:

------------------------------------------------------------------------------

\input pst-plot

\pspicture(8,13)
\psgrid[subgriddiv=0](8,13)

\psset{dotsize=4pt 2}

\psset{dotscale=1,dotstyle=*}
\psdots(0,0)
\psset{dotscale=1 2}
\psdots(1,0)\psdots(2,0)
\psdots[dotscale=1 3,dotstyle=*](3,0)(4,0)(5,0)
\psdots[dotscale=3 1,dotstyle=*](6,0)(7,0)(8,0)

\psset{dotscale=1,dotstyle=o}
\psdots(0,1)
\psset{dotscale=1 2}
\psdots(1,1)\psdots(2,1)
\psdots[dotscale=1 3,dotstyle=o](3,1)(4,1)(5,1)
\psdots[dotscale=3 1,dotstyle=o](6,1)(7,1)(8,1)
%
\psset{dotscale=1,dotstyle=+}
\psdots(0,2)
\psset{dotscale=1 2}
\psdots(1,2)\psdots(2,2)
\psdots[dotscale=1 3,dotstyle=+](3,2)(4,2)(5,2)
\psdots[dotscale=3 1,dotstyle=+](6,2)(7,2)(8,2)
%
\psset{dotscale=1,dotstyle=triangle}
\psdots(0,3)
\psset{dotscale=1 2}
\psdots(1,3)\psdots(2,3)
\psdots[dotscale=1 3,dotstyle=triangle](3,3)(4,3)(5,3)
\psdots[dotscale=3 1,dotstyle=triangle](6,3)(7,3)(8,3)

\psset{dotscale=1,dotstyle=*}
\psdots(0,4)
\savedata{\mydata}[(1,4) (2,4)]
\dataplot[plotstyle=dots,dotstyle=*,dotscale=1 2]{\mydata}
\savedata{\Mydata}[(3,4)(4,4)(5,4)]
\dataplot[plotstyle=dots,dotstyle=*,dotscale=3 1]{\Mydata}
\savedata{\MyData}[(6,4)(7,4)(8,4)]
\dataplot[plotstyle=dots,dotstyle=*,dotscale=1 3]{\MyData}

\psline[showpoints=true,dotscale=3 1]
(0,5)(1,5)(2,5)(3,5)(4,5)(5,5)(6,5)(7,5)(8,5)

\endpspicture

\bye

------------------------------------------------------------------------------

  P.S. I will integrate the various patches still not on CTAN and update the
distribution in January. I know that I have some drawback. At least there are
three old patches sent only on this list and:
       - the small bug in \psaddtolength shown by Isaiah Shavitt
<shavitt at chemistry.ohio-state.edu>,
       - the correction of the \psspan sent by Michael Sharpe
<msharpe at euclid.UCSD.EDU> since very long time,
       - the complex problem found by Anthony Doggett
<adoggett at students.uiuc.edu> on nodes when two different labels are put on the 
same node connection, when at least one of these labels contain itself some
node connections. Unfortunately, the correction for \naput, \nbput, \tlput,
\trput, \thput and \tvput that I sent on December 3 as patch 10 of `pst-node'
is not correct. Anthony Doggett show me a complex case where there is a side
effect. I succeed to simplify his test case, and clearly see that the problem
is a side effect of my modification, but I have not been able to found
a correct solution up to now. I hope that next year will be more lucky and
productive...

D.G.

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