[pstricks] Problems with psgraph

Herbert Voss LaTeX at zedat.fu-berlin.de
Tue Jul 25 12:36:59 CEST 2006


Martin Sievers wrote:

> I have a problem with the psgraph-environment. The following example
> results in a graph which is too wide. Why is that and how can I get an
> exactly 12cm graph?

a problem with TeX's floating point arithmetic. Use
bigger values for the x-axis.

> Additionally I'd like to change the labelsizes with the labelFontSize
> parameter. When using as an optional parameter for psgraph I always get
> four Font warnings (as there are four, I guess the come from the
> x-Axis): Command \small invalid in math mode. In the documentation
> (chapter 19.1) I can't find an explanation for that, except that there's
> just an psaxes command while the psgraph environment is supposed to pass
> the options to psaxes, so it shouldn't make a difference.

no problem here, see example

Herbert


\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[latin9]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[prologue,dvipsnames,showerrors]{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\listfiles
%
\begin{document}

\begin{pspicture}(0,0)(12,9)
\psset{xunit=0.1,algebraic,Ox=1,Dx=0.05,Dy=5,dx=3cm,
   xAxisLabelPos={7.85,0},xAxisLabel={$d$},yAxisLabel={$n^*$},
   subticks=5,labelFontSize={\footnotesize}}%
%
\begin{psgraph}(10,0)(7.9,0)(10,40){12cm}{9cm}%
\end{psgraph}
\end{pspicture}

\end{document}





More information about the PSTricks mailing list