Locked History Actions

Topdrawer

Topdrawer

テンプレート

define command include "set file input="
set font duplex
set wid=5 permanent
set label size=3 permanent
set title size=3 permanent
(set size 13 13
(set limit x 0 10
(set scale y log
(set window x 2 12 y 1 9
(set order x y dx dy

タイトルの位置を変える

(y軸のタイトルを左にちょっとずらす
title left lines=-0.5 'y-axis'
(x軸のタイトルを上にずらす
title lines=1 bottom 'x-axis'

上下の目盛を消す

set ticks bottom off top off

初期設定ファイル

 ~/.topdrawrc

Ticks の 長さと数の変更

  • set font duplex
    set width 3
    set size x 10 y 5
    set window x 2 8 y 2 4
    set limit x 0 10 y 0 5
    set ticks size 0.1 long 2
    set scale x labels 3 ticks 20
    set scale y labels 5 ticks 2
    1 1
    2 2
    join 1
    end
  • nticks.td.png

  • nticks.td

    • set scale x labels 3 で x 軸の長い ticks の数を指定。長い ticks にはラベルが表示されるので、ラベルの数を指定しているのと同じ。x の部分を y にすれば y 軸について、all にすれば x 軸 および y 軸についての設定を行う。
    • set scale x ticks 10 で x 軸の短い ticks の数を指定。
    • set ticks size 0.1 で ticks の長さを指定。
    • set ticks long 2 で短い ticks に対する長い ticks の長さを指定。2 とすれば、長い ticks の長さは短い ticks の 2 倍となる。

外向きの ticks

  • 普通にやっても無理なので、まず ticks をオフにし、枠だけ表示してから、外側に新たに枠を用意し ticks を書く。
  • set font duplex
    set width 3
    set size x 10 y 5
    set window x 2 8 y 2 4
    set label y shift 3.0
    set limit x 0 10 y 0 10
    set ticks bottom off
    set order x y
    1 1
    2 2
    join
    set window x 2 8 y 1 2
    set limit x 0 10 y 0 10
    set axis off top on
    set ticks top on
    -1 -1
    join
    end
  • outer_ticks.td.png

  • outer_ticks.td

中が塗りつぶされた四角

  • set fill entry 1 blue full と set fill entry 2 size 999 で設定。二つのコマンドは、デフォルトの fill の設定 (entry 1 は斜め -45 の斜線、entry 2 は +45 の斜線)を変更している。full が塗りつぶしの設定。
  • set font duplex
    set width 3
    set size x 10 y 5
    set window x 2 8 y 2 4
    set limit x 0 10 y 0 5
    set fill entry 1 blue full
    set fill entry 2 size 999
    box at 5 2 dsize 1 1 fill blue
    1 1
    2 2
    join 1
    end
  • fill_full.td.png

  • fill_full.td

多角形

  • 多角形は join で描く。fill オプションをつけると fill される。fill の見た目を変更するには、 set fill ~~ とする。
  • set font duplex
    set width 3
    set size x 6 y 6
    set window x 1 5 y 1 5
    set limit x 0 10 y 0 10
    5 8
    7 7
    8 5
    7 3
    5 2
    3 3
    2 5
    3 7
    5 8
    join 1 fill
    end
  • polygon.td.png

  • polygon.td