Skip to content

Commit f8773a3

Browse files
danthe3rdfacebook-github-bot
authored andcommitted
HiPlot in Ax
Reviewed By: 2timesjay Differential Revision: D21302382 fbshipit-source-id: 082db90c6674e1049c4bba808536c8b65b339027
1 parent 4a08d9e commit f8773a3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ax/plot/base.py

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
Z = 1.96
2020

2121

22+
@enum.unique
2223
class AxPlotTypes(enum.Enum):
2324
"""Enum of Ax plot types."""
2425

@@ -28,6 +29,7 @@ class AxPlotTypes(enum.Enum):
2829
INTERACT_CONTOUR = 3
2930
BANDIT_ROLLOUT = 4
3031
INTERACT_SLICE = 5
32+
HTML = 6
3133

3234

3335
# Configuration for all plots

ax/utils/notebook/plotting.py

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def render(plot_config: AxPlotConfig, inject_helpers=False) -> None:
2828
"""Render plot config."""
2929
if plot_config.plot_type == AxPlotTypes.GENERIC:
3030
iplot(plot_config.data)
31+
elif plot_config.plot_type == AxPlotTypes.HTML:
32+
assert "text/html" in plot_config.data
33+
display(plot_config.data, raw=True)
3134
else:
3235
display_bundle = {
3336
"text/html": plot_config_to_html(plot_config, inject_helpers=inject_helpers)

0 commit comments

Comments
 (0)