[pstricks] define parameters (english)
Carsten Vogel
texnicer at web.de
Wed Oct 19 09:05:51 CEST 2011
Am 19.10.2011 08:36, schrieb Carsten Vogel:
> Am 18.10.2011 19:52, schrieb Doris Behrendt:
>
>
> Ich vermute Du hast das gleiche Problem wie ich, dass insbesondere die
> "ticks" für untere Grenzen bei pspicture*-Umgebungen unglücklich
> abgeschnitten werden, generell unansehnlich sind.
>
> Warum aber xmax/ymax beschneiden?
>
> Meine Lösung basiert auf der Lektüre von "Lass doch LaTeX rechnen!" von
> Bernd Kosubek: http://anamorphose.de/rechnen.pdf
>
> Zwar werde ich sicherlich korrigiert werden und keinen Preis in der
> B-Note gewinnen, aber man gebe LaTeX/PStricks einfach, was es verlangt.
>
Pardon me, messing up the language policy.
This is a rough translation:
I assume the problem's origin in usage of psaxes and pspicture*
simultaneously. This leads to a cut off lower boundary label. Since I
encountered this effect also several times, I red (German) article
"http://anamorphose.de/rechnen.pdf" on "LaTeX calculus".
My approach is to add 0.001 (psunits) to the lower boundaries values so
the "lowest" label is omitted.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage{pstricks}
\usepackage{pst-plot,pst-func}
\usepackage{pstricks-add}
\newcommand{\setPspictureDimen}[4]{%
\def\xmin{#1\psunit}%
\def\xmax{#2\psunit}%
\def\ymin{#3\psunit}%
\def\ymax{#4\psunit}%
\newlength{\xminAxis}\xminAxis=\xmin \advance\xminAxis by .001\psunit
\newlength{\yminAxis}\yminAxis=\ymin \advance\yminAxis by .001\psunit
} %\setPspictureDimen
\begin{document}
% [x_min,x_max,y_min,y_max]
\setPspictureDimen{-4}{4}{-4}{4}
\begin{pspicture*}(\xmin,\ymin)(\xmax,\ymax)
\psframe[linecolor=red,linestyle=dashed](\xmin,\ymin)(\xmax,\ymax)
\psaxes{->}(0,0)(\xminAxis,\yminAxis)(\xmax,\ymax)
\end{pspicture*}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
More information about the PSTricks
mailing list