Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mplot/CartGridVisual.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ namespace mplot {
this->dcolour3[i] = (*this->vectorData)[i][2];
}
this->zScale.transform (veclens, this->dcopy);
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
this->colourScale2.transform (this->dcolour2, this->dcolour2);
this->colourScale3.transform (this->dcolour3, this->dcolour3);
Expand Down Expand Up @@ -210,7 +212,9 @@ namespace mplot {
// Handle case where this->cm.getType() == mplot::ColourMapType::RGB and there is
// exactly one colour. ColourMapType::RGB assumes R/G/B data all in range 0->1
// ALREADY and therefore they don't need to be re-scaled with this->colourScale.
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
// Dual axis colour maps like Duochrome and HSV will need to use colourScale2 to
// transform their second colour/axis,
Expand Down
10 changes: 7 additions & 3 deletions mplot/GridVisual.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,11 @@ namespace mplot {
this->zScale.transform (veclens, this->dcopy);

// Handle case where this->cm.getType() == mplot::ColourMapType::RGB and there is
// exactly one colour. ColourMapType::RGB assumes R/G/B data all in range 0->1
// exactly one colour. ColourMapType::RGB (and RGBMono/Grey) assumes R/G/B data all in range 0->1
// ALREADY and therefore they don't need to be re-scaled with this->colourScale.
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
// Dual axis colour maps like Duochrome and HSV will need to use colourScale2 to
// transform their second colour/axis,
Expand Down Expand Up @@ -1195,7 +1197,9 @@ namespace mplot {
this->dcolour2[i] = (*this->vectorData)[i][1];
this->dcolour3[i] = (*this->vectorData)[i][2];
}
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
this->colourScale2.transform (this->dcolour2, this->dcolour2);
this->colourScale3.transform (this->dcolour3, this->dcolour3);
Expand Down
4 changes: 3 additions & 1 deletion mplot/HexGridVisual.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ namespace mplot {
// Handle case where this->cm.getType() == mplot::ColourMapType::RGB and there is
// exactly one colour. ColourMapType::RGB assumes R/G/B data all in range 0->1
// ALREADY and therefore they don't need to be re-scaled with this->colourScale.
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
// Dual axis colour maps like Duochrome and HSV will need to use colourScale2 to
// transform their second colour/axis,
Expand Down
8 changes: 6 additions & 2 deletions mplot/VoronoiVisual.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ namespace mplot {
this->dcolour2[i] = (*this->vectorData)[i][1];
this->dcolour3[i] = (*this->vectorData)[i][2];
}
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
this->colourScale2.transform (this->dcolour2, this->dcolour2);
this->colourScale3.transform (this->dcolour3, this->dcolour3);
Expand Down Expand Up @@ -491,7 +493,9 @@ namespace mplot {
// Handle case where this->cm.getType() == mplot::ColourMapType::RGB and there is
// exactly one colour. ColourMapType::RGB assumes R/G/B data all in range 0->1
// ALREADY and therefore they don't need to be re-scaled with this->colourScale.
if (this->cm.getType() != mplot::ColourMapType::RGB) {
if (this->cm.getType() != mplot::ColourMapType::RGB
&& this->cm.getType() != mplot::ColourMapType::RGBMono
&& this->cm.getType() != mplot::ColourMapType::RGBGrey) {
this->colourScale.transform (this->dcolour, this->dcolour);
// Dual axis colour maps like Duochrome and HSV will need to use colourScale2 to
// transform their second colour/axis,
Expand Down
Loading