[Back to JKQTPlotter main page](https://github.com/jkriege2/JKQtPlotter/)
# JKQtPlotter
## Filled Curve Plots
This project (see `./test/simpletest_filledgraphs/`) simply creates a JKQtPlotter widget (as a new window) and adds several filled curve graphs (Histograms). Data is initialized from QVector<int> objects.
The source code of the main application can be found in [`jkqtplotter_simpletest_filledgraphs.cpp`](https://github.com/jkriege2/JKQtPlotter/blob/master/test/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp).
First the data columns for three x-y-curves are generated. One column of x-values with entries 0,1,2,...,254,255 (256 entries).
And three columns with 256 entries each, which will be filled with the R-, G- and B-histograms of an image `example.bmp`:
```c++
size_t columnR=ds->addColumn(256, "historam_R");
size_t columnG=ds->addColumn(256, "historam_G");
size_t columnB=ds->addColumn(256, "historam_B");
```
In this example we will access the data in the internal datastore directly. This access is possible through objects of type JKQTPcolumn, which is a proxy to the data in one of the columns in a `JKQTdatastore`:
If you use `JKQTPfilledCurveYGraph` instead of `JKQTPfilledCurveXGraph`, the curve will not be filled until the y=0-axis, but until the x=0-axis. Of course you will also have to swap the x- and y-data columns. The result will look like this: