So: I have a Gantt chart created with pgfgantt where in order to fit my pages I have included

x unit=1.4cm,y unit chart=6mm

in its preamble. This means that milestone shapes are spread out horizontally. How can I change the vertical and horizontal units of a Gantt chart in a way which doesn't affect the aspect ratios of elements like milestones?

  • You can always declare a new milestone element with an aspect ratio inverse to new x unit and y unit ratio. You must declare a new milestone because pgfgantt milestones doesn't consider aspect ratio as diamond original tikz shapes does. – Ignasi Oct 27 '14 at 10:15
  • Please consider to provide a minimum working example showing your problem? This way will be easier to help you. – Ignasi Oct 27 '14 at 10:17
  • Thank you - I can't however, find a way to set the aspect ratio of an element, nor of setting the width and height. – Alasdair Oct 27 '14 at 10:34
  • This is the reason because you must use a newganttchartelement as is explained in pgfgantt documentations – Ignasi Oct 27 '14 at 10:36
  • According to my documentation (v4.0), the relevant keys are left shift, right shift, top shift, height. But there is no width, or aspect ratio. – Alasdair Oct 27 '14 at 10:52

If I understand your question correctly, then you can use xscale to adjust the aspect ratio. For example:

  x unit=1.4cm,
  y unit chart=6mm,
  milestone/.append style={xscale=0.42857} % 0.6/1.4 ≈ 0.42857

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.