We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 214b438 + 1933321 commit 54a3b89Copy full SHA for 54a3b89
pyprobe/plot.py
@@ -1,4 +1,6 @@
1
"""A module to contain plotting functions for PyProBE."""
2
+import platform
3
+import warnings
4
from typing import TYPE_CHECKING, List, Optional
5
6
import numpy as np
@@ -60,6 +62,11 @@ def show(self) -> None:
60
62
61
63
def show_image(self) -> None:
64
"""Show the plot as an image."""
65
+ if platform.system() == "Windows":
66
+ warnings.warn(
67
+ "show_image() is known to hang indefinitely on Windows. "
68
+ "If you encounter this issue, use show() instead."
69
+ )
70
img_bytes = self.fig.to_image(format="png")
71
display(Image(img_bytes))
72
0 commit comments