How to Set the Range of the Y-Axis on a Bar Chart

Hi

How do I set the range of the y-axis on a bar chart , e.g, from 0 to 100?

Thanks

Ted

Ted,

You can call ylim([0, 100]) after you create your plot. If you have the axes object (from gca()), you can directly manipulate the limits using set_ylim([0, 100]).

Ben Root

···

On Tue, Jun 8, 2010 at 10:50 AM, Ted Kord <teddy.kord@…982…> wrote:

Hi

How do I set the range of the y-axis on a bar chart , e.g, from 0 to 100?

Thanks

Ted


ThinkGeek and WIRED’s GeekDad team up for the Ultimate

GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the

lucky parental unit. See the prize list and enter to win:

http://p.sf.net/sfu/thinkgeek-promo


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Thanks Ben. worked brilliantly.

Ted

···

On 8 June 2010 18:48, Benjamin Root <ben.root@…1304…> wrote:

Ted,

You can call ylim([0, 100]) after you create your plot. If you have the axes object (from gca()), you can directly manipulate the limits using set_ylim([0, 100]).

Ben Root

On Tue, Jun 8, 2010 at 10:50 AM, Ted Kord <teddy.kord@…982…> wrote:

Hi

How do I set the range of the y-axis on a bar chart , e.g, from 0 to 100?

Thanks

Ted


ThinkGeek and WIRED’s GeekDad team up for the Ultimate

GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the

lucky parental unit. See the prize list and enter to win:

http://p.sf.net/sfu/thinkgeek-promo


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users