17 #include "qcustomplot.h"
34 QCustomPlot custom_plot;
36 auto graph = custom_plot.addGraph();
37 graph->setData(QVector<double>({1, 2, 3}), QVector<double>({10, 20, 30}));
47 QCustomPlot custom_plot;
49 auto graph = custom_plot.addGraph();
50 graph->setData(QVector<double>({1, 2, 3}), QVector<double>({10, 20, 30}));
54 QCPErrorBars* errorBars =
new QCPErrorBars(custom_plot.xAxis, custom_plot.yAxis);
55 errorBars->removeFromLegend();
56 errorBars->setDataPlottable(graph);
57 errorBars->setData(QVector<double>({0.1, 0.2, 0.3}));
Testing "utilr for testing" defined in TestUtils namespace.
~CustomplotTestUtilsTest()
TEST_F(CustomplotTestUtilsTest, binCentersbinValues)
Check methods to access graph bin centers and values.
materialitems.h Collection of materials to populate MaterialModel.
std::vector< double > binValues(const QCPGraph *graph)
Returns vector representing y-values on QCPgraph.
std::vector< double > binErrors(const QCPGraph *graph)
Returns vector representing bin errors of QCPGraph.
std::vector< double > binCenters(const QCPGraph *graph)
Returns vector representing bin centers on QCPgraph.