code: def plotInOneFigure(time, data, result, options):
      """
      Plot the dlm results in one figure
  
      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
      """
      # plot the original data
      plotData(
          time=time,
          data=data,
          showDataPoint=options.showDataPoint,
          color=options.dataColor,
          label="time series",
      )
  
      # plot fitered results if needed
      if options.plotFilteredData:
          start = result.filteredSteps[0]
          end = result.filteredSteps[1] + 1
          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,
              )
  
          # plot predicted results if needed
      if options.plotPredictedData:
          start = result.filteredSteps[0]
          end = result.filteredSteps[1] + 1
          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,
              )
  
      # plot smoothed results if needed
      if options.plotSmoothedData:
          start = result.smoothedSteps[0]
          end = result.smoothedSteps[1] + 1
          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 1 for calling a global function with example usage: plotInOneFigure(time, data, result, options) without return types