Hello,
I’ve created the following chart using matplotlib.pyplot.plot(). However, I would like to see the data points as bars from the bottom of the graph up to the points in order to more easily show the lack of data at certain dates. Is there a way to do this using plot()? If not, how do I go about making a bar chart using time as my xaxis? And how would I format the xticks so that only months are shown, as I have it now?
Thank you,
Amy
Hi Amy,
Use the vlines() function. Its what I have used in the past.
Cheers,
Aman
···
On Fri, May 27, 2011 at 12:28 PM, Amy Zhang <amy.xian.zhang@…287…> wrote:
Hello,
I’ve created the following chart using matplotlib.pyplot.plot(). However, I would like to see the data points as bars from the bottom of the graph up to the points in order to more easily show the lack of data at certain dates. Is there a way to do this using plot()? If not, how do I go about making a bar chart using time as my xaxis? And how would I format the xticks so that only months are shown, as I have it now?
Thank you,
Amy
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Matplotlib supports stem plots:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.stem
(Oddly, the only example of this seems to be a link to a Matlab plot...?
But anyway, Matplotlib works great for this.)
But if you really want, you can use vlines:
http://matplotlib.sourceforge.net/examples/pylab_examples/vline_demo.html
hth,
Alan Isaac
···
On 5/27/2011 12:28 PM, Amy Zhang wrote:
I've created the following chart using matplotlib.pyplot.plot(). However, I would like to see the data points as bars from the bottom of the graph up to the points
Thank you all! vlines was exactly what I needed.
Amy
···
On Fri, May 27, 2011 at 3:03 PM, Alan G Isaac <alan.isaac@…287…> wrote:
On 5/27/2011 12:28 PM, Amy Zhang wrote:
I’ve created the following chart using matplotlib.pyplot.plot(). However, I would like to see the data points as bars from the bottom of the graph up to the points
Matplotlib supports stem plots:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.stem
(Oddly, the only example of this seems to be a link to a Matlab plot…?
But anyway, Matplotlib works great for this.)
But if you really want, you can use vlines:
http://matplotlib.sourceforge.net/examples/pylab_examples/vline_demo.html
hth,
Alan Isaac
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users