Ramashish Baranwal <ramashish.li...@gmail.com> writes:

> x = range(10)
> y = [random.randint(-10, 10) for i in x]
> bar(x, y)
>
> What I want is a line to be drawn at y=0. Any idea how to get it done?

How about axhline:

  axhline(color='k', lw=1)

See the documentation of axhline (and hlines) for more.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to