如何旋转 50,50 分布的饼图,使其垂直划分而不是水平划分?
\documentclass{beamer}
\usepackage{multicol}
\usepackage{datapie}
\usetheme{Warsaw}
\begin{filecontents}{institutes.csv}
Name,Quantity
"ERD", 50
"NERD",50
\end{filecontents}
\begin{filecontents}{population.csv}
Name,Quantity
"ERD", 30
"NERD", 70
\end{filecontents}
\DTLloaddb{institute}{institutes.csv}
\DTLloaddb{population}{population.csv}
\begin{document}
\begin{frame}{Are all the gastroesophageal reflux disease patients same? }
\begin{exampleblock}
{All patients present with heart burn \texttt{and/or} regurgitation of sour fluid in mouth }So all these patients are same with varying severity of symptoms?
\end{exampleblock}
\begin{itemize}
\item upper gastro-intestinal endoscopy
\item 24 hour Ph-metry
\end{itemize}
\end{frame}
%-------------------------------------------------------------------------------------------------------------------------
\begin{frame}{Endoscopy Data}
\begin{columns}{2}
\begin{column}{0.4\textwidth}
\begin{figure}[htbp]
\DTLpiechart{variable=\quantity,outerlabel=\name}{institute}{%
\name=Name,\quantity=Quantity}
\caption{Institute data}
\end{figure}
\end{column}
\begin{column}{0.4\textwidth}
\begin{figure}[htbp]
\DTLpiechart{variable=\quantity,outerlabel=\name}{population}{%
\name=Name,\quantity=Quantity}
\caption{Population data}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案1
您可以通过设置来设置第一段的起始角度start=90
。默认值为 0。
\DTLpiechart{variable=\quantity,outerlabel=\name,start=90,radius=1.8cm,outerratio=1.1}{institute}{%
\name=Name,\quantity=Quantity}
我也在设置中做了一些其他更改,以便图表看起来更好。
\documentclass{beamer}
\usepackage{multicol}
\usepackage{datapie}
\usetheme{Warsaw}
\begin{filecontents}{institutes.csv}
Name,Quantity
"ERD", 50
"NERD",50
\end{filecontents}
\begin{filecontents}{population.csv}
Name,Quantity
"ERD", 30
"NERD", 70
\end{filecontents}
\DTLloaddb{institute}{institutes.csv}
\DTLloaddb{population}{population.csv}
\begin{document}
\begin{frame}{Are all the gastroesophageal reflux disease patients same? }
\begin{exampleblock}
{All patients present with heart burn \texttt{and/or} regurgitation of sour fluid in mouth }So all these patients are same with varying severity of symptoms?
\end{exampleblock}
\begin{itemize}
\item upper gastro-intestinal endoscopy
\item 24 hour Ph-metry
\end{itemize}
\end{frame}
%-------------------------------------------------------------------------------------------------------------------------
\begin{frame}{Endoscopy Data}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{figure}[htbp]
\DTLpiechart{variable=\quantity,outerlabel=\name,start=90,radius=1.8cm,outerratio=1.1}{institute}{%
\name=Name,\quantity=Quantity}
\caption{Institute data}
\end{figure}
\end{column}%
\hfill
\begin{column}{0.5\textwidth}
\begin{figure}[htbp]
\DTLpiechart{variable=\quantity,outerlabel=\name,start=90,radius=1.8cm,outerratio=1.1}{population}{%
\name=Name,\quantity=Quantity}
\caption{Population data}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\end{document}