Skip to content

Instantly share code, notes, and snippets.

@dmitrysarov
Last active February 20, 2019 08:00
Show Gist options
  • Select an option

  • Save dmitrysarov/9c50392d257e298ded12699f78dfdeec to your computer and use it in GitHub Desktop.

Select an option

Save dmitrysarov/9c50392d257e298ded12699f78dfdeec to your computer and use it in GitHub Desktop.
bunch of line styles for matplotlib
from itertools import combinations
styles = map(lambda x: x+'-', list('.^o<>1234sp*hH+xDd|_'))
for num, line_style in enumerate(styles, 1):
plt.plot(range(10), [num]*10, line_style, label=line_style)
plt.legend(loc='upper left', bbox_to_anchor=(1, 1))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment