mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-24 09:31:40 +08:00
fixed rename setPalette()->setColorPalette() in examples
This commit is contained in:
parent
d2b4e07c94
commit
fa7b08940e
@ -60,7 +60,7 @@ Then this image column can be drawn with a `JKQTPColumnContourPlot`:
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "BlueGreenRed"
|
||||
graph->setPalette(JKQTPMathImageBlueGreenRed);
|
||||
graph->setColorPalette(JKQTPMathImageBlueGreenRed);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("electric potential [V]");
|
||||
// add some levels for the contours. These are chosen to be at the actual potential values
|
||||
|
@ -75,7 +75,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -85,7 +85,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -77,7 +77,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -74,7 +74,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(NX);
|
||||
graph->setHeight(NY);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
graph->setAutoImageRange(true);
|
||||
|
||||
|
@ -64,7 +64,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "BLUEYELLOW"
|
||||
graph->setPalette(JKQTPMathImageBLUEYELLOW);
|
||||
graph->setColorPalette(JKQTPMathImageBLUEYELLOW);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -84,7 +84,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -79,7 +79,7 @@ int main(int argc, char* argv[])
|
||||
graph->setWidth(w);
|
||||
graph->setHeight(h);
|
||||
// color-map is "MATLAB"
|
||||
graph->setPalette(JKQTPMathImageMATLAB);
|
||||
graph->setColorPalette(JKQTPMathImageMATLAB);
|
||||
// get coordinate axis of color-bar and set its label
|
||||
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
|
||||
// determine min/max of data automatically and use it to set the range of the color-scale
|
||||
|
@ -47,7 +47,7 @@ This function returns an integer, which you can cast to a `JKQTPMathImageColorPa
|
||||
```.cpp
|
||||
JKQTPColumnMathImage* graph=new JKQTPColumnMathImage(plot);
|
||||
// ...
|
||||
graph->setPalette(static_cast<JKQTPMathImageColorPalette>(userpalette_id));
|
||||
graph->setColorPalette(static_cast<JKQTPMathImageColorPalette>(userpalette_id));
|
||||
```
|
||||
|
||||
# Load Palettes from Files
|
||||
@ -156,7 +156,7 @@ The rest of the example program [`imageplot_userpal.cpp`](https://github.com/jkr
|
||||
graph->setWidth(1);
|
||||
graph->setHeight(1);
|
||||
// color-map is taken from cmbPalette
|
||||
plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setPalette(p); plot->redrawPlot(); });
|
||||
plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setColorPalette(p); plot->redrawPlot(); });
|
||||
cmbPalette->setCurrentColorPalette(graph->getPalette());
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ The rest of the example program [`imageplot_userpal.cpp`](https://github.com/jkr
|
||||
```.cpp
|
||||
JKQTPMathImageColorPaletteComboBox* cmbPalette=new JKQTPMathImageColorPaletteComboBox(&win);
|
||||
// ...
|
||||
plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setPalette(p); plot->redrawPlot(); });
|
||||
plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setColorPalette(p); plot->redrawPlot(); });
|
||||
cmbPalette->setCurrentColorPalette(graph->getPalette());
|
||||
```
|
||||
|
||||
|
@ -101,7 +101,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) :
|
||||
cp->setNx(histAlexNx);
|
||||
cp->setNy(histAlexNy);
|
||||
cp->setImageColumn(colHist2D);
|
||||
// cp->setPalette(JKQTPMathImageINVERTED_OCEAN);
|
||||
// cp->setColorPalette(JKQTPMathImageINVERTED_OCEAN);
|
||||
cp->setContourLevels(levels);
|
||||
cp->setTitle("contour plot");
|
||||
plotContour->addGraph(cp);
|
||||
|
@ -39,7 +39,7 @@ If you use `JKQTPXYParametrizedScatterGraph` instead of `JKQTPXYLineGraph`, you
|
||||
graph2->setXColumn(columnX);
|
||||
graph2->setYColumn(columnY);
|
||||
graph2->setColorColumn(columnR);
|
||||
graph2->setPalette(JKQTPMathImageMATLAB);
|
||||
graph2->setColorPalette(ette(JKQTPMathImageMATLAB);
|
||||
graph2->setSymbolType(JKQTPNoSymbol);
|
||||
graph2->setDrawLine(true);
|
||||
graph2->setTitle("colored spiral");
|
||||
|
@ -79,7 +79,7 @@ The second variant for setting the color of each datapoint is by mapping the val
|
||||
graph2->setXColumn(columnX);
|
||||
graph2->setYColumn(columnY2);
|
||||
graph2->setColorColumn(columnC);
|
||||
graph2->setPalette(JKQTPMathImageRYGB);
|
||||
graph2->setColorPalette(JKQTPMathImageRYGB);
|
||||
graph2->setSymbolType(JKQTPFilledRect);
|
||||
graph2->setDrawLine(true);
|
||||
graph2->setTitle("2: color");
|
||||
@ -96,7 +96,7 @@ Note also that it is possible to combine any of parametrizations above in a sing
|
||||
graph5->setYColumn(columnY5);
|
||||
graph5->setColorColumn(columnC);
|
||||
graph5->setSizeColumn(columnS);
|
||||
graph5->setPalette(JKQTPMathImageBLUEYELLOW);
|
||||
graph5->setColorPalette(JKQTPMathImageBLUEYELLOW);
|
||||
graph5->setDrawLine(true);
|
||||
graph5->setTitle("5: color+size");
|
||||
graph5->getColorBarRightAxis()->setAxisLabel("color scale for graph5");
|
||||
|
@ -39,7 +39,7 @@ Now we can use th datavectors to add a `JKQTPXYParametrizedScatterGraph`:
|
||||
graph1->setSizeColumn(columnS);
|
||||
graph1->setSymbolType(JKQTPFilledCircle);
|
||||
graph1->setColorColumn(columnG);
|
||||
graph1->setPalette(JKQTPMathImageMATLAB);
|
||||
graph1->setColorPalette(JKQTPMathImageMATLAB);
|
||||
graph1->setDrawLine(false);
|
||||
graph1->setTitle("");
|
||||
plot.addGraph(graph1);
|
||||
|
Loading…
Reference in New Issue
Block a user