Choosing an appropriate color scheme is essential for making results easy to understand and interpret.
Factors like colorblindness and converting colors to grayscale for publications can impact accessibility. Furthermore, results should be aesthetically pleasing. The following three color schemes, recommended by M. Petroff in arXiv:2107.02270v2 and available on GitHub under the MIT License, meet these criteria.
void box(
double x1,
double y1,
double x2,
double y2,
int col) {
b1->SetFillColor(col);
b1->Draw();
auto tc =
new TLatex((
x2+
x1)/2., 0.01+(
y2+
y1)/2.,
Form(
"#splitline{%s}{%s}",
c->GetName(),
c->GetTitle()));
tc->SetTextFont(42);
tc->SetTextAlign(23);
tc->SetTextSize(0.020);
tc->Draw();
}
void accessiblecolorschemes() {
auto C =
new TCanvas(
"C",
"C",600,800);
t->SetTextSize(0.025);
t->SetTextFont(42);
t->DrawText(
x,
y-
h/2.,
"6-colors scheme");
}
t->DrawText(
x,
y-
h/2.,
"8-colors scheme");
}
t->DrawText(
x,
y-
h/2.,
"10-colors scheme");
}
}
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
To draw Mathematical Formula.
Base class for several text objects.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
- Author
- Olivier Couet
Definition in file accessiblecolorschemes.C.