I am new-ish to Matplotlib.
I made a stem plot (aka lollipop) using Python/Matplotlib. These kinds of plots have style settings: linefmt
, markerfmt
, basefmt
.
For instance, I can change the color of the baseline like so:
plt.stem(X, Y, basefmt="m")
I'd like to see the points and the stems, but I don't want to see the actual baseline. What command/format code do I need to "hide" the baseline? Or am I approaching this wrong?
You can do it all in one line:
plt.stem(X, Y, basefmt=" ")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With