Skip to content

Commit a0eaed6

Browse files
committed
fix to stop weird stuff happening under Jupyter for similarly named figures
1 parent 6b6136e commit a0eaed6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roboticstoolbox/backends/PyPlot/PyPlot2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ def launch(self, name=None, limits=None, **kwargs):
6868

6969
labels = ["X", "Y"]
7070

71-
if name is not None:
72-
self.fig = plt.figure(name)
71+
if name is not None and not _isnotebook():
72+
# jupyter does weird stuff when figures have the same name
73+
self.fig = plt.figure()
7374
else:
7475
self.fig = plt.figure()
7576

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy