[pstricks] pstricks about psdot
Germain BOYER
germain.boyer at ac-toulouse.fr
Sat Jan 19 13:36:42 CET 2013
Bonjour,
For me it's difficult to control dotsize and dotscale, so i write two macros \psdotx and \psdotl
%----------------------------------------------------------------------------------------------------------------------------
\newcommand*{\psdotx}[3][0.15cm]{%
\pnode#2{thenode}
\multido{\r=#3+90 , \ra=1+1}{4}{%
\pnode([nodesep=#1,angle=\r]thenode){thenode\ra}
\psline(thenode)(thenode\ra)%
}% fin du \multido
}% fin de \newcommand
%
%----------------------------------------------------------------------------------------------------------------------------
% exemples :
%
% \psset{linewidth=0.25mm}
% \SpecialCoor
% \psdotx[3mm]{(P)}{45}
% \psdotx[0.3]{(P)}{45}
% \psdotx{(1,3)}{30}
% \psdotx{(2;45)}{45}
%
% #1 est la longueur d'une demi-branche (par défaut 0.15 cm)
% #2 est les coordonnées du point
% #3 est l'inclinaison de la première demi-branche de la croix
%
%----------------------------------------------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------------------------------------------
\newcommand*{\psdotl}[3][0.15cm]{%
\pnode#2{thenode}
\multido{\r=#3+90 , \ra=1+1}{2}{%
\pnode([nodesep=#1,angle=\r]thenode){thenode\ra}
\psline(thenode)(thenode\ra)%
}% fin du \multido
}% fin de \newcommand
%
%----------------------------------------------------------------------------------------------------------------------------
% exemples :
%
% \psset{linewidth=0.25mm}
% \SpecialCoor
% \psdotl[3mm]{(P)}{45}
% \psdotl[0.3]{(P)}{45}
% \psdotl{(1,3)}{30}
% \psdotl{(2;45)}{45}
%
% #1 est la longueur d'une demi-branche (par défaut 0.15 cm)
% #2 est les coordonnées du point
% #3 est l'inclinaison de la première demi-branche du trait
%----------------------------------------------------------------------------------------------------------------------------
\documentclass[a4paper,11pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{pstricks}
\usepackage{pst-eucl}
\begin{document}
\psset{unit=0.5cm}
%
\begin{pspicture}(-2,-1)(8,6.2)
%
\psset{gridcolor=gray , gridwidth=0.15mm , gridlabels=0pt , subgriddiv=1}
\psgrid(-2,-1)(8,6)
%
\psset{PointSymbol=none}
%
\pstGeonode(4,1){A}
\pstGeonode(6,2){B}
\pstGeonode(1,5){C}
\pstGeonode(3,4){D}
\pstGeonode(2,1){E}
%
\psset{linewidth=0.35mm}
%
\psdotx[1.25mm]{(A)}{90}
\psdotx[2mm]{(B)}{45}
\psdotx[2mm]{(C)}{60}
\psdotx[2mm]{(D)}{90}
\psdotx[2mm]{(E)}{30}
%
\end{pspicture}
%
\end{document}
%----------------------------------------------------------------------------------------------------------------------------
Is it possible to do \psdotx[dotxlength=2mm,dotxangle=45,linewidth=0.35mm](A)
Is it possible to do
\psset{dotxlength=2mm,dotxangle=45,linewidth=0.35mm}
\psdotsx(A)(B)(C)
and the same for \psdotl
Thanks for your answers.
Germain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20130119/5c792788/attachment.html>
More information about the PSTricks
mailing list