Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Gnuplot interactive function plotter > Re: Italic labe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 8 Topic 3536 of 3637
Post > Topic >>

Re: Italic labels

by Christoph Bersch <usenet@[EMAIL PROTECTED] > Oct 9, 2008 at 11:44 AM

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
 




 8 Posts in Topic:
Italic labels
Dieter Britz <oldnob@[  2008-10-08 16:29:31 
Re: Italic labels
sfeam <sfeam@[EMAIL PR  2008-10-08 08:42:14 
Re: Italic labels
Dieter Britz <oldnob@[  2008-10-09 09:41:02 
Re: Italic labels
Christoph Bersch <usen  2008-10-09 10:03:07 
Re: Italic labels
Dieter Britz <oldnob@[  2008-10-09 11:09:10 
Re: Italic labels
Christoph Bersch <usen  2008-10-09 11:44:59 
Re: Italic labels
Dieter Britz <oldnob@[  2008-10-10 14:08:02 
Re: Italic labels
Christoph Bersch <usen  2008-10-10 20:57:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:41:21 CST 2008.