It seems the 'bottom' parameter is the best for me.
Here is the code:
from pylab import *
x = linspace(0.1, 2*pi, 10)
markerline, stemlines, baseline = stem(x, cos(x), '-.', bottom=.5)
setp(markerline, 'markerfacecolor', 'b')
setp(baseline, 'color','r', 'linewidth', 2)
show()
Thanks for your in
In fact, I would like to draw other stem plots each at different offset.
Ex:
-+_-_--+-_---
-+_---+-_--+--_-
-+--+-_--+-_-
I also found vlines but I have the same problem I don't know how to add a
horizontal offset to the values.
Ex:
import numpy
from matplotlib
Looking at the source code indicates there is a 'bottom' keyword which
looks like it controls this, see
https://github.com/matplotlib/matplotlib/blob/v1.4.3/lib/matplotlib/axes/_axes.py#L2295
On 31 March 2015 at 19:31, ssinfod wrote:
> Hello,
>
> I found this stem plot example:
> http://matplotl
I’m not going to claim this is the final answer, but in the documentation for
the stem function[1], it specifically says that the horizontal line is drawn at
0.
A workaround is to subtract the offset from your data, and relabel the axes….
[1]http://matplotlib.org/api/pyplot_api.html?highlight