user308827
user308827

Reputation: 22041

Plotting line color and style in matplotlib time-series

I am using the foll. code to plot a time-series:

plt.plot_date(x=time_stamps, y=data[label], fmt='r-', linewidth=0.5, label=label)

However, I want to specify the line color and style separately instead of using fmt. is there a soln?

Upvotes: 0

Views: 570

Answers (1)

matjazzz144
matjazzz144

Reputation: 76

You can do it separately like this:

plt.plot(x, y, linestyle='-', color='r')

Upvotes: 1

Related Questions