code: def plotInMultipleFigure(time, data, result, options):
      """
      Plot the dlm results in multiple figure, each with one result and the
      original data
  
      Args:
          time: the time label
          data: the original data
          result: the fitted result from dlm class
          options: options for the plot, for details please refer to @dlm
      """
      # first compute how many plots are needed
      numOfPlots = (
          options.plotFilteredData
          + options.plotPredictedData
          + options.plotSmoothedData
      )
      size = (numOfPlots, 1)
      location = 1
  
      # plot all needed results
      # plot fitered results if needed
      if options.plotFilteredData:
          # the location
          subplot(size, location)
  
          # plot original data
          plotData(
              time=time,
              data=data,
              showDataPoint=options.showDataPoint,
              color=options.dataColor,
              label="time series",
          )
  
          start = result.filteredSteps[0]
          end = result.filteredSteps[1] + 1
          if start < end:
              plotData(
                  time=time[start:end],
                  data=to1dArray(result.filteredObs[start:end]),
                  showDataPoint=options.showFittedPoint,
                  color=options.filteredColor,
                  label="filtered series",
              )
  
              if options.showConfidenceInterval:
                  upper, lower = getInterval(
                      result.filteredObs[start:end],
                      result.filteredObsVar[start:end],
                      p=options.confidence,
                  )
  
                  plotInterval(
                      time=time[start:end],
                      upper=to1dArray(upper),
                      lower=to1dArray(lower),
                      intervalType=options.intervalType,
                      color=options.filteredColor,
                  )
          plt.legend(loc="best", shadow=True)  # , fontsize = 'x-large')
          location += 1
  
      # plot predicted results if needed
      if options.plotPredictedData:
          # the location
          subplot(size, location)
  
          # plot original data
          plotData(
              time=time,
              data=data,
              showDataPoint=options.showDataPoint,
              color=options.dataColor,
              label="time series",
          )
  
          start = result.filteredSteps[0]
          end = result.filteredSteps[1] + 1
          if start < end:
              plotData(
                  time=time[start:end],
                  data=to1dArray(result.predictedObs),
                  showDataPoint=options.showFittedPoint,
                  color=options.predictedColor,
                  label="one-day prediction",
              )
  
              if options.showConfidenceInterval:
                  upper, lower = getInterval(
                      result.predictedObs[start:end],
                      result.filteredObsVar[start:end],
                      p=options.confidence,
                  )
                  plotInterval(
                      time=time[start:end],
                      upper=to1dArray(upper),
                      lower=to1dArray(lower),
                      intervalType=options.intervalType,
                      color=options.predictedColor,
                  )
          plt.legend(loc="best", shadow=True)
          location += 1
  
      # plot smoothed results if needed
      if options.plotSmoothedData:
          # the location
          subplot(size, location)
  
          # plot original data
          plotData(
              time=time,
              data=data,
              showDataPoint=options.showDataPoint,
              color=options.dataColor,
              label="time series",
          )
  
          start = result.smoothedSteps[0]
          end = result.smoothedSteps[1] + 1
          if start < end:
              plotData(
                  time=time[start:end],
                  data=to1dArray(result.smoothedObs),
                  showDataPoint=options.showFittedPoint,
                  color=options.smoothedColor,
                  label="smoothed series",
              )
  
              if options.showConfidenceInterval:
                  upper, lower = getInterval(
                      result.smoothedObs[start:end],
                      result.smoothedObsVar[start:end],
                      p=options.confidence,
                  )
                  plotInterval(
                      time=time[start:end],
                      upper=to1dArray(upper),
                      lower=to1dArray(lower),
                      intervalType=options.intervalType,
                      color=options.smoothedColor,
                  )
          plt.legend(loc="best", shadow=True)
  
file_path: pydlm/pydlm/plot/dlmPlot.py
imports: import matplotlib.pyplot
  from pydlm.base.tools import getInterval
label_desc: Use image node_id 2 for calling a global function with example usage: plotInMultipleFigure(time, data, result, options) without return types