/**
   * Creates a new plot.
   *
   * @param dataset the dataset (<code>null</code> permitted).
   * @param renderer the renderer (<code>null</code> permitted).
   */
  public WaferMapPlot(WaferMapDataset dataset, WaferMapRenderer renderer) {

    super();

    this.orientation = PlotOrientation.VERTICAL;

    this.dataset = dataset;
    if (dataset != null) {
      dataset.addChangeListener(this);
    }

    this.renderer = renderer;
    if (renderer != null) {
      renderer.setPlot(this);
      renderer.addChangeListener(this);
    }
  }
 /**
  * Sets the item renderer, and notifies all listeners of a change to the plot. If the renderer is
  * set to <code>null</code>, no chart will be drawn.
  *
  * @param renderer the new renderer (<code>null</code> permitted).
  */
 public void setRenderer(WaferMapRenderer renderer) {
   if (this.renderer != null) {
     this.renderer.removeChangeListener(this);
   }
   this.renderer = renderer;
   if (renderer != null) {
     renderer.setPlot(this);
   }
   fireChangeEvent();
 }