code: def plot_graph(n_clicks):
      ctx = callback_context
      if (
          len(ctx.triggered)
          and "plot-button" in ctx.triggered[0]["prop_id"]
      ):
          # Note how the replace method is used here on the global figure object
          global fig
          if len(fig.data):
              # Replace the figure with an empty one to clear the graph
              fig.replace(go.Figure())
          fig.add_trace(
              go.Scattergl(name="log"),
              hf_x=x,
              hf_y=noisy_sin * 0.9999995**x,
          )
          fig.add_trace(
              go.Scattergl(name="exp"),
              hf_x=x,
              hf_y=noisy_sin * 1.000002**x,
          )
          return fig
      else:
          return no_update
  
imports: import numpy
  import plotly.graph_objects
  from dash import Dash, Input, Output, callback_context, dcc, html, no_update
  from plotly_resampler import FigureResampler
label_desc: Use image node_id 1 for calling a global function with example usage: plot_graph(n_clicks) and returns: fig, no_update