1

I am using something like

set arrow 1 from 0,-0.5 to 3,-0.5 nohead

to draw vertical or horizontal lines.

How can I create dotted/dashed lines though?

Related this the following linetype works

set arrow 1 from 0,-0.5 to 3,-0.5 nohead lt 0

but e.g. lt 3 doesn't.

Community
  • 1
  • 1
EverythingRightPlace
  • 1,197
  • 12
  • 33
  • 2
    I would try something like `set arrow 1 from 0,-0.5 to 3,-0.5 nohead dt "."`, i.e., to specify the `dashtype` instead of `linetype` - http://stackoverflow.com/a/19420678/5351549 – ewcz Feb 17 '17 at 11:29
  • 1
    Additionally, see http://stackoverflow.com/a/28438812/2604213 and http://stackoverflow.com/a/29950759/2604213 for more information about `dashtype` – Christoph Feb 17 '17 at 11:40
  • I am using Gnuplot `Version 4.6 patchlevel 2`. Is it possible for that version too or do I have to upgrade to version 5? – EverythingRightPlace Feb 17 '17 at 12:54
  • `lt 2` or `lt 3` doesn't work? Does it display a line at all? What terminal are you using? Try using an alternate terminal for testing – Gavin Portwood Feb 18 '17 at 19:47
  • @GavinPortwood It displays a line but this is not dotted. I tried png terminal which changes nothing. By default I am using `x11`. – EverythingRightPlace Feb 21 '17 at 07:58
  • 1
    Please try something a terminal other than `png` or `x11`. `pngcairo` would be good if you have it (check with `set term`). There are issues with the `png` terminal with `linestyles` on some versions. You can use dashed `linestyles` in X11 but must set them in ~/.Xdefaults (see [this](http://wiki.octave.org/Enable_%22linestyle%22_functionality_for_Gnuplot%27s_x11_terminal) or `help set term x11 line`) – Gavin Portwood Feb 22 '17 at 05:05

0 Answers0