About 50 results
Open links in new tab
  1. python - fig, ax = plt.subplots () meaning - Stack Overflow

    Jul 22, 2020 · I've been using matplotlib for a while and I don't actually understand what this line does. fig, ax = plt.subplots() Could someone explain?

  2. How to make an axes occupy multiple subplots with pyplot

    subplot(2,2,[1,2]) % the plot will span subplots 1 and 2 Is it also possible in pyplot to have a single axes occupy more than one subplot? The docstring of pyplot.subplot doesn't talk about it. Anyone got an …

  3. python - How to plot in multiple subplots - Stack Overflow

    I am a little confused about how this code works: fig, axes = plt.subplots(nrows=2, ncols=2) plt.show() How does the fig, axes work in this case? What does it do? Also why wouldn't this work to d...

  4. Python - matplotlib - differences between subplot() and subplots()

    Sep 7, 2018 · fig, axes = plt.subplots(nrows=2, ncols=3) 2. matplotlib.pyplot.subplot() In contrast, matplotlib.pyplot.subplot() creates only a single subplot axes at a specified grid position. This means …

  5. Dynamically add/create subplots in matplotlib - Stack Overflow

    Sep 7, 2012 · Instead of counting your own number of rows and columns, I found it easier to create the subplots using plt.subplots first, then iterate through the axes object to add plots.

  6. How do I change the figure size with subplots? - Stack Overflow

    10 You can use plt.figure(figsize = (16,8)) to change figure size of a single plot and with up to two subplots. (arguments inside figsize lets to modify the figure size) To change figure size of more …

  7. How to plot multiple dataframes in subplots - Stack Overflow

    Jul 20, 2022 · This does not answer the question that was asked in the OP. The question is how to plot multiple dataframes in subplots; while this answer plots the same dataframe multiple times. …

  8. How do I make a single legend for many subplots? - Stack Overflow

    I am plotting the same type of information, but for different countries, with multiple subplots with Matplotlib. That is, I have nine plots on a 3x3 grid, all with the same for lines (of course,

  9. python - Turn off axes in subplots - Stack Overflow

    You can turn the Axes off by following the advice in Veedrac's comment (linking to here) with one small modification. Rather than using plt.axis('off'), use ax.axis('off') where ax is a matplotlib.axes object. …

  10. python - Matplotlib different size subplots - Stack Overflow

    Apr 30, 2012 · As of matplotlib 3.6.0, width_ratios and height_ratios can now be passed directly as keyword arguments to plt.subplots and subplot_mosaic, as per What's new in Matplotlib 3.6.0 (Sep …