matplotlib / matplotlib/ipympl
rendering issues when exception is raised before cell execution completes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 1.7k
- Forks
- 234
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Reposting from [jupyter/notebook issue](https://github.com/jupyter/notebook/issues/2166#issuecomment-280676430). The code cell as appears in the screen shot is:
```
import ipympl
import matplotlib.pyplot as plt
def plot_something():
plt.figure()
plt.plot([0,2],[0,2],'-')
plt.show()
plot_something()
raise Exception
```
The behavior I am seeing is different for the first time I run the cell and the next times. It is also different for different level of browser zoom levels (I am using Chrome 56.0.2924.87 on Windows 8.1)-
First time that the cell is run -
The figure appears but is not fully rendered (see image)-

If I then resize the figure using the GUI (bottom right corner), the behavior changes based on browser zoom level-
1. When using 100% zoom level (default), the figure is rendered too small. When in this state the zoom rectangle is drawn offset from the mouse pointer. The zooming is determined by the mouse pointer, it is just the drawing of the rectangle that is off.
2. When using 90% zoom level (ctrl^- once), the figure is rendered to size and the zoom rectangle is working fine.
When I rerun the cell the figure is re-rendered properly without need for resizing and independent of zoom level.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere die bereitgestellte Python-Zelle in der ipympl-Notebook-Integration mit der gemeldeten Chrome-Umgebung, einschließlich des ersten Durchlaufs, der ausgelösten Ausnahme, der Größenänderung der Abbildung und der Browser-Zoomstufen. Vergleiche die anfängliche Darstellung mit nachfolgenden Durchläufen; abgeschlossen ist die Aufgabe, wenn die Abbildung in der korrekten Größe dargestellt wird und das Zoom-Rechteck nach der Ausnahme ausgerichtet bleibt, ohne dass eine Größenänderung oder ein erneuter Durchlauf erforderlich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, matplotlib, python
- Bereich
- data-visualization, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100