Re: [Pgfplots-features] Scaling (all) pictures with legends
Brought to you by:
cfeuersaenger,
ludewich
From: Denis B. <dbi...@wa...> - 2011-06-23 20:38:18
|
Le jeudi 23/06/11 à 21h17, Christian Feuersaenger <cfe...@go...> a écrit : > Dear Denis, Dear Christian, > the problem is caused by the fact that pgfplots internally opens a > *second* tikzpicture... and the every picture style is applied twice. I see. > I am not sure if this is a bug (it probably is) - anyway, a > work-around could be to try > > \tikzset{ > every picture/.style={scale=0.7,every picture/.style={}}, > } That works like a charm! > This resets the style after it has been applied for the first time, > i.e. nested pictures are not affected. OK. > Alternatively, you could try one of the scaling styles of pgfplots > (like small,tiny, etc) -- which apply only to pgfplots, of course > (but they use the correct fonts). Well, this method doesn't provide enough granularity and doesn't give the expected results (at least for my purpose): \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.3} \newcommand{\myplot}{% \begin{tikzpicture} \begin{axis} \addplot coordinates { (0,0.2) (0.4,0.6) (0.6,0) }; \legend{Blah} \end{axis} \end{tikzpicture} } \begin{document} \myplot \pgfplotsset{small} \myplot \pgfplotsset{footnotesize} \myplot \pgfplotsset{tiny} \myplot \pgfplotsset{normalsize} \tikzset{ every picture/.style={scale=0.7,every picture/.style={}}, } \myplot \end{document} So I'll keep your first suggestion :) > I hope this helps. It was very helpful: thanks a lot! Best regards. -- Denis |