Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

linestyle

python matplotlib dash-dot-dot – how to?

August 23, 2023 by Tarik

You can define custom dashes: import matplotlib.pyplot as plt line, = plt.plot([1,5,2,4], ‘-‘) line.set_dashes([8, 4, 2, 4, 2, 4]) plt.show() [8, 4, 2, 4, 2, 4] means 8 points on, (dash) 4 points off, 2 points on, (dot) 4 points off, 2 points on, (dot) 4 points off. @Achim noted you can also specify the … Read more

Categories python Tags linestyle, matplotlib, python Leave a comment

Is there a list of line styles in matplotlib?

February 1, 2023 by Tarik

According to the doc you could find them by doing this : from matplotlib import lines lines.lineStyles.keys() >>> [”, ‘ ‘, ‘None’, ‘–‘, ‘-.’, ‘-‘, ‘:’] You can do the same with markers EDIT: In the latest versions, there are still the same styles, but you can vary the space between dots/lines.

Categories python Tags linestyle, matplotlib, python Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa