question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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?

image image

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:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
thomasaarholtcommented, Nov 23, 2018

The padding seems particularly unnecessary with plt.subplots(): image

0reactions
martinRenoucommented, Oct 19, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found