mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-26 18:41:40 +08:00
0e2237e92f
- fixed JKQTPColumnMathImage with modifiers - improved documentation - make use of link_prl/create_prl in QMake projects (see http://doc.qt.io/qt-5/qmake-advanced-usage.html)
34 lines
793 B
C++
34 lines
793 B
C++
#include "TestWidgetEmptyPlot.h"
|
|
#include <QDebug>
|
|
#include <QDate>
|
|
#include <QDateTime>
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
|
|
TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) :
|
|
QWidget(parent)
|
|
{
|
|
|
|
|
|
#define NEMPTY 500
|
|
|
|
JKQTPlotter* plotEmpty=new JKQTPlotter(true, this);
|
|
JKQTPXYLineGraph* efunc=new JKQTPXYLineGraph(plotEmpty->getPlotter());
|
|
double xef[NEMPTY], efy[NEMPTY];
|
|
for (int i=0; i<NEMPTY; i++) {
|
|
xef[i]=i;
|
|
efy[i]=double(i%5)*1e-308;
|
|
}
|
|
efunc->setXColumn(plotEmpty->getDatastore()->addCopiedColumn(xef, NEMPTY, "x"));
|
|
efunc->setYColumn(plotEmpty->getDatastore()->addCopiedColumn(efy, NEMPTY, "y"));
|
|
plotEmpty->addGraph(efunc);
|
|
plotEmpty->getYAxis()->setLogAxis(true);
|
|
plotEmpty->zoomToFit();
|
|
plotEmpty->setY(0,0);
|
|
|
|
|
|
|
|
}
|