54 using namespace DISPLIB;
55 using namespace Eigen;
56 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
57 using namespace QtCharts;
66 , m_pLineSeries(Q_NULLPTR)
79 , m_pLineSeries(Q_NULLPTR)
88 const QVector<double> &y,
93 , m_pLineSeries(Q_NULLPTR)
117 m_sXLabel = p_sXLabel;
125 m_sYLabel = p_sYLabel;
133 QVector<double> x(y.size());
135 for(
int i = 0; i < x.size(); ++i) {
145 const QVector<double> &y)
148 m_pLineSeries =
new QLineSeries;
151 m_pLineSeries->clear();
154 for(
int i = 0; i < x.size(); ++i) {
155 m_pLineSeries->append(x[i], y[i]);
159 m_pChart =
new QChart;
162 m_pChart->removeAllSeries();
165 m_pChart->legend()->hide();
166 m_pChart->addSeries(m_pLineSeries);
167 m_pChart->createDefaultAxes();
174 void LinePlot::update()
179 m_pChart->setTitle(m_sTitle);
181 this->setChart(m_pChart);
182 this->setRenderHint(QPainter::Antialiasing);
183 this->setWindowTitle(m_sTitle);