미니페이지 텍스트를 중앙에 배치하고 pgf-pie 텍스트를 조정하려면 어떻게 해야 합니까?

미니페이지 텍스트를 중앙에 배치하고 pgf-pie 텍스트를 조정하려면 어떻게 해야 합니까?

나는 미니 페이지를 사용하여 그림을 두 위치로 나누고 있습니다. 왼쪽에는 pgf-pie로 만든 그림이 있는데 큰 텍스트를 외부에 쓸 수 있기를 원하고 텍스트의 경우 중앙에 (이미지를 참조하세요)

예시 이미지

\documentclass[12pt,a4paper]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{pgf-pie}

\begin{document}

\section{example}

\hrule
\begin{figure}[!h]
    \begin{minipage}[b]{0.3\textwidth}
        \caption{Example}\label{fig:ex1}
        \begin{tikzpicture}[scale=0.7]
            \pie[/tikz/nodes={text=white, font=\footnotesize\bfseries},
            text=inside,
            explode={0.1,0.1,0.1,0.1},color={blue!70,cyan!70,red!70,orange!50}]{9.3/Cedro\\rojo, 19.45/Café, 30.4/Cacao, 40.43/Tornillo }
        \end{tikzpicture}
    \end{minipage}\hfill\vrule\hfill
    \begin{minipage}[b]{0.6\textwidth}
        vallis augue. Etiam facilisis. Nunc elementum fermen-
        tum wisi. Aenean placerat. Ut imperdiet, enim sed
        gravida sollicitudin, felis odio placerat quam, ac pul-
        vinar elit purus eget enim. Nunc vitae tortor. Proin
        tempus nibh sit amet nisl. Vivamus quis tortor vitae
        risus porta vehicula.
    \end{minipage}
\end{figure}
\hrule

\end{document}

포럼에서 다른 답변을 확인하는 것을 잊지 마세요. 지원되지 않는 것 같습니다.법정

답변1

  • 이 옵션을 사용하면 [b]미니페이지가 아래쪽 정렬되도록 강제로 적용됩니다. 원하는 것이 아니라면 이 옵션을 사용하지 마세요.

  • 일반 tikz 노드를 사용하여 원형 차트 외부에 텍스트를 수동으로 추가할 수 있습니다.


\documentclass[12pt,a4paper]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{pgf-pie}

\begin{document}

\section{example}

\hrule
\begin{figure}[!h]
    \begin{minipage}{0.45\textwidth}
        \caption{Example}\label{fig:ex1}
        \centering
        \begin{tikzpicture}[scale=0.7]
            \pie[/tikz/nodes={text=white, font=\footnotesize\bfseries},
            text=inside,
            explode={0.1,0.1,0.1,0.1},color={blue!70,cyan!70,red!70,orange!50}]{9.3/, 19.45/Café, 30.4/Cacao, 40.43/Tornillo }
            \node[align=center,font=\footnotesize] at (4.2,0.8) {Cedro\\rojo};
        \end{tikzpicture}%
    \end{minipage}\hfill\vrule\hfill
    \begin{minipage}{0.5\textwidth}
        vallis augue. Etiam facilisis. Nunc elementum fermen-
        tum wisi. Aenean placerat. Ut imperdiet, enim sed
        gravida sollicitudin, felis odio placerat quam, ac pul-
        vinar elit purus eget enim. Nunc vitae tortor. Proin
        tempus nibh sit amet nisl. Vivamus quis tortor vitae
        risus porta vehicula.
    \end{minipage}%
\end{figure}
\hrule

\end{document}

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

관련 정보