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)
{
auto b1 =
new TBox(x1, y1, x2, y2);
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);
double w = 0.2;
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");
}
}
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
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.