Skip to main content

PlotlyRelayout

Wolfram Kernel
Execution environment
PlotlyRelayout[p_PlotlyInstance, update_Association, opts___]

an efficient means of updating the layout object of an existing plot.

Mush faster than PlotlyReact

For example

p = Plotly[<|"type"->"line", "y"->{1,2,3,4,5,6}|>]

Change the ranges

PlotlyRelayout[p, <|"xaxis.range" -> {0, 5}|>];

Options

"Window"

By default, the "Window" option is set to "Inherited". This setting dynamically uses the currently active window associated with the PlotlyInstance.

When set to "Inherited", even if a new window is opened using the same instance, it will be detected automatically. This is possible because all PlotlyInstance objects perform a handshake after mounting on the page.

To override this behavior, you can provide a specific WindowObj as an option.