matplotlib / matplotlib/ipympl

Default toolbar overlaps figure

Ouverte
#497 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

enhancement
Langage dominant
Jupyter Notebook
Étoiles
1.7k
Forks
234
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Describe the issue
The default position of the toolbar is on the left, where it overlaps the figure.
Especially when the `constrained_layout=True` keyword is used when creating the figure,
this is highly undesirable.

Possible solutions or workarounds:
- Minimal fix: Change the default to anything other then "left"; I think that with the current design, "right" would be by far the best. It would minimize the likelihood of an overlap.
- The real fix: When the toolbar_position is on the left, position the figure to its right. Ideally, all toolbar positions should be in boxes that never overlap the figure box. With this scheme I suggest putting the default toolbar on the top or bottom, and flush left, to match all of the other matplotlib interactive backends.

## Versions

```
3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:06:49)
[Clang 12.0.1 ]
ipympl version: 0.9.2
Selected Jupyter core packages...
IPython : 8.5.0
ipykernel : 6.16.0
ipywidgets : 7.7.0
jupyter_client : 7.3.5
jupyter_core : 4.11.1
jupyter_server : 1.23.1
jupyterlab : 3.5.0
nbclient : 0.6.8
nbconvert : 7.0.0
nbformat : 5.6.1
notebook : 6.5.2
qtconsole : 5.3.1
traitlets : 5.4.0
Known nbextensions:
config dir: /Users/efiring/.jupyter/nbconfig
notebook section
matplotlib/extension enabled
- Validating: problems found:
- require? X matplotlib/extension
config dir: /Users/efiring/miniconda3/envs/py38/etc/jupyter/nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
JupyterLab v3.5.0
/Users/efiring/miniconda3/envs/py38/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
jupyter-matplotlib v0.11.2 enabled OK
@jupyter-widgets/jupyterlab-manager v3.1.1 enabled OK (python, jupyterlab_widgets)

```

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

The issue centers on the toolbar_position behavior in the Jupyter Notebook integration; start by locating the implementation that places the default toolbar and any related layout tests. Reproduce the overlap with constrained_layout=True, then verify that the toolbar and figure occupy separate boxes for the chosen positioning behavior.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
jupyter-notebook, python
Domaine
frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.