2

enter image description here

For some reason it looks like that, here is the code:

    \begin{landscape}
    \begin{ganttchart}{28}{28}
    \gantttitle{2012}{12}
    \gantttitle{2013}{16} \\
    \gantttitle{October}{4}
    \gantttitle{November}{4}
    \gantttitle{December}{4}
    \gantttitle{January}{4}
    \gantttitle{February}{4}
    \gantttitle{March}{4}
    \gantttitle{April}{4} \\
    \ganttbar{Study previous code}{3}{12} \\
    \ganttbar{Writing 1st rep.}{3}{4} 
    \ganttmilestone{}{4}\\
    \ganttbar{Writing 2nd rep.}{5}{7} 
    \ganttmilestone{}{7}\\
    \ganttbar{Writing research rep.}{6}{9} 
    \ganttmilestone{}{9}\\
    \ganttbar{Desktop application}{7}{12} \\
    \ganttbar{Tablet application}{10}{15} \\
    \ganttbar{Connecting applications}{9}{19} \\
    \ganttbar{Writing 3rd rep.}{18}{20} 
    \ganttmilestone{}{20}\\
    \ganttbar{Data analysis tools}{19}{25} \\
    \ganttbar{Writing final report}{20}{28} 
    \ganttmilestone{}{28}\\
    \ganttbar{Writing 4th rep.}{21}{23} 
    \ganttmilestone{}{23}\\
    \end{ganttchart}
    \end{landscape}

That is the only code on the page for the chart. I've also started a new project on ShareLatex and it does the same thing.

1
  • It would be helpful if you turned your code snippet into a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. Oct 23, 2014 at 23:06

1 Answer 1

2

This is a solution where changes is shown by <---. Also, this solution uses landscape from geometry.

enter image description here

Code

\documentclass[]{article}
\usepackage{pgfgantt}
%\usepackage{pdflscape}
\usepackage[a4paper,margin=1in,landscape]{geometry}
\begin{document}
%    \begin{landscape}
    \begin{ganttchart}[vgrid, hgrid]{1}{28}  % <---
    \gantttitle{2012}{12}
    \gantttitle{2013}{16} \\
    \gantttitle{October}{4}
    \gantttitle{November}{4}
    \gantttitle{December}{4}
    \gantttitle{January}{4}
    \gantttitle{February}{4}
    \gantttitle{March}{4}
    \gantttitle{April}{4} \\
    \ganttbar{Study previous code}{3}{12} \\
    \ganttbar{Writing 1st rep.}{3}{4} 
    \ganttmilestone{}{4}\\
    \ganttbar{Writing 2nd rep.}{5}{7} 
    \ganttmilestone{}{7}\\
    \ganttbar{Writing research rep.}{6}{9} 
    \ganttmilestone{}{9}\\
    \ganttbar{Desktop application}{7}{12} \\
    \ganttbar{Tablet application}{10}{15} \\
    \ganttbar{Connecting applications}{9}{19} \\
    \ganttbar{Writing 3rd rep.}{18}{20} 
    \ganttmilestone{}{20}\\
    \ganttbar{Data analysis tools}{19}{25} \\
    \ganttbar{Writing final report}{20}{28} 
    \ganttmilestone{}{28}\\
    \ganttbar{Writing 4th rep.}{21}{23} 
    \ganttmilestone{}{23}\\
    \end{ganttchart}
%    \end{landscape}
\end{document}
2
  • Thanks! Any reason why I got the alignment problem in the first place?
    – orange
    Oct 25, 2014 at 10:32
  • 1
    The main source of error is {28}{28} used in the \begin{ganttchart}. Further, vgrid and hgrid is added too.
    – Jesse
    Oct 25, 2014 at 10:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .