Matplotlib Line Sytax

 For Color

plt.plot(days, money_spent, color='green') plt.plot(days, money_spent_2, color='#AAAAAA')
For LineStyle
# Dashed: plt.plot(x_values, y_values, linestyle='--') # Dotted: plt.plot(x_values, y_values, linestyle=':') # No line: plt.plot(x_values, y_values, linestyle='')


For Markes in Plot

# A circle: plt.plot(x_values, y_values, marker='o') # A square: plt.plot(x_values, y_values, marker='s') # A star: plt.plot(x_values, y_values, marker='*')

For Labelling
plt.xlabel('Time')
plt.ylabel('Dollars spent on coffee')
plt.title('My Last Twelve Years of Coffee Drinking')


Comments

Popular posts from this blog

Binomial Test in Python

Slicing and Indexing in Python Pandas

Python Syntax and Functions Part2 (Summary Statistics)