maanantai 23. helmikuuta 2015

Matlab EPS-export fails on dotted lines

I continue my set of tips on drawing bearable figures using Matlab. Have you ever tried to increase the line width of a double dotted (with linespec ':') or dot-dash (with linespec '-.') line? Does it look like crap after exporting to *.eps?

There is a simple solution to the problem: open up the *.eps-file and search for

  1. "/DO" for ':'
  2. "/DD" for '-.'
The corresponding lines should be something like


  1. /DO { [0.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef
  2. /DD { [0.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4


By increasing the first decimal number 0.5 up to e.g. 1 you should get much better results.

Ei kommentteja:

Lähetä kommentti