Start up QtCreator, and load the plot examples project file (QCustomPlot/examples/plots/plot-examples.pro
)
On the left, you go to mainwindow.cpp
There, navigate to the constructor of the MainWindow class. Should be the first method, somewhere around line 50.
The call of setupDemo(0)
causes the quadratic demo code to be executed. From the longer comment below that call, you can deduce the number of each demo. For example, If you want to load the Logarithmic Axis Demo, call setupDemo(9)
instead.
Then press the "play" button on the bottom left, to compile and execute the application.
The code of each demo (each corresponds to a screenshot on the website) is in its own function. Those functions are in that same mainwindow.cpp one after the other: void MainWindow::setupQuadraticDemo
, void MainWindow::setupSimpleDemo
, and so on, with their respective implementations.
Please let me know which part of the comment in the mainwindow.cpp would have needed improvement, to make it understandable for you without my help. Thanks!