원형 차트:글꼴 크기

원형 차트:글꼴 크기

동일한 원 크기를 유지하면서 글꼴 크기를 늘리려면 어떻게 해야 합니까?

\begin{figure}[!h]
\centering
\newcommand{\pieslice}[6][black!10]{ \pieslice[color]{total}{start angle}{end angle}{data value}{label}
 
  \pgfmathparse{#3/#2*360}
  \let\a\pgfmathresult
  \pgfmathparse{#4/#2*360}
  \let\b\pgfmathresult

 
  \pgfmathparse{0.5*\a+0.5*\b}
  \let\midangle\pgfmathresult

  
  \draw[fill=#1] (0,0) -- (\a:1) arc (\a:\b:1) -- cycle;


  \node[label=\midangle:{\tiny#6}] at (\midangle:1) {};

 
  \pgfmathparse{min((\b-\a-10)/110*(-0.3),0)}
  \let\temp\pgfmathresult
  \pgfmathparse{max(\temp,-0.5) + 0.8}
  \let\innerpos\pgfmathresult
  \pgfmathparse{(\b-\a)/3.6} % convert slice size to percentage
  \let\percentage\pgfmathresult
  \node at (\midangle:\innerpos) {\tiny\pgfmathprintnumber[fixed,precision=1]{\percentage}\%};
}

\newcommand{\pie}[2][{{"black!10"}}]{
\pie[{colour palette array}]{{label/value array}}
 
  \pgfmathparse{dim(#1)} % find N of array
  \let\paletteDim\pgfmathresult
  \newcounter{colourIndex}


  \newcounter{total}
  \foreach \val/\name in #2 {
    \addtocounter{total}{\val}
  }

  \newcounter{a}
  \newcounter{b}
  \foreach \val/\name in #2 {
    \setcounter{a}{\value{b}}
    \addtocounter{b}{\val}

  
    \pgfmathparse{#1[\thecolourIndex]}
    \let\colour\pgfmathresult

    \pieslice[\colour]{\thetotal}{\thea}{\theb}{\val}{\name}

    \stepcounter{colourIndex}
    \ifnum \thecolourIndex=\paletteDim \setcounter{colourIndex}{0}\fi
  }
}
\def\palette{{"blue!60","cyan!50","yellow!50","orange!60","red!60",
    "teal!50","brown!50!black!50","purple!50","lime!50!black!30"}}

\begin{tikzpicture}[scale=2.5]
  \pie[\palette]{{ 4/Chemins de fer, 11/Marine, 11/Aviation, 34/Camions,40/Automobiles}}
         
\end{tikzpicture}

\label{f31}
\end{figure}

여기에 이미지 설명을 입력하세요

답변1

컴파일 가능한 MWE 없이 귀하의 질문에 대답하기는 어렵지만 제가 알 수 있는 바에 따르면 다음 줄에서 글꼴 크기를 직접 정의할 수 있습니다.

\node at (\midangle:\innerpos) {\tiny\pgfmathprintnumber[fixed,precision=1]{\percentage}\%};

\tiny다른 것으로 교체해 보셨나요 ? 또는 \normalsize심지어 \footnotesize\Large?

관련 정보