前の画面〕 〔クリックポイント〕 〔最新の一覧〕 〔全て読んだことにする〕〔全て読んだことにして終了〕 〔終了

1606 re(1):background color
2007/7/12(木)13:57 - 竹の - nolm01.iee.niit.ac.jp - 5248 hit(s)

引用する
現在のパスワード


松岡> ということで質問はgnuplotでbackground colorってあったんでしたっけ?

terminal によります。つまり、背景色を指定する一般的な方法はなかったと思い
ます。

例えば x11 terminal では、X のリソースで gnuplot*background: を指定します
(または単に -bg でも指定可)。

PNG/GIF/JPEG (gd ドライバ) terminal では、最初のカラー指定 color0 が背景色
です。

wxt, tgif, postscript terminal は、明示的な背景色指定は持っていないと思い
ますが、tgif や postscript は、出力ファイルをいじることで背景色の指定は可
能だろうと思います。

確かに、背景色指定コマンドがあるといいかもしれませんね。

松岡> ざっとplotのhelpをよみましがfillを使ってなんとかするんでしょうか。

確かに、multiplot を使えばそれなりに背景色を変える手はあります。

----- ここから -----
## 背景色全体を変える
set multiplot
set lmargin 0
set rmargin 0
set tmargin 0
set bmargin 0
set yrange [0:1]
unset border
unset ytics
unset xtics
plot 1 with filledcurves y1=0 2
reset
plot sin(x)
unset multiplot
----- ここまで -----

全体の背景色でなくて、グラフ部分の背景色だけ変える場合は、マージンの調
整が必要になります。

----- ここから -----
## グラフ領域のみの背景色を変える
set multiplot
set lmargin 7.5
set bmargin 2.0
set yrange [0:1]
unset border
unset ytics
unset xtics
plot 1 with filledcurves y1=0 2
reset
plot sin(x)
unset multiplot
----- ここまで -----

上の lmargin, bmargin の値は terminal (やフォントのサイズ) 依存です。
ただし、gnuplot-4.0 までだとは margin の値は整数しか指定できません。


〔ツリー構成〕

【1604】 background color 2007/7/12(木)11:41 松岡 (419)
┣【1606】 re(1):background color 2007/7/12(木)13:57 竹の (1445)
┣【1607】 re(2):background color 2007/7/12(木)16:20 松岡 (319)
┣【1609】 re(3):background color 2007/7/16(月)10:07 竹の (1398)
┣【1610】 re(4):background color 2007/7/16(月)16:25 松田七美男 (845)
┣【1611】 re(4):background color 2007/7/17(火)03:42 松岡 (172)
┣【1612】 re(5):background color 2007/7/17(火)09:51 松岡 (368)
┣【1608】 re(1):background color 2007/7/13(金)14:50 松田七美男 (844)

前の画面〕 〔クリックポイント〕 〔最新の一覧〕 〔全て読んだことにする〕〔全て読んだことにして終了〕 〔終了

※ 『クリックポイント』とは一覧上から読み始めた地点を指し、ツリー上の記事を巡回しても、その位置に戻ることができます.