Hi Ax - the plotting tools are great and I love that they use Plotly. Can we get the plotly source out of ax_client so that we can save the figures as a pdf for publication? The download button on the web interface never gives enough resolution.
from ax.utils.notebook.plotting import render, init_notebook_plotting
from ax.plot.contour import plot_contour
plot = plot_contour(model=gpei,
param_x=opt_list[0],
param_y=opt_list[1],
metric_name="base",)
render(plot)
Hi @natolambert -- I'm not sure what you mean by "get the plotly source out of ax_client". The plot_contour function returns all the data necessary to render the plot, so you should be able to use any system or method you want to generate the final result. Can you clarify what we could do to support your case better?
Ah! I found the data and layout dicts. Sorry I didn't see them initially. Thanks for the prompt response.
For anyone else.
plot = plot_contour(model=gpei,
param_x="N",
param_y="L",
metric_name="base", )
data = plot[0]['data']
lay = plot[0]['layout']
import plotly.graph_objects as go
fig = {
"data": data,
"layout": lay,
}
go.Figure(fig).write_image("test.pdf")
Most helpful comment
Ah! I found the data and layout dicts. Sorry I didn't see them initially. Thanks for the prompt response.
For anyone else.