class_docstr: Abstract interface for data aggregation functionality for plotly figures.
class_docstr_tok: ["Abstract","interface","for","data","aggregation","functionality","for","plotly","figures","."]
docstr: Replace the current figure layout with the passed figure object.
  
  Parameters
  ----------
  figure: go.Figure
      The figure object which will replace the existing figure.
  convert_existing_traces: bool, Optional
      A bool indicating whether the traces of the passed ``figure`` should be
      resampled, by default True.
docstr_tok: ["Replace","the","current","figure","layout","with","the","passed","figure","object",".","Parameters","--","--","--","--","--","figure",":","go.Figure","The","figure","object","which","will","replace","the","existing","figure",".","convert_existing_traces",":","bool",",","Optional","A","bool","indicating","whether","the","traces","of","the","passed","``","figure","``","should","be","resampled",",","by","default","True","."]
code: def replace(
      self, figure: go.Figure, convert_existing_traces: bool = True
  ):
      """Replace the current figure layout with the passed figure object.
  
      Parameters
      ----------
      figure: go.Figure
          The figure object which will replace the existing figure.
      convert_existing_traces: bool, Optional
          A bool indicating whether the traces of the passed ``figure`` should be
          resampled, by default True.
  
      """
      self._clear_figure()
      self.__init__(
          figure=figure,
          convert_existing_traces=convert_existing_traces,
          default_n_shown_samples=self._global_n_shown_samples,
          default_downsampler=self._global_downsampler,
          default_gap_handler=self._global_gap_handler,
          resampled_trace_prefix_suffix=(self._prefix, self._suffix),
          show_mean_aggregation_size=self._show_mean_aggregation_size,
          verbose=self._print_verbose,
      )
  
imports: from __future__ import annotations
  import itertools
  import re
  from abc import ABC
  from collections import namedtuple
  from copy import copy
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  from uuid import uuid4
  import dash
  import numpy
  import pandas
  import plotly.graph_objects
  from pandas.io.json._normalize import nested_to_record
  from plotly.basedatatypes import BaseFigure, BaseTraceType
  from ..aggregation import AbstractAggregator, MedDiffGapHandler, MinMaxLTTB
  from ..aggregation.aggregation_interface import DataPointSelector
  from ..aggregation.gap_handler_interface import AbstractGapHandler
  from ..aggregation.plotly_aggregator_parser import PlotlyAggregatorParser
  from .utils import round_number_str, round_td_str
label_desc: Use image node_id 18 for calling the AbstractFigureAggregator obj's underlying member method code with example usage: obj.replace(figure, convert_existing_traces) without return types