class_docstr: A dlm module containing all plot methods
      
docstr: Plot function for the latent states (coefficents of dynamic
  component).
  
  Args:
      name: the name of the component to plot.
            It plots the latent states for the component. If dimension of
            the given component is too high, we truncate
            to the first five. Or the user can supply the ideal
            dimensions for plot in the dimensions parameter.
      dimensions: dimensions will be used
                  as the indexes to plot within that component latent
                  states.
docstr_tok: ["Plot","function","for","the","latent","states","(","coefficents","of","dynamic","component",")",".","Args",":","name",":","the","name","of","the","component","to","plot",".","It","plots","the","latent","states","for","the","component",".","If","dimension","of","the","given","component","is","too","high",",","we","truncate","to","the","first","five",".","Or","the","user","can","supply","the","ideal","dimensions","for","plot","in","the","dimensions","parameter",".","dimensions",":","dimensions","will","be","used","as","the","indexes","to","plot","within","that","component","latent","states","."]
code: def plotCoef(self, name, dimensions=None):
      """Plot function for the latent states (coefficents of dynamic
      component).
  
      Args:
          name: the name of the component to plot.
                It plots the latent states for the component. If dimension of
                the given component is too high, we truncate
                to the first five. Or the user can supply the ideal
                dimensions for plot in the dimensions parameter.
          dimensions: dimensions will be used
                      as the indexes to plot within that component latent
                      states.
      """
      # load the library only when needed
      # import pydlm.plot.dlmPlot as dlmPlot
      self.loadPlotLibrary()
  
      # provide a fake time for plotting
      if self.time is None:
          time = range(len(self.data))
      else:
          time = self.time
  
      # change option setting if some results are not available
      if not self.initialized:
          raise NameError(
              "The model must be constructed and"
              + " fitted before ploting."
          )
  
      # check the filter status and automatically turn off bad plots
      self._checkPlotOptions()
  
      # plot the latent states for a given component
      if self._checkComponent(name):
          # find its coordinates in the latent state
          indx = self.builder.componentIndex[name]
          # get the real latent states
          coordinates = range(indx[0], (indx[1] + 1))
          # if user supplies the dimensions
          if dimensions is not None:
              coordinates = [coordinates[i] for i in dimensions]
  
          # otherwise, if there are too many latent states, we
          # truncated to the first five.
          elif len(coordinates) > 5:
              coordinates = coordinates[:5]
  
          dlmPlot.plotLatentState(
              time=time,
              coordinates=coordinates,
              result=self.result,
              options=self.options,
              name=name,
          )
      else:
          raise NameError("No such component.")
  
      dlmPlot.plotout()
  
file_path: pydlm/pydlm/plot/dlmPlotMod.py
imports: from pydlm.core._dlm import _dlm
label_desc: Use image node_id 9 for calling the dlmPlotModule obj's underlying member method code with example usage: obj.plotCoef(name, dimensions) without return types