5
votes

In the help of matlab, there are only 4 linestyles:

'- ' Solid line (default)

'--' Dashed line

':' Dotted line

'-. ' Dash-dot line

Can I plot curves in other styles?

Thanks for any suggestions!

1
Not that I know of, but combine that with the different LineWidth and you start to have many combinations. If you need more differentiation, you can then play with the Color, and/or the variety of Markers. - Hoki
Yes, by using different colors, it can make curves look different. But if you print it merely in black/white, the curves still cannot be recognized. Besides, I don't think LineWidth is a good choice. Thank you all the same! - Andnot
I know, not only on printers. Despite what's currently available, many scientific publications are still published in B&W. A couple of workarounds are: (i) plot one line with a given style, then plot the same "downsampled" line with a specific marker (and no line at all example). (ii) instead of a legend, add a text object directly on each line somewhere (works well for abacus type graph). - Hoki
plot(x,y,'-.o') is simpler and gives the same result as @Hoki's answer. - Yellows
@Yellows, yes that works if your line has a few points, but if it has 20000 points it's just going to clutter the plot. The idea is to only plot 5 to 10 markers on each line. - Hoki

1 Answers

4
votes

The following also work:

.-.
-^
-o
-*
:*

This is not an exhaustive list.

You can also use 'LineWidth',10 to make lines thicker if that helps. The marker size can also be changed using the MarkerSize handle.