There are only 4 types of line style in matplotlib: ['--', '-.', '-', ':']. Can one make more than 4 different types of line style in matplotlib?
x: X-axis points on the line. y: Y-axis points on the line. linestyle: Change the style of the line.
The latest matplotlib documentation (currently unreleased) includes many custom linestyle examples right now. Here's a screen shot:
For easier copy paste, here's part of the code used to make that plot:
linestyle_tuple = [
('loosely dotted', (0, (1, 10))),
('dotted', (0, (1, 1))),
('densely dotted', (0, (1, 1))),
('loosely dashed', (0, (5, 10))),
('dashed', (0, (5, 5))),
('densely dashed', (0, (5, 1))),
('loosely dashdotted', (0, (3, 10, 1, 10))),
('dashdotted', (0, (3, 5, 1, 5))),
('densely dashdotted', (0, (3, 1, 1, 1))),
('dashdotdotted', (0, (3, 5, 1, 5, 1, 5))),
('loosely dashdotdotted', (0, (3, 10, 1, 10, 1, 10))),
('densely dashdotdotted', (0, (3, 1, 1, 1, 1, 1)))]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With