Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

epslatex and ylabel with index

14 views
Skip to first unread message

Kai Kratt

unread,
Feb 11, 2010, 10:05:29 AM2/11/10
to
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

unread,
Feb 11, 2010, 10:23:25 AM2/11/10
to
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

unread,
Feb 12, 2010, 10:52:30 AM2/12/10
to
thanks that worked!
0 new messages