Skip to content

Commit

Permalink
Merge pull request #698 from Sichao25/root_folder
Browse files Browse the repository at this point in the history
Debug set_figure_params
  • Loading branch information
Xiaojieqiu authored Aug 5, 2024
2 parents 117ceb5 + 17bff01 commit 53a17b9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions dynamo/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,14 +789,17 @@ def set_figure_params(
for more details.
"""

try:
import IPython

if isinstance(ipython_format, str):
ipython_format = [ipython_format]
IPython.display.set_matplotlib_formats(*ipython_format)
except Exception:
pass
import builtins

if getattr(builtins, "__IPYTHON__", False):
try:
import matplotlib_inline.backend_inline

if isinstance(ipython_format, str):
ipython_format = [ipython_format]
matplotlib_inline.backend_inline.set_matplotlib_formats(*ipython_format)
except Exception:
pass

from matplotlib import rcParams

Expand Down

0 comments on commit 53a17b9

Please sign in to comment.