4

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}
ted
  • 3,377
  • 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
  • Not necessary this looks like a bug from an initial guess. – percusse Jul 24 '13 at 22:26
  • @percusse: Thank you for testing with cvs, I just saw that you could not reproduce it. Maybe I will file a bug report by the end of the week if no one is able to awnser/knows. – ted Jul 24 '13 at 22:35
  • 2
    This appears to happen with the PGF 3.0 now in TeX Live, did you file a bug-report? – Torbjørn T. Mar 01 '14 at 23:25
  • Ted, what is the status of this question? – Paul Gessler Jul 03 '14 at 22:30
  • @PaulGessler since I did have to turn in my works and had other pressing issues I do not recall having found a solution, usually I post it back here. While the question has become irrelevant for me a solution still is apreciated. – ted Jul 07 '14 at 17:26
  • @ted did you file a bug report? – Paul Gessler Jan 24 '15 at 16:51
  • @PaulGessler: I do not recall filing(?) a bug report. However, at the time of this question Datavisualization was still experimental if I remember correctly. I am currently very busy, so I do not know when I can retest this with the latest version of Tikz to file a bug report, if it is still an issue. – ted Jan 26 '15 at 14:49
  • 1
    I'm voting to close this question as off-topic because it is a bug report. – Paul Gessler Mar 07 '15 at 21:37

0 Answers0