[Problem] \savedata inoperant inside a macro

Denis Girou Denis.Girou at idris.fr
Fri Oct 17 23:34:28 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.
-----------------------------------------------------------------------------

  Ivan Maio <maio at pol88a.polito.it> reported in October the following problem:
in some cases, the curves plotted by a macro like \dataplot are not shown,
even if no error message appear.

  In fact, I saw that the problem is related to the usage of the \savedata
macro. If it is used inside another macro, there are some catcode changes that 
can't be made, and in fact a delimiter is not introduced after each point
defined, so the curve will have at the end only one point, the last one.
It is the reason why nothing is shown later by a macro like \dataplot.

  I haven't found the correction to this bug. Nevertheless, it must be
considered as very minor, as in any cases there is no reason, and more it
seems non logical, to define sets of data inside another macro. So, workaround
is just to use \savedata for itself.

  I just add this problem in the pstricks.bug file for notification.

  My test case is (developing the one transmitted by Ivan):

\documentclass{article}

\usepackage{pst-plot}

\pagestyle{empty}

\begin{document}

\begin{pspicture}(-2,-2)(2,2)
  \savedata{\test}[%
 -1.09 -0.55
 -0.4  -0.1
  0     1.02
  1.28  0.06
  1.51  1.21]
  \dataplot{\test}
  \psaxes{<->}(0,0)(-2,-2)(2,2)
\end{pspicture}

\vspace{1cm}
\psframebox{%
\begin{pspicture}(-2,-2)(2,2)
  \savedata{\test}[%
 -1.09 -0.55
 -0.4  -0.1
  0     1.02
  1.28  0.06
  1.51  1.21]
  \dataplot{\test}
  \psaxes{<->}(0,0)(-2,-2)(2,2)
\end{pspicture}}

\savedata{\test}[%
 -1.09 -0.55
 -0.4  -0.1
  0     1.02
  1.28  0.06
  1.51  1.21]

\vspace{1cm}
\psframebox{%
\begin{pspicture}(-2,-2)(2,2)
  \dataplot{\test}
  \psaxes{<->}(0,0)(-2,-2)(2,2)
\end{pspicture}}

\end{document}

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