TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to (easily) draw dash-dotted curves in MetaPost, i.e. curves that alternate between a dash and a dot?

For either dashed or dotted curves, I use the draw command and end it with dashed evenly or dashed withdots, respectively.

Does MetaPost include a similar option for dash-dotted curves?

share|improve this question
up vote 10 down vote accepted

The definition of widthdots is

dashpattern(on 3 off 3)

while evenly is

dashpattern(off 2.5 on 0 off 2.5)

Thus something like

draw dashpattern(on 3 off 3 on 0 off 3) dashed evenly;
picture p;
draw fullcircle scaled 1cm xscaled 3 dashed p;

taken from figure 32 in the Metapost manual will alternate dashes and dots.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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