Dieter Britz schrieb:
> Dieter Britz wrote:
>
>> Christoph Bersch wrote:
>>
>>> Hmm, why do you want them in italic? Even LaTeX uses an upright symbol
>>> when you type $\Gamma$.
>>> If you still want it italic, you must find a font that has such an
>>> italic \Gamma (serif or sansserif?) and that fits your other font used
>>> for the axes. The standard Symbol font only has an upright \Gamma.
>>> Then you can include the font with fontfile 'font.pfb' and use it.
>>>
>>> Christoph
>> OK, you are right about $\Gamma$. But $\theta$ is italic. I thought
>> that it is possible to use LaTeX-like strings in gnuplot. I also have
>> a couple of other symbols, that I want italicised, that LaTeX does
>> like that.
>>
>> So, if the only way is to use this font.pfb, how do I do that? And
>> will that then also apply to the axis numbers?
>>
>> I attach the picture in which I want the axis labels in LaTeX maths
>> font (i.e. italicised) - except \Gamma, it seems.
>
> Sorry, that didn't work. Ignore the bit about an attachment.
It did work :-)
When you include other fontfiles you can use them for the whole plot.
Another, probably better, way is to use the epslatex terminal. Then you
can typeset everything with LaTeX-like strings (this is probably what
you were looking for).
To give you some examples:
set terminal epslatex standalone
set output "ex-file.tex"
set xlabel "$x$"
set ylabel "$\\sin(x)$"
set xrange[-pi:pi]
set xtics ("$-\\pi$" -pi, "0" 0, "$\\pi$" pi)
plot sin(x) t ''
Then you must run
gnuplot ex-file.gp && latex ex-file.gp && dvips ex-file.dvi
Then, every string is typeset using the roman Computer-Modern fonts. But
with the 'header' option you can add any package and command you want.
In my opinion, all labels should still be typeset in a 'sans-serif' font
which you can get as follows
set terminal epslatex standalone header \
"\\usepackage[T1]{fontenc}\n\\usepackage{cmbright}\\renewcommand{\\familydefault}{\\sfdefault}"
set output "plotsin.tex"
set xlabel "$x$"
set ylabel "$\\sin(x)$"
set xrange[-pi:pi]
set xtics ("$-\\pi$" -pi, "0" 0, "$\\pi$" pi)
plot sin(x) t ''
The cmbright package is needed, because the CM-Super fonts do not have a
sans-serif math font (if you omit this part in the header string, all
numbers will be sans-serif, but the 'pi' in the labels and the x- and
y-labels will be roman)
Hope that helps you :-)
Christoph


|