[pstricks] Using names for point coordinates

j.romildo at gmail.com j.romildo at gmail.com
Sun Aug 6 12:24:00 CEST 2006


Hello.

I am new to pstricks and I am using it to draw some graphics on my
thesis.

I am looking for a way to bind names to point coordinates and use those
names instead of the direct coordinates. These way updating some
coordinates would be much easier: just change the binding. Currently if
I need to change a coordinate, I have to look at every command using
that coordinate and make the change there.

For instance, in the pspicture envirenment below

  \begin{pspicture}(0,0)(10,10)
    \psdots(5.2,3.4) \uput[45](5.2,3.4){Base}
  \end{pspicture}

I would like to bind a name to the coordinate (5.2,3.4) and use this
name on the psdots and uput commands. If later on I decide to change the
coodinates, the change would occur just in one place: the
binding. Currently I would have to change every occurrence of the
coordinate pair. So I would like to be able to write something like

  \begin{pspicture}(0,0)(10,10)
    \defcoord(5.2,3.4){base}
    \psdots(base) \uput[45](base){Base}
  \end{pspicture}

Regards,

Romildo



More information about the PSTricks mailing list