Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:color [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:color

以前のリビジョンの文書です



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

====== カラー・スタイル・マーカー ====== ===== カラーテーブル (TColor) ===== {{:ja:root:colortable.png?600|}} <code c_mac> TCanvas *c = new TCanvas("c","Fill Area colors",0,0,500,200); c.DrawColorTable(); </code> * 使い方は単に SetFillColor(2) のように、番号で色を指定すればよい。 ===== カラーホイール ===== {{:ja:root:wheel.png?600|}} <code c_mac> TColorWheel *w = new TColorWheel(); w->Draw(); </code> * 使い方は、SetFillColor(kRed) , SetFillColor(kYellow-10) , SetLineColor(kMagenta+2) のように色名+数字で指定する ---- ===== Fill Style (TAttFill) ===== {{:ja:root:fill_patterns.png?800|}} * 0 : 塗りつぶしなし * 1001 : べた塗り * 3000+pattern number(1~25 , 100~999) :パターン色々,100~999は2種類の平行線が作るパターン *100~999については、pattern number = ijk (FillStyle = 3ijk)で3変数が対応して以下のルールに従ってパターンが決まる *i (1~9) : ハッチ(陰影、ケバ)の間隔。 1 = 1/2mm , 9 = 6mm に対応 *j (0~9) : パターンの角度。0=0°,1=10°,2=20°,3=30°,4=45°,5=書かない,6=60°,7=70°,8=80°,9=90°。時計回り *k (0~9) : パターンの角度。0=180°,1=170°,2=160°,3=150°,4=135°,5=書かない,6=120°,7=110°,8=100°,9=90°。反時計回り * 4000番台も色々あるらしい *使い方は SetFillStyle(3001) のように番号で指定する。 ---- ===== Line Style (TAttLine) ===== ==== 線種 ==== {{:ja:root:linestyle.png?600|}} * 使い方は gStyle%%->%%SetLineStyle(2) など ==== 線幅 ==== {{:ja:root:linewidth.png?600|}} * 使い方は gStyle%%->%%SetLineWidth(2) ,hist%%->%%SetLineWidth(3) など ---- ===== Marker Style (TAttMarker) ===== ==== Marker style ==== {{:ja:root:marker_style.png?600|}} <code c_mac> TMarker marker; marker.DisplayMarkerTypes(); </code> * 9~19 (8も) は scalable dot と説明されているが、違いが分からん。。 * 使い方は単に gStyle%%->%%SetMarkerStyle(3) のように番号で指定。 * 7,16 は大きさが可変でない分処理が速いらしい。SetMarkerSize は使えない。 ==== Marker size ==== {{:ja:root:marker_sizes.png?600|}} * 左上がデフォルトのサイズ = 1 (8 x 8ピクセル)。  * 使い方は gStyle%%->%%SetMarkerSize(7) など ---- ---- ===== その他 ===== ==== CreateGradientColorTable ==== <code c_mac> TColor::CreateGradientColorTable(UInt_t Number, Double_t* Stops, Double_t* Red, Double_t* Green, Double_t* Blue, UInt_t NColors, Float_t alpha = 1.) </code> * グラデーションを作る関数 * 第1引数で区切り色の数を指定し、その間を第6引数の数の段数で連続的につなぐ * RGB spaceに区切り色の数だけ点を打ち、それらを順番に直線でつないでいき、その間の色を等間隔で拾ってきてグラデーションを作る * 第2〜第5引数は第1引数(Number)で指定された要素をもつ配列で、第2引数が各区切り色の場所を表す(0 ~ 1 で表す) * 第3〜第5引数はRGBで、一般的なRGB value を255で割って規格化してある(0 ~ 1であらわされる) * 第六引数の配列要素は配列の番号が大きくなるにつれ大きくならなくてはならない(0〜1の間。0.から始まり1.で終わる) * ==== デフォルトの色を変更する ==== <code c_mac> gROOT->GetColor(3)->SetRGB(0., 0.7, 0.); // Green gROOT->GetColor(5)->SetRGB(1., 0.5, 0.); // Yellow gROOT->GetColor(7)->SetRGB(0.6, 0.3, 0.6); // Cyan </code> * 見難い色を変更することができる * RGBの値(0~255)を255で割って規格化(?)

ja/root/color.1396786292.txt.gz · 最終更新: 2014/04/06 12:11 by kota