Vespucci  1.0.0
plotwidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef PLOTWIDGET_H
21 #define PLOTWIDGET_H
22 
23 #include <QWidget>
24 #include <qcustomplot.h>
25 #include <QVector>
26 #include <mlpack/core.hpp>
28 class VespucciWorkspace;
29 namespace Ui {
30 class PlotWidget;
31 }
32 using namespace std;
33 using namespace arma;
34 typedef vector<double> stdvec;
35 class PlotWidget : public QWidget
36 {
37  Q_OBJECT
38 
39 public:
40  explicit PlotWidget(QWidget *parent, QSharedPointer<VespucciWorkspace> ws);
41  ~PlotWidget();
42  void AddPlot(const mat & paired_data);
43  void AddPlot(const vec &abscissa, const vec &data);
44  void AddTransientPlot(const vec &abscissa, const vec &data);
45  void AddTransientPlot(const mat & paired_data);
46  void AddScatterPlot(const mat & paired_data);
47  void AddScatterPlot(const vec &abscissa, const vec &data);
48  void AddMappedScatterPlot(const mat & paired_data, const vec &categorical);
49  void AddMappedScatterPlot(const vec & abscissa, const vec &data, const vec &categorical);
50  void RemoveTransientPlot();
51  bool TransientOnly() const;
52  void SavePlot(QString filename);
53 
54 private:
55  Ui::PlotWidget *ui;
56  QList<QColor> colors_;
57  QColor GetNextColor();
58  QSharedPointer<VespucciWorkspace> workspace_;
59  QCPGraph *transient_graph_;
60 };
61 
62 #endif // PLOTWIDGET_H
Definition: ahcadialog.h:26
A plottable representing a graph in a plot.
Definition: qcustomplot.h:2540
The VespucciWorkspace class A class which contains all "global variables" (that aren&#39;t held in MainWi...
vector< double > stdvec
Definition: plotwidget.h:34
bool SavePlot(QCustomPlot *plot, QString filename)
Vespucci::SavePlot.
Definition: global.cpp:30