コード例 #1
0
void InstrumentWindowPickTab::updatePlot(int detid)
{
  if (m_instrWindow->blocked())
  {
    m_plot->clearCurve();
    return;
  }
  if (m_plotPanel->isCollapsed()) return;
  InstrumentActor* instrActor = m_instrWindow->getInstrumentActor();
  Mantid::API::MatrixWorkspace_const_sptr ws = instrActor->getWorkspace();
  if (detid >= 0)
  {
    if (m_one->isChecked() || m_peak->isChecked())
    {// plot spectrum of a single detector
      plotSingle(detid);
    }
    else if (m_tube->isChecked())
    {// plot integrals
      plotTube(detid);
    }
  }
  else
  {
    m_plot->clearCurve();
  }
  m_plot->recalcAxisDivs();
  m_plot->replot();
}
コード例 #2
0
/**
 * Update the miniplot for a selected detector.
 * @param detid :: ID of detector to use to update the plot.
 */
void InstrumentWindowPickTab::updatePlot(int detid)
{
    if (m_instrWindow->blocked())
    {
        m_plot->clearCurve();
        return;
    }
    if (m_plotPanel->isCollapsed()) return;

    if (detid >= 0)
    {
        if (m_one->isChecked() || m_peak->isChecked())
        {   // plot spectrum of a single detector
            plotSingle(detid);
        }
        else if (m_tube->isChecked())
        {   // plot integrals
            plotTube(detid);
        }
    }
    else
    {
        m_plot->clearCurve();
    }
    m_plot->recalcAxisDivs();
    m_plot->replot();
}