You can check for yourself by giving gnuplot the commands

```
gnuplot> set terminal pdf monochrome
gnuplot> set output "graph.pdf"
gnuplot> test
gnuplot> unset output
```

This will create a new file called graph.pdf containing all possible linestyles on the right. You'll notice they all look exactly the same.
The solution for this is kind of obvious but pretty much impossible to find unless you know what you're looking for. It's possible to enable the use of dashed lines by giving an extra parameter to the `set terminal pdf`

command. Try the commands

```
gnuplot> set terminal pdf monochrome dashed
gnuplot> set output "graph.pdf"
gnuplot> test
gnuplot> unset output
```

and you'll see dashed lines suddenly appearing on the right. You can use them like this:
```
gnuplot> set terminal pdf monochrome dashed
gnuplot> set output "graph.pdf"
gnuplot> plot x^2 ls 1, x^3 ls 2, x^4 ls 3
gnuplot> unset output
```

To set linestyle 1 (look at the `test`

output to see what linestyle one looks like) for x^2, linestyle two for x^3 and finally linestyle three for x^4.
Thank you! Just what I needed and, as you say, otherwise impossible to find.

ReplyDeleteYou're welcome!

ReplyDelete