This is a folloup question to: set fontsize for TikZ figure
As I mentioned I design my pictures around the fontsize, therefore it is good for me if I can set the font size to a particular size for every picture, so changing the font size in the document does not force me to adjust my pictures. While the previous questions works nicely in general, it does not work with tikz-datavisualization.
Try changing the font size passed as parameter to the document class. You will notice that the size of 2 changes, while 1 appears to stay consistent.
I would like to set the font size used for the tick marks globally for the entire document; how can I do that? (Or is there a way to make the previous fix work with the axis of datavisualizations?)
MWE:
\documentclass[12pt]{report}
\usepackage{tikz}
\usetikzlibrary{datavisualization}
\tikzset{every picture/.style={font issue={\fontsize{10}{12}}}, %fix from https://tex.stackexchange.com/questions/122235/set-fontsize-for-tikz-figure, affects for instance the text above the legend ("MyLabel"), but not the labels of the lines in the legend
font issue/.style={execute at begin picture={#1\selectfont}}
}
\begin{document}
\begin{tikzpicture}
\datavisualization [scientific axes=clean,
visualize as line/.list={1,2,4},
x axis={
ticks={
step=2,
minor steps between steps=3,
major ={
also at={1 as [{tick text padding=2ex, style={text height=1.2ex}, node style={font={\it}}}]},
},
},
},
1={label in legend={text=1-way}},
legend={matrix node style={label=MyLabel, xshift=-1ex}}]
data {
%normed on worst time
x, y
1, 2
2, 3
3, 2
};
\end{tikzpicture}
\end{document}
\Huge Abefore the picture... Scratch that now I see it – percusse Jul 24 '13 at 22:17