Unnecessarily large padding
See original GitHub issue%matplotlib widget introduces a lot of padding around the plotted image, emphasised when compared to %matplotlib inline
I have tried various matplotlib calls, but can’t figure out a way to reduce it. In any case, I think it should be default be smaller than it is?
I’m sure I’m not the only one who’s had to scroll a bit too much to get past very large images.
Two additional questions:
- what controls the increased size of the plot with
widget? - Can we reduce or change the size/shape of the “Figure 1” toolbar? I understand the need to close the interactive plot, but do we need the full toolbar?

Test code:
%matplotlib widget
import numpy as np
import matplotlib.pyplot as plt
plt.figure()
plt.imshow(np.random.random((32,32)));
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Unnecessarily large padding · Issue #72 · matplotlib/ipympl
matplotlib widget introduces a lot of padding around the plotted image, emphasised when compared to %matplotlib inline I have tried various ...
Read more >Chucks Pads Disposable [150-Pads] Underpads 23x36 ...
Amazon.com: Chucks Pads Disposable [150-Pads] Underpads 23x36 Incontinence ... Bed Pads, Pee Pads for Babies, Kids, Adults & Elderly | Puppy Pads Large...
Read more >Padding - Definition, Meaning & Synonyms - Vocabulary.com
Sometimes padding is simply used to make something seem bigger, and from this meaning comes the sense of padding meaning "unnecessary extra material," ......
Read more >Remove unnecessary space above and below text coming ...
Recently for a feature the developer pointed out that additional spacing is being added above and below the text block based on the...
Read more >Padding - TV Tropes
Padding is a moment in a story which could have easily been removed from the plot ... with adding extra, unnecessary scenes as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The padding seems particularly unnecessary with
plt.subplots():This should be more flexible now, as you can optionally hide the header/footer/toolbar. At some point we could improve the toolbar space by fixing https://github.com/matplotlib/ipympl/issues/299