Пример #1
0
void CQPlotSubwidget::addSpectrumTab(const std::string &title,
                                     const CPlotDataChannelSpec &x,
                                     const CPlotDataChannelSpec &yone,
                                     const CPlotDataChannelSpec &ytwo)
{
  CPlotItem *item = new CPlotItem(title, NULL, CPlotItem::spectogram);
  item->addChannel(x);
  item->addChannel(yone);
  item->addChannel(ytwo);
  addPlotItem(item);
}
Пример #2
0
bool CPlotSpecification::createDefaultPlot(const CModel* model)
{
  mActive = true;

  //TODO cleanup before?
  //title = "Default Data Plot 2D";

  CPlotItem * plItem;
  std::string itemTitle;
  CPlotDataChannelSpec name2;
  const CCopasiObject * tmp;

  CPlotDataChannelSpec name1 = model->getValueReference()->getCN();

  size_t i, imax = model->getMetabolites().size();

  for (i = 0; i < imax; ++i)
    {
      tmp = model->getMetabolites()[i]->getConcentrationReference();
      name2 = tmp->getCN();
      itemTitle = tmp->getObjectDisplayName();

      plItem = this->createItem(itemTitle, CPlotItem::curve2d);
      plItem->addChannel(name1);
      plItem->addChannel(name2);
    }

  return true; //TODO: really check;
}
Пример #3
0
void CQPlotSubwidget::addHisto1DTab(const std::string &title,
                                    const CPlotDataChannelSpec &x, const C_FLOAT64 &incr)
{
  CPlotItem *item = new CPlotItem(title, NULL, CPlotItem::histoItem1d);
  item->addChannel(x);
  item->setValue("increment", incr);
  addPlotItem(item);
}
Пример #4
0
void CQPlotSubwidget::addCurveTab(const std::string &title,
                                  const CPlotDataChannelSpec &x,
                                  const CPlotDataChannelSpec &y)
{
  CPlotItem *item = new CPlotItem(title, NULL, CPlotItem::curve2d);
  item->addChannel(x);
  item->addChannel(y);
  addPlotItem(item);
}