Sans Serif-Font in Tikz-Diagrams

View: New views
2 Messages — Rating Filter:   Alert me  

Sans Serif-Font in Tikz-Diagrams

by Uwe Röther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
after two days of searching, reading and cursing I am hoping, that this
forum can help me.
I want to use a sans-serif font in a tikz-picture but i can't change the
standard-font of the y tick labels.
What can I do?

Here the diagram so far (without the many trial-error-tags).

\documentclass[12pt, DIV9, oneside, openany, noonelinecaption]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{ae,aecompl}
\usepackage{palatino}
\usepackage{threeparttable}
\usepackage{pgfplots}%zum Erstellen von Diagrammen mit pgf und TikZ

\begin{document}
Bla Bbla \pgfplotsset{every axis legend/.append style={ at={(0.5,0.01)},
anchor=south},
font=\small}
\begin{tikzpicture}[font=\sf\small]
\begin{axis}
[ xlabel=RF, ylabel=UZ, ymin=1.5, ymax=5.5, enlargelimits=false,
xtick=\empty, x=2.5cm,
xmin=0.5, xmax=2.5, extra x ticks={1,2}, extra x tick labels={T1, T2},
tickpos=left ]
\addplot+[sharp plot, dotted, mark=*] coordinates {(1,3.86) (2,2.14)};
\addplot+[sharp
plot, color= red, mark=triangle] coordinates {(1,2.60) (2,5.10)};
\legend{\tiny{s-h},
\tiny{h-s}}
\end{axis}
\end{tikzpicture}
\end{document}

Thanx in advance.
Uwe


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

Parent Message unknown Re: Sans Serif-Font in Tikz-Diagrams

by Christian Feuersaenger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Uwe,

If I understood right, your question has two aspects: first: the sans-serif font and second: changing fonts for tick labels. Is that right?

Concerning the first point, how to use sans-serif fonts for your y tick labels:
the default tick labels are always typeset in math mode. Maybe your font does not apply to math mode?
I took one example from
  http://www.tug.dk/FontCatalogue/palatino/,
namely
\usepackage[sc]{mathpazo}
which changes the math fonts and applies to the tick labels as well.

Concerning the second question, how to apply font changes only to tick labels:
Does something like
x tick label style={font={\it\Huge}}
or
y tick label style={font={sf\small}}
help you?

But I am not sure how to configure this \usepackage{mathpazo} such that it doesn't apply to *all* math formulars.

Christian

--
Christian Feuersaenger
Institut fuer Numerische Simulation
Rheinische Friedrich-Wilhelms Universitaet Bonn
Wegelerstrasse 6
D-53115 Bonn
Germany

Tel:  +49 228 733848
URL:  http://wissrech.ins.uni-bonn.de/people/feuersaenger.html

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users