Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

epslatex and ylabel with index

14 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Kai Kratt

ungelesen,
11.02.2010, 10:05:2911.02.10
an
Dear group,

I noticed problem with epslatex and ylabels with indices. If the index
of an ylabel is just a single letter, everything is fine. If it is
more than one letter, the canvas size reduces extremely. The situation
gets worse with text as index and "more" worse with mathrm and
multiple letter. Has anybody an idea?

### gnuplot 4.2 rc4
set terminal epslatex
set output "myFileName.tex"
set xrange[0:4]
set xtics ("$t_1$" 1, "$t_2$" 3)
set xlabel "Time $t$ (a.\\,u.)"
set yrange[0:4]
set ytics ("$p_1$" 1, "$p_2$" 3) # everything is fine
#set ytics ("$p_{12}$" 1, "$p_2$" 3) # worse
#set ytics ("$p_{\\text{a}}$" 1, "$p_2$" 3) # more worse
#set ytics ("$p_{\\text{aa}}$" 1, "$p_2$" 3) # really bad
#set ytics ("$p_{\\mathrm{a}}$" 1, "$p_2$" 3) # horrible
set ylabel "Position $p(t)$ (a.\\,u.)"
f(x) = x
plot f(x) notitle
set out
###

I include the file into latex with
\begin{figure}[htbp]
\centering
\input{myFileName}
\caption{Ideal move path for a frictionless mass.}
\label{fig:movePath}
\end{figure

Thanks for your help!

Kai

Stefan Nowy

ungelesen,
11.02.2010, 10:23:2511.02.10
an
Kai Kratt wrote:
> Dear group,
>
> I noticed problem with epslatex and ylabels with indices. If the index
> of an ylabel is just a single letter, everything is fine. If it is
> more than one letter, the canvas size reduces extremely. The situation
> gets worse with text as index and "more" worse with mathrm and
> multiple letter. Has anybody an idea?

I encountered the same problem.
To avoid it, I manually set the margins so something like

set lmargin 7
set bmargin 3
set rmargin 1
set tmargin 1

With this, the axis are always at the same position for all my graphs,
and do not depend on the tic-labels. BTW: I also set the xlabel and
ylabel manually so that these are always at the same position.

HTH
Stefan

Kai Kratt

ungelesen,
12.02.2010, 10:52:3012.02.10
an
thanks that worked!
0 neue Nachrichten