Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python+matplotlib: custom linestyles

I'm not satisfied with default set of linestyles, namely the size of line segments and the gap between them. I'd also want to have something like '-..', '-...', etc line patterns. Does anybody know how to customize it?

Best witches.

like image 434
Evgeny P. Kurbatov Avatar asked Nov 09 '11 19:11

Evgeny P. Kurbatov


People also ask

How do I make a dashed line in matplotlib?

x: X-axis points on the line. y: Y-axis points on the line. linestyle: Change the style of the line.

How do you change the dotted line in Python?

You can directly specify the dashes length/space using the dashes=(length, interval space) argument inside the plot command.


1 Answers

Use set_dashes.

like image 122
Jouni K. Seppänen Avatar answered Nov 14 '22 07:11

Jouni K. Seppänen