[pstricks] pstricks-add
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Thu Jul 8 08:25:43 CEST 2004
Alan Ristow wrote:
> 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)
this is no real limitation, because you can nest the
pspicture environment, see example.
> 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)}
will have a look at this.
> 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
sure ... I should take a second and think about the vocabulary
before writing ...
Herbert
\documentclass[a4paper]{article}
\usepackage{filecontents}
\begin{filecontents*}{demo1.dat}
1 99447169
2 110351058
3 123557238
4 138346129
5 145050826
6 160363212
7 174000394
8 183856559
9 189128691
10 197634845
11 213257357
12 216899512
13 230152738
14 224144907
15 247410024
16 261168438
17 252920343
18 326153799
19 319442110
20 310351522
21 381919943
22 438043888
23 357527766
24 603304997
\end{filecontents*}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\usepackage{pst-key}
\usepackage[margin=1.75cm]{geometry}
\pagestyle{empty}
\parindent=0pt
\begin{document}
\enlargethispage{1cm}
\readdata{\data}{demo1.dat}
\pstScalePoints(1,0.000001){}{}
\begin{center}
\psframebox[linecolor=red,linestyle=dashed]{%
\psgraph%
[axesstyle=frame, ticklines=all,ylabelFactor=$\cdot 10^6$,%
Dx=5, Dy= 100](-1,25)(0,750){10cm}{8cm} % parameters
\listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
\endpsgraph
}
\vspace{1cm}
\psframebox[linecolor=red,linestyle=dashed]{%
\begin{pspicture}(-1,-1)(0.2,8.5)% this seems to be a bug !!!!!
\psgraph%
[axesstyle=frame, ticklines=all,ylabelFactor=$\cdot 10^6$,%
Dx=5, Dy= 100](-1,25)(0,750){10cm}{8cm} % parameters
\listplot[linecolor=red, linewidth=2pt, showpoints=true]{\data}
\endpsgraph
\end{pspicture}
}
\end{center}
\end{document}
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list