code: def test_multiple_axes_figure(fig_type):
      # Generate some data
      x = np.arange(200_000)
      sin = 3 + np.sin(x / 200) + np.random.randn(len(x)) / 30
  
      fig = fig_type(
          default_n_shown_samples=2000,
          default_downsampler=MinMaxLTTB(parallel=True),
      )
  
      # all traces will be plotted against the same x-axis
      # note: the first added trace its yaxis will be used as reference
      fig.add_trace(
          go.Scatter(name="orig", yaxis="y1", line_width=1),
          hf_x=x,
          hf_y=sin,
      )
      fig.add_trace(
          go.Scatter(name="negative", yaxis="y2", line_width=1),
          hf_x=x,
          hf_y=-sin,
      )
      fig.add_trace(
          go.Scatter(name="sqrt(orig)", yaxis="y3", line_width=1),
          hf_x=x,
          hf_y=np.sqrt(sin * 10),
      )
      fig.add_trace(
          go.Scatter(name="orig**2", yaxis="y4", line_width=1),
          hf_x=x,
          hf_y=(sin - 3) ** 2,
      )
  
      # in order for autoshift to work, you need to set x-anchor to free
      fig.update_layout(
          # NOTE: you can use the domain key to set the x-axis range (if you want to display)
          # the legend on the right instead of the top as done here
          xaxis=dict(domain=[0, 1]),
          # Add a title to the y-axis
          yaxis=dict(title="orig"),
          # by setting anchor=free, overlaying, and autoshift, the axis will be placed
          # automatically, without overlapping any other axes
          yaxis2=dict(
              title="negative",
              anchor="free",
              overlaying="y1",
              side="left",
              autoshift=True,
          ),
          yaxis3=dict(
              title="sqrt(orig)",
              anchor="free",
              overlaying="y1",
              side="right",
              autoshift=True,
          ),
          yaxis4=dict(
              title="orig ** 2",
              anchor="free",
              overlaying="y1",
              side="right",
              autoshift=True,
          ),
      )
  
      # Update layout properties
      fig.update_layout(
          title_text="multiple y-axes example",
          height=600,
          legend=dict(
              orientation="h",
              yanchor="bottom",
              y=1.02,
              xanchor="right",
              x=1,
          ),
          template="plotly_white",
      )
  
      # Test: check whether a single update triggers all traces to be updated
      out = fig._construct_update_data(
          {"xaxis.range[0]": 0, "xaxis.range[1]": 50_000}
      )
      assert len(out) == 5
  
file_path: plotly-resampler/tests/test_multiple_axes.py
imports: import numpy
  import plotly.graph_objects
  import pytest
  from plotly.subplots import make_subplots
  from plotly_resampler import FigureResampler, FigureWidgetResampler
  from plotly_resampler.aggregation import MinMaxLTTB
label_desc: Use image node_id 1 for calling a global function with example usage: test_multiple_axes_figure(fig_type) without return types