Sunday, April 11, 2010

ROOT: make plots more beautiful

http://ultrahigh.org/2007/08/20/making-pretty-root-color-palettes/

In ROOT, we can change its default to make plots more beautiful.

void
set_plot_style()
{
const Int_t NRGBs = 5;
const Int_t NCont = 255;

Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
gStyle->SetNumberContours(NCont);
}

Linux:bash:about "delete key"

When I use "delete key" in some bash terminal, the key sends a tilde "~" instead of deleting the char that is supposed to be deleted.

Find a solution:
1. In your $HOME directory, create or edit your keyboard-mapping file, $HOME/.inputrc
2. Add one mapping line:

"\M-[3~": delete-char

3. restart your terminal

Locations of visitors to this page