parameters: (self, **kwargs)
docstring: 1. gathers the data for the selected kwargs
          2. removes plot elements for sources which have no data
          3. plot the data
          3.a Creates the 'plt_obj' if it does not exist
          3.b Updates the 'plt_obj' with the new data.
          4. adjusts the plot
docstring_summary: 1. gathers the data for the selected kwargs
          2. removes plot elements for sources which have no data
          3. plot the data
          3.a Creates the 'plt_obj' if it does not exist
          3.b Updates the 'plt_obj' with the new data.
          4. adjusts the plot
docstring_tokens: 1 . gathers the data for the selected kwargs 2 . removes plot elements for sources which have no data 3 . plot the data 3 . a Creates the plt_obj if it does not exist 3 . b Updates the plt_obj with the new data . 4 . adjusts the plot
function: def visualize(self, **kwargs):
          """
          1. gathers the data for the selected kwargs
          2. removes plot elements for sources which have no data
          3. plot the data
          3.a Creates the 'plt_obj' if it does not exist
          3.b Updates the 'plt_obj' with the new data.
          4. adjusts the plot
          """
          if self.data_reader is None:
              raise RuntimeError(
                  "No data readers are given. Did you provide run_directories"
                  " during construction?"
                  " If not, call set_run_directories() before calling"
                  " visualize()!")
  
          # check that not multiple iteratons or timesteps are selected.
          # Since time is preferred over iteration if both are passed,
          # we check time first.
          # Note: the readers might be capable of dealing with multiple
          # values but visualization is not.
          if 'time' in kwargs:
              if isinstance(kwargs['time'], list):
                  raise ValueError(
                      "This class only supports single timestep visualization!")
          if 'iteration' in kwargs:
              if isinstance(kwargs['iteration'], list):
                  raise ValueError(
                      "This class only supports single iteration visualization!")
  
          self.collect_data(**kwargs)
  
          # first remove the stuff for which we don't have data from the ax
          self.remove_plots_without_data()
  
          # second plot everything for which we have data
          self.draw_data()
  
          self.adjust_plot(**kwargs)
function_tokens: def visualize ( self , * * kwargs ) : if self . data_reader is None : raise RuntimeError ( "No data readers are given. Did you provide run_directories" " during construction?" " If not, call set_run_directories() before calling" " visualize()!" ) # check that not multiple iteratons or timesteps are selected. # Since time is preferred over iteration if both are passed, # we check time first. # Note: the readers might be capable of dealing with multiple # values but visualization is not. if 'time' in kwargs : if isinstance ( kwargs [ 'time' ] , list ) : raise ValueError ( "This class only supports single timestep visualization!" ) if 'iteration' in kwargs : if isinstance ( kwargs [ 'iteration' ] , list ) : raise ValueError ( "This class only supports single iteration visualization!" ) self . collect_data ( * * kwargs ) # first remove the stuff for which we don't have data from the ax self . remove_plots_without_data ( ) # second plot everything for which we have data self . draw_data ( ) self . adjust_plot ( * * kwargs )