LoginSignup
2
3

More than 1 year has passed since last update.

gnuplot メモ

Posted at

gnuplotメモ

久々に使うと絶対に忘れているので、思い出す用のメモ。
随時追加していきます。

設定

セパレータ変更

gnuplot> show datafile separator
        datafile fields separated by whitespace
---
gnuplot> set datafile separator ","

日付

gnuplot> show timefmt
        Default format for reading time data is "%d/%m/%y,%H:%M"
---
gnuplot> set xdata time
gnuplot> set timefmt "%Y/%m%d %H:%M:%S"  # as 2022/01/02 01:23:45

図のラベル

gnuplot> show xlabel
        xlabel is "", offset at (character 0, 0, 0) textcolor lt -1
gnuplot> show ylabel
        ylabel is "", offset at (character 0, 0, 0), rotated by -270 degrees in 2D plots textcolor lt -1
---
gnuplot> set xlabel "Date"
gnuplot> set ylabel "DiskFreeSpace[GB]" 

レンジの変更

gnuplot> show xrange
        set xrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
gnuplot> show yrange
        set yrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
---
gnuplot> set xrange ["1/1/1970 00:00":"2/1/1970 00:00"]
gnuplot> set yrange ["0":"1000"]

描画

直線を書く

gnuplot> fConstLine(x)=10
gnuplot> plot fConstLine(x) with lines  # (x=10の線を引く)

メモリ

gnuplot> show xtics format
...
          labels are justified automatically, format "% h" and are not rotated,
...
---
gnuplot> set xtics format "%m/%d %H:%M"

オプション値

timefmt

  • %Y/%m/%d
  • %H:%M:%S
  • %B -> 月名(December)
  • %b -> 月名の3文字省略(Dec)
  • %j -> 1年の何日目か(1-365)
  • %s -> 1970/01/01 00:00:00 からの秒数
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3