Reputation: 173
How can I plot a steam plot without markers (only steam lines)?. It is specially useful when plotting really long signal arrays.
Thanks!
Upvotes: 16
Views: 14693
Reputation: 69192
You can simply set the marker to be nothing:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 6*np.pi, 200)
y = np.sin(x)
plt.stem(x, y, markerfmt=" ")
plt.show()
In matplotlib, there are a few ways to use "nothing" as the marker, and each gives a somewhat different result. For example, using ""
instead of " "
will connect the ends of the stem with a line:
Also, btw, I first tried using a pixel marker, specified by ","
, but this pixel ended up not being well aligned with the stem and didn't look good.
Upvotes: 31