Skip to content

Commit fd3a3c3

Browse files
authored
Merge branch 'main' into issue-818-support-python-314
2 parents 44f0661 + 88c74d4 commit fd3a3c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdmetrics/visualization.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Visualization methods for SDMetrics."""
22

3+
import os
34
from functools import wraps
45

56
import pandas as pd
@@ -29,8 +30,11 @@ def wrapper(*args, **kwargs):
2930
# Lazy import IPython
3031
from IPython import get_ipython
3132

33+
env_plotly_renderer = os.environ.get('SDMETRICS_PLOTLY_RENDERER', None)
3234
ipython_interpreter = str(get_ipython())
33-
if 'ZMQInteractiveShell' in ipython_interpreter and 'iframe' in renderers:
35+
if env_plotly_renderer is not None:
36+
pio.renderers.default = env_plotly_renderer
37+
elif 'ZMQInteractiveShell' in ipython_interpreter and 'iframe' in renderers:
3438
# This means we are using jupyter notebook
3539
pio.renderers.default = 'iframe'
3640

0 commit comments

Comments
 (0)