LoginSignup
1

More than 5 years have passed since last update.

gnuplotでファイルの一行目をtitleにする

Posted at

グヌヌプヨッヨで数値計算の結果をアニメーションにする際、
一行目に時間のデータが入っていて、それをタイトルにしたい…したくない?
となった時のメモ。

コマンドラインでheadコマンドをうってその結果をtimeに格納し、
sprintfで適当に整形してtitleにセット。
今回の場合はtimeがsec.で入っているので、hrに直してタイトルにしてます。

file = (好きなファイル名を入れてね!)
time = system("head -1 " . file)
set title sprintf("%2.2f hrs", time / 3600)

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
1