mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2025-01-13 01:10:33 +08:00
typo/format fix
This commit is contained in:
parent
5e0471d0eb
commit
f5d4eb3190
@ -20,19 +20,23 @@ And three columns with 256 entries each, which will be filled with the R-, G- an
|
|||||||
```
|
```
|
||||||
|
|
||||||
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`:
|
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`:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
JKQTPcolumn cG=ds->getColumn(columnG);
|
JKQTPcolumn cG=ds->getColumn(columnG);
|
||||||
JKQTPcolumn cR=ds->getColumn(columnR);
|
JKQTPcolumn cR=ds->getColumn(columnR);
|
||||||
JKQTPcolumn cB=ds->getColumn(columnB);
|
JKQTPcolumn cB=ds->getColumn(columnB);
|
||||||
```c++
|
```
|
||||||
|
|
||||||
In order to calculate the histograms, first all enries in the columns are set to 0:
|
In order to calculate the histograms, first all enries in the columns are set to 0:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
cR.setAll(0);
|
cR.setAll(0);
|
||||||
cG.setAll(0);
|
cG.setAll(0);
|
||||||
cB.setAll(0);
|
cB.setAll(0);
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally the histogram is calculated:
|
Finally the histogram is calculated:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
QImage image(":/example.bmp");
|
QImage image(":/example.bmp");
|
||||||
for (int y=0; y<image.height(); y++) {
|
for (int y=0; y<image.height(); y++) {
|
||||||
@ -49,6 +53,7 @@ Finally the histogram is calculated:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Finally three `JKQTPfilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only):
|
Finally three `JKQTPfilledCurveXGraph` objects are generated and added to the plot (here we show the code for the R-channel only):
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot);
|
JKQTPfilledCurveXGraph* graphR=new JKQTPfilledCurveXGraph(&plot);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user