[Matplotlib-users] Question about ylims

Thomas Caswell tcaswell at gmail.com
Fri Jun 26 19:02:36 EDT 2020


Please subscribe to the mailing list (
https://mail.python.org/mailman/listinfo/matplotlib-users) so you can post

Can you include a minimal example of what you are doing which is not
working?  What you want is definitely possible:

fig, ax_arr = plt.subplots(2, 2)
ax_arr[0, 0].set_ylim(0, 5)
ax_arr[1, 0].set_ylim(-5, 0)
# and so-on


On Fri, Jun 26, 2020 at 6:59 PM John Doucette <meepsorp at gmail.com> wrote:

> I am trying to make a 2 x 2 figure with covid-19 graphs
> Upper left = cases  Upper right = cumulative cases
> Lower left = deaths Lower right = cumulative deaths
> I have been having trouble with ylims. It appears that if I set a ylim it
> is applied to all four frames.
> I have been searching duckduckgo  for hour including the matplotlib
> gallery and every set of multiple frame plots has the same ylim on every
> frame.
> I need different ylims for each individual frame. Is this even possible?
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users

Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200626/8f32df87/attachment.html>

More information about the Matplotlib-users mailing list