matplotlib / matplotlib/ipympl
make `%matplotlib widget` behave like `inline`?
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
I have a notebook in Jupyter Lab, so far using the default matplotlib backend, which in this context I believe is inline. When I have a sequence of plotting commands (pyplot.plt etc.), they combine into a figure that is shown after the respective code cell. Also, @interact works as expected.
I now wanted to zoom in, which inline does not support, so I issued %matplotlib widget. The figures are now zoomable alright, but I don't have that neat behavior where plotting code in one cell contributed to the following figure output cell, and doesn't modify anything else. And @interact, instead of producing new (versions of) a figure, now puts everything on top of each other.
From reading around I realize that this is the intended behavior. The thing is, I don't like it. So my question is: Is there a way to make widget behave like inline?
If there is not, is there a guide that tells me how to modify my code so that plot commands affect only the next output cell, and @interact updates instead of adds?
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
Beginne damit, das Verhalten in Jupyter Lab mit %matplotlib widget, sequentiellen Plot-Befehlen und @interact zu reproduzieren, und vergleiche es anschließend mit dem standardmäßigen inline backend. Ermittle, ob die angeforderte zellenbezogene Ausgabe und die aktualisierende Interaktion unterstützt werden können; abgeschlossen ist die Untersuchung, wenn ein unterstützter Ansatz dokumentiert oder die erforderliche Verhaltensänderung eindeutig identifiziert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter, jupyter-notebook
- Bereich
- developer-experience, frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100