如何在甘特图左侧放置标签?

如何在甘特图左侧放置标签?
\begin{figure}[tbp]

\begin {center}
\begin{ganttchart}[y unit title=0.4cm,
y unit chart=.5cm,
vgrid,hgrid, 
title label anchor/.style={below=-1.6ex},
title left shift=.05,
title right shift=-.05,
title height=1,
bar/.style={fill=gray!50},
incomplete/.style={fill=white},
progress label text={},
bar height=0.7,
group right shift=0,
group top shift=.6,
group height=.3,
group peaks width={.2},
     inline]{1}{13}

%labels
\
%tasks
\gantttitle{June}{4} \gantttitle{July}{5} \gantttitle{August}{4}\\
\gantttitlelist{1,...,4}{1} \gantttitlelist{1,...,5}{1}\gantttitlelist{1,...,4}{1}\\

\ganttbar{Dissertation Outline}{1}{2} \\
\ganttbar{Research Proposal Submission}{3}{3} \\
\ganttbar{Research Proposal Approval}{4}{4}\\
\ganttbar{Literature Review}{4}{5} \\
\ganttbar{Model Specification}{6}{11} \\
\ganttbar{Data Collection}{6}{11} \\
\ganttbar{Results}{12}{13} \\
\ganttbar{Analysis}{12}{13}
\end{ganttchart}
\end{center}
\caption{Gantt Chart}
\end{figure}

答案1

ganttchart问题中的选项指定(inline作为最后一个选项)。如果没有该选项,标签将位于左侧。

梅威瑟:

\documentclass{article}
\usepackage{pgfgantt}
\begin{document}

\begin{ganttchart}[y unit title=0.4cm,
y unit chart=.5cm,
vgrid,hgrid, 
title label anchor/.style={below=-1.6ex},
title left shift=.05,
title right shift=-.05,
title height=1,
bar/.style={fill=gray!50},
incomplete/.style={fill=white},
progress label text={},
bar height=0.7,
group right shift=0,
group top shift=.6,
group height=.3,
group peaks width={.2}]
{1}{13}

\gantttitle{June}{4} \gantttitle{July}{5} \gantttitle{August}{4}\\
\gantttitlelist{1,...,4}{1} \gantttitlelist{1,...,5}{1}\gantttitlelist{1,...,4}{1}\\

\ganttbar{Dissertation Outline}{1}{2} \\
\ganttbar{Research Proposal Submission}{3}{3} \\
\ganttbar{Research Proposal Approval}{4}{4}\\
\ganttbar{Literature Review}{4}{5} \\
\ganttbar{Model Specification}{6}{11} \\
\ganttbar{Data Collection}{6}{11} \\
\ganttbar{Results}{12}{13} \\
\ganttbar{Analysis}{12}{13}
\end{ganttchart}

\end{document}

结果:

在此处输入图片描述

相关内容