[pstricks] pstricks-add

Alan Ristow ristow at ece.gatech.edu
Thu Jul 8 02:11:42 CEST 2004


On Wed, 07 Jul 2004 08:27:27 +0200, Herbert Voss
<Herbert.Voss at alumni.TU-Berlin.DE> wrote:

>Alan Ristow wrote:
>
>> Anyway, as an addendum to my last response, I spoke too soon about
>> plotting more than one data set on the same axes with \psgraph. Since it
>> contains a pspicture environment, only one dataset may be plotted at a
>> time. This is a serious weakness, IMO. Fortunately, the problem seems to
>
>yes, that is a good point.
>I changed the \psgraph macro to an environment

Okay, I've tried this out and I like it ... mostly. It is quite
intuitive, but it still wraps a pspicture environment. Also, I have
problems with the xAxesLabel and yAxesLabel keys. First things first....

The reason I dislike having psgraph wrap a pspicture environment is that
it makes controlling the boundaries of the pspicture environment
difficult. Using psgraph as-is in a figure environment results in a
figure caption that is far too close to the graph, for example. I
regularly add additional space around my charts for various reasons, but
psgraph makes that difficult. I would like to be able to say, for
example:

	\begin{pspicture}(-30pt,12)(-36pt,7)
		\begin{psgraph}(0,12)(0,7)
			...

But with psgraph as written I have no choice but to have:

	\begin{pspicture}(0,12)(0,7)

And if I try to use lengths for xmin and ymin I get an error. Perhaps a
reasonable compromise would be to leave the pspicture environment in
psgraph, but set keys for overriding xmin, xmax, ymin, and ymax in the
pspicture environment.

Next issue. The xAxesLabel and yAxesLabel keys don't seem to work with
certain macros. For example,

	\usepackage{amsmath}
	\newcommand*{\Wp}{\ensuremath{W_\text{p}}}
		...
	\psset{xAxesLabel=Something (\Wp)}

gives me an "undefined control sequence" error, whereas

	\newcommand*{\USD}{\$}
	\psset{xAxesLabel=Something (\USD)}

gives me no trouble at all. It's easy enough to work around this with
\uput, but only if I comment out the \begin{pspicture} and
\end{pspicture} bits of the psgraph environment -- otherwise, the
\uput'ed x-axis label overlaps the figure caption (assuming the psgraph
is in a figure environment).

Finally, a minor issue that might not even be worth addressing: The word
"axes" is plural, with "axis" as its singular. Thus, your new \psaxes
and psgraph keys would be more grammatically correct if they had names
like xAxisLabel, yAxisLabel, xAxis, and yAxis, but xyAxes. Yes, I'm
nitpicking, and as I said, it might not even be worth addressing....

Alan




More information about the PSTricks mailing list