以前のリビジョンの文書です
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line
1458
Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
79
Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
101
Warning: preg_match(): Compilation failed: invalid range in character class at offset 3120 in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/lexer.php on line
118
A PCRE internal error occured. This might be caused by a faulty plugin
====== ヒストグラムを規格化(Scale)して、さらにエラーバーをつけたい ======
----
ヒストグラムの規格化では、TH1::Draw の"E"オプションを使えば良い。
===== サンプルコード =====
<code c_mac>
// マクロ test.C のサンプルコード
void test()
{
TH1D *h1 = new TH1D("h1","h1",100,-10,10);
TH1D *h2 = new TH1D("h2","h2",100,-10,10);
TCanvas *c = new TCanvas("c","c",700,600);
h1->FillRandom("gaus",10000);
h2->FillRandom("gaus",1000);
TH1D *h1e = (TH1D*)h1->Clone("h1e");
TH1D *h2e = (TH1D*)h2->Clone("h2e");
h2e->Sumw2();
h2->Scale(10);
h2e->Scale(10);
h1->SetLineColor(2);
h2->SetLineColor(4);
h1e->SetLineColor(2);
h2e->SetLineColor(4);
h1->Draw();
h1e->Draw("same e1");
h2->Draw("same");
h2e->Draw("same e1");
gPad->Modified();
gPad->Update();
}
</code>