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);
}
Sunday, April 11, 2010
ROOT: make plots more beautiful
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
Monday, March 29, 2010
Linux: how to reduce eps file size?
I have couples of eps files which have a large size (>10 MB). Thus when using them in Latex, the output files (either pdf or ps) become very large and very slow to view. So it is necessary to reduce them first. Here provided is an approch working in Linux.
- Create a new open office drawing file, past your large eps file to the canvas.
- Add your canvas hence it has no too much extra-space (magine)
- Export your drawing file to a PDF file. Here you can use low compress factors etc.
- Use "pdftops -eps YourFile.pdf" to get your small-size eps file
Friday, January 29, 2010
Linux: overwrite
http://www.cyberciti.biz/tips/howto-keep-file-safe-from-overwriting.html set -o noclobber
(no overwrite)
set +o noclobber
(overwrite)
Wednesday, November 18, 2009
Saturday, October 24, 2009
Linux: vnc via ssh
remind myself:
1. start 'vncserver -name X' on server computer (that you try to connect by ssh)
Note: X is a session name which is defined in the file: ~/vnc/xstartup
2. ssh -L 5902:localhost:5901 YourAccountName@YourServerID(or hostname) in one local terminal
3. vncviewer localhost:5902 in your another local terminal
