Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 http://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}
share|improve this question
    
The follow-up link is missing –  egreg Jul 24 '13 at 22:12
    
I can't replicate this with the latest CVS version of TikZ (as I suppose you have it too) Add \Huge A before the picture... Scratch that now I see it –  percusse Jul 24 '13 at 22:17
    
@egreg: thanks to percusse it is there now :P. Some day I will learn to write proper english (I hope), till then: Thanks for correcting and teaching. –  ted Jul 24 '13 at 22:18
    
@percusse: I use the build from texample... this might be an issue. I will try to install the CVS version –  ted Jul 24 '13 at 22:23
1  
This appears to happen with the PGF 3.0 now in TeX Live, did you file a bug-report? –  Torbjørn T. Mar 1 at 23:25
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.