Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

How to use PlotConfig with make_subplots

Hi, I’m new to Plotly and am working in Julia.
I am able to use the config kwarg in calls to PlotlyJS.plot() as in the documentation.
However, I am using PlotlyJS.make_subplots which doesn’t accept config as a kwarg. Where can I use the PlotConfig?

julia> cfg = PlotlyJS.PlotConfig(displayModeBar=true);
julia> p = PlotlyJS.make_subplots(rows=2,cols=2); # config not accepted here
julia> display(p) # config not accepted here either

@kfranke
I couldn’t find any example on how to set config for subplots,but I succeeded with a workaround. Namely, if fig is the PlotlyJS.SyncPlot created by make_subplots, then I use its data and layout to create a dummy PlotlyJS.SyncPlot with my config settings:

using PlotlyJS
fig = PlotlyJS.make_subplots(rows=1, cols=2)
add_trace!(fig, scatter(x=1:8, y=-2 .+ 3*rand(8)), row=1, col=1)
add_trace!(fig, scatter(x=-2:6, y=2*rand(9)), row=1, col=2)
relayout!(fig, width=700, height=400)
pl = plot([fig.plot.data[1], fig.plot.data[2]], 
           fig.plot.layout, 
           config=PlotConfig(displayModeBar=true))