title: Control font size in graphics in LaTeX when scaling in minipage/subfig?
body: <p>I am using pgf/tikz graphics and I'm wondering how one can control the scaling of font sizes in the graphics when using them in minipage/subfig environments?</p>
  
  <p>Is there a way to manually set a permanent font size for pgf/tikz graphics or in latex in general so as to make font sizing invariant to scaling?</p>
  
  <p><em>Ideally I'd like to be able to manually specify a font size per graphic or for all graphics or subfig/minipage environments?</em></p>
  
  <p>Here is an example of the usage as suggested. Thanks for the help.</p>
  
  <pre><code>\begin{figure}[h]
  \centering
  \subfloat[Graph 1]{
      \begin{minipage}[h]{0.7\linewidth}
          \centering\beginpgfgraphicnamed{graph1}
          \input{graph1.tex}
          \endpgfgraphicnamed
          \label{fig:graph1}
      \end{minipage}}
  \hspace{5pt}
  \subfloat[Graph 2]{
      \begin{minipage}[h]{0.5\linewidth}
          \centering\beginpgfgraphicnamed{graph2}
          \input{graph2.tex}
          \endpgfgraphicnamed
          \label{fig:graph2}
      \end{minipage}}
  \subfloat[Graph 3]{
      \begin{minipage}[h]{0.5\linewidth}
          \centering\beginpgfgraphicnamed{graph3}
          \input{graph3.tex}
          \endpgfgraphicnamed
          \label{fig:graph3}
      \end{minipage}}
  \caption{Three Graphs}
  \end{figure}
  </code></pre>
  
  <p>Perhaps outside of minipage/subfig I can use the suggestions from the other posting to make the font large since the graphic is scaled with the page width? What I was going for in the example was the first image on it's own, larger, and then two smallimages right below side by side with their own captions in one figure.</p>
  
  <p>I saw some R tags in your profile Mica. The graphics are generated using tikzDevice and are picked up in my latex doc.</p>
  
  <p>So I'm generating the files without the tikzpicture environment so that I can manually set options there myself. When I use the <code>\begin{tikzpicture} \end{tikzpicture}</code> I get the error <em>"Dimension too large I can't work with sizes bigger than about 19 feet. Continue and I'll use the largest value I can."</em>. I need to use <code>\beginpgfgraphicnamed{} .. \endpgfgraphicnamed{}</code> to get it to work? Not sure what the impact is exactly.</p>
  
  <p><strong>Here is a sample of the auto-generated file:</strong></p>
  
  <pre><code>\begin{scope}
  \path[clip] (  0.00,  0.00) rectangle (794.97,614.29);
  \definecolor[named]{drawColor}{rgb}{0.13,0.76,0.43}
  \definecolor[named]{fillColor}{rgb}{0.31,0.94,0.66}
  \end{scope}
  \begin{scope}
  \path[clip] (  0.00,  0.00) rectangle (794.97,614.29);
  \definecolor[named]{drawColor}{rgb}{0.13,0.76,0.43}
  \definecolor[named]{fillColor}{rgb}{0.31,0.94,0.66}
  \end{scope}
  </code></pre>
  
  <p>........</p>
  
  <pre><code>\begin{scope}
  \path[clip] (  0.00,  0.00) rectangle (794.97,614.29);
  \definecolor[named]{drawColor}{rgb}{0.13,0.76,0.43}
  \definecolor[named]{fillColor}{rgb}{0.31,0.94,0.66}
  \definecolor[named]{fillColor}{rgb}{1.00,1.00,1.00}
  
  \draw[fill=fillColor,draw opacity=0.00,] (  0.00,  0.00) rectangle (794.97,614.29);
  \end{scope}
  </code></pre>
  
  <p>........</p>
  
  <pre><code>\begin{scope}
  \path[clip] (  0.00,  0.00) rectangle (794.97,614.29);
  \definecolor[named]{drawColor}{rgb}{0.13,0.76,0.43}
  \definecolor[named]{fillColor}{rgb}{0.31,0.94,0.66}
  \definecolor[named]{drawColor}{rgb}{0.00,0.00,0.00}
  
  \node[rotate= 90.00,color=drawColor,anchor=base,inner sep=0pt, outer sep=0pt, scale=  1.00] at ( 15.92,310.59) {Mackenzie Net Sales};
  \end{scope}
  \begin{scope}
  \path[clip] (  0.00,  0.00) rectangle (794.97,614.29);
  \definecolor[named]{drawColor}{rgb}{0.13,0.76,0.43}
  \definecolor[named]{fillColor}{rgb}{0.31,0.94,0.66}
  \end{scope}
  </code></pre>
  
  <p>Hopefully that is helpful, over all the file is ~1,000 lines so I tried to cut out a representation of the unique bits. Please let me know if you need anything else.</p>
  
  <p>Many thanks,</p>
  
  <p>Jay</p>