Plain plots?

From: Thomas Kraemerkaemper (kraemerk@Physik.Uni-Dortmund.DE)
Date: Mon Sep 22 1997 - 18:22:05 MEST


Hi,

I would like to get some publication ready postscript output from
several plots. First I thought this would be quite easy now with ROOT,
but after spending several hours I give up now and ask the community:

What I want is just plain plots; no 3D stuff, no background colors.
Looks like a simple task, but has become a bold challenge for me.

1. I used only one pad. After some time I figured out (mostly by try and
error, because the options are spread widely in the documentation and
also nomenclature is not always clear (e.g. which frame belongs to which
object?) that I could get rid of all unwanted 'decorations' with:

aCanvas = new TCanvas("aCanvas", "My Screen", 0, 0, 640, 400);
aCanvas->cd();
aCanvas->SetFillStyle(0);
// Set fill style to hollow mode.
aCanvas->SetBorderMode(0);
// Switch off the 3D effects.
// Alternatively: +1, -1 for above/behind the screen.
aCanvas->SetLineColor(10);
// Set line color to white (?).

Only after drawing some histogram into this pad one can get access to
the frames to get rid of them:

aCanvas->GetFrame()->SetFillStyle(0);
aCanvas->GetFrame()->SetBorderMode(0);

This finally works but is way too much to do for such a simple request!
BTW: 'gStyle->SetLabelFont(40)' has no effect. I have to use
histo->GetXaxis()->SetLabelFont(40);
to obtain what I want.

2a. Now I would like to use 4 pads:

aCanvas->Divide(2, 2, 0., 0., 0);
// 0 means 'use color of parent pad', says documentation...
aCanvas->cd(1);

Plotting of four histograms yields to four nice histograms, but all of
them have now an unwanted grey background and 3D decorations. I had
expected that they inherit the behaviour of the parent. In addition,
despite the pad-margins of 0., there is a small gap between the four
histgrams (on display only). 

2b. Now I try everything that worked for the single pad for these four
pads:

aCanvas_1->SetFillStyle(0);
// Means hollow fill style.
aCanvas_1->SetBorderMode(0);
aCanvas_1->SetLineColor(10);
aCanvas_1->GetFrame()->SetFillStyle(0);
aCanvas_1->GetFrame()->SetBorderMode(0);

No change. Especially is the filling not 'hollow', but solid.

2c. Now I try instead a solid fill style with color white:

Mh, which number is 'white'? Unfortunatly, 'white' seems not to be at
some special position in the ROOT color table. Would be nice to have
something like the Xt macros BlackPixel() and WhitePixel(); this is a
problem because the 256 colors of my workstation are already used up by
several applications, hence, I can found a dozen 'whites' either via
'View->Colors'-menu or via the ROOT www site and the TAttFill
description. With a b&w terminal you simply have no chance at all to
find it out. Finally I believe number 10 is correct:

aCanvas_1->SetFillStyle(1001);
// Means solid fill style.
aCanvas_1->SetFillColor(10);
aCanvas_1->SetBorderMode(0);
aCanvas_1->SetLineColor(10);
aCanvas_1->GetFrame()->SetFillStyle(0);
aCanvas_1->GetFrame()->SetBorderMode(0);

Yields to a brighter background grey, but still a grey...


Any suggestions what I'm doing wrong? Despite the likely possibility
that I did something very stupidly wrong, I have the impression that it
_is_ difficult in ROOT to figure out what one has to change to get a
different look&feel of the plots than the default one. Much www pages to
read to find out, what option changes what.


Tsch"uss, Thomas (using a Sparcstation 20 as a display, running root
1.03/03 at a RS6000 with AIX4.1).



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET