Help on pstricks (and bug in "The LaTeX Graphics Companion"?)

Denis Girou Denis.Girou at idris.fr
Wed Dec 22 20:24:17 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.
-----------------------------------------------------------------------------

>>>>> "Antonio.Leitao" == Antonio Leitao <aml at gia.ist.utl.pt> writes:

    Antonio.Leitao> I'm trying to plot some data using pstricks.  So far, I'm using the
    Antonio.Leitao> data plotting functions available.  Unfortunately, the axes are
    Antonio.Leitao> labelled automatically by pstricks, and I would like to have some
    Antonio.Leitao> control over that.

  Antonio Leitao remind me that if, in my previous answer, I give some general
hints which allow also some sophisticated management, in the general and
standard cases, which are obviously the great majority, it is easier to use
the hooks given by PSTricks to format the labels.

  So, the next second example is simplest and more natural than the first one.

  P.S. * When some array manipulation macros are used inside a graphic (inside
a "pspicture" environment), as Antonio Leitao has done, we could have unwanted
moves. This was due to a spurious blank in the \get at max@count macro of
`arrayjob'. Investigating this point further, I found two other spurious
blanks in this file. I update it on
http://www.tug.org/applications/PSTricks/macros/arrayjob.sty

       * As Rolf Niepraschk tell me, it would really be better if this small
package can be officially diffused and put on CTAN. I just had asked to
Zhuhan Jiang the authorization to do it. These macros are completely unknown,
but as far as I know they are the most evoluted for this goal (for instance,
Stephan von Bechtolsheim give also such macros in one of his books, but they
are limited to mono-dimensional arrays). And these macros could also be used
to build some common data structures used in classical programming languages,
like linked lists and trees, allowing complex management of data.

\documentclass[a4paper]{article}

\usepackage{arrayjob}
\usepackage{pst-plot}

\setlength{\parindent}{0cm}

\pagestyle{empty}

\begin{document}

\newarray{\Months}
\readarray{Months}{January & February & Mars & April & May & June &
                   July & August & September & October & November & December}

\newarray{\Levels}
\readarray{Levels}{Low & Medium & High}

\psset{unit=1.1}

\begin{pspicture}(-0.5,-0.5)(13,4)
  \psaxes[labels=y]{->}(13,4)
  \multido{\iMonth=1+1}{12}{%
    \checkMonths(\iMonth)%
    \rput[B](\iMonth,-0.3){\tiny\cachedata}}
\end{pspicture}

\renewcommand{\pshlabel}[1]{{\checkMonths(#1)\tiny\cachedata}}
\begin{pspicture}(-0.5,-0.5)(13,4)
  \psaxes[showorigin=false]{->}(13,4)
\end{pspicture}

\renewcommand{\psvlabel}[1]{{\checkLevels(#1)\tiny\cachedata}}
\begin{pspicture}(-0.5,-0.5)(13,4)
  \psaxes[showorigin=false]{->}(13,4)
\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