16

How can I plot a steam plot without markers (only steam lines)?. It is specially useful when plotting really long signal arrays.

Thanks!

0

1 Answer 1

31

You can simply set the marker to be nothing:

enter image description here

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:

enter image description here

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.