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 Labellingplt.xlabel('Time')plt.ylabel('Dollars spent on coffee')plt.title('My Last Twelve Years of Coffee Drinking')
Comments
Post a Comment