物理学者(ポスドク)による日々の研究生活のメモ書きです ( python/emacs/html/Japascript/シェルスクリプト/TeX/Mac/C言語/Linux/git/tmux/R/ポケモンGO)
数年 gnuplot を使っているのに、今更 with circlesというオプションがあることに気づいた・・・
x y z みたいな3列のデータがデータがあったときに
plot "hoge.txt" with circles で3列目が円の半径となるような円を描くことができる。
これを色々と活用して、あーだこーだするとこうなる・・・
ちょっと前に触っていた D3.js で描けそうなグラフができてしまった・・・
■ 参考ページ
gnuplot demo script: circles.dem
(追記 2014/11/16)
ちなみに使ったコードはこんな感じ
1列目にx座標
2列目にy座標
3列目に円の半径
ツイート
x y z みたいな3列のデータがデータがあったときに
plot "hoge.txt" with circles で3列目が円の半径となるような円を描くことができる。
これを色々と活用して、あーだこーだするとこうなる・・・
ちょっと前に触っていた D3.js で描けそうなグラフができてしまった・・・
■ 参考ページ
gnuplot demo script: circles.dem
(追記 2014/11/16)
ちなみに使ったコードはこんな感じ
set term png
set output "color_plot.png"
set size square
set xrange [-3:3]
set yrange [-3:3]
set palette model HSV functions gray,1,1 # HSV color space
#set palette model RGB rgbformulae 7,5,15 # traditional pm3d (black-blue-red-yellow)
#set palette model RGB rgbformulae 30,31,32 # color printable on gray (black-blue-violet-yellow-white)
#set palette model RGB functions gray,0,0 # gray: 0以上1以下の実数
set key outside
unset colorbox
max_n=4
plot n=0, min=15,\
"mod_data.txt" u ( min < $3 ? $1 : 1/0 ):($2):(0.1) notitle w circles lw 2 palette frac n/4.0,\
n=n+1, max=min, min=5,\
"" u (( min < $3 && $3 <= max ) ? $1 : 1/0 ):($2):(0.04) notitle w circles lw 2 lc palette frac n/4.0,\
n=n+1, max=min, min=-5,\
"" u (( min < $3 && $3 <= max ) ? $1 : 1/0 ):($2):(0.04) notitle w circles lw 2 palette frac n/4.0,\
n=n+1, max=min, min=-15,\
"" u (( $3 <= max ) ? $1 : 1/0 ):($2):(0.1) notitle w circles lw 2 palette frac n/4.0
データは適当に用意したものなので意味なしset output "color_plot.png"
set size square
set xrange [-3:3]
set yrange [-3:3]
set palette model HSV functions gray,1,1 # HSV color space
#set palette model RGB rgbformulae 7,5,15 # traditional pm3d (black-blue-red-yellow)
#set palette model RGB rgbformulae 30,31,32 # color printable on gray (black-blue-violet-yellow-white)
#set palette model RGB functions gray,0,0 # gray: 0以上1以下の実数
set key outside
unset colorbox
max_n=4
plot n=0, min=15,\
"mod_data.txt" u ( min < $3 ? $1 : 1/0 ):($2):(0.1) notitle w circles lw 2 palette frac n/4.0,\
n=n+1, max=min, min=5,\
"" u (( min < $3 && $3 <= max ) ? $1 : 1/0 ):($2):(0.04) notitle w circles lw 2 lc palette frac n/4.0,\
n=n+1, max=min, min=-5,\
"" u (( min < $3 && $3 <= max ) ? $1 : 1/0 ):($2):(0.04) notitle w circles lw 2 palette frac n/4.0,\
n=n+1, max=min, min=-15,\
"" u (( $3 <= max ) ? $1 : 1/0 ):($2):(0.1) notitle w circles lw 2 palette frac n/4.0
1列目にx座標
2列目にy座標
3列目に円の半径
PR
プロフィール
HN:coffee
職業:物理屋(自称)
趣味:映画鑑賞、登山
出身:大阪府の南の田舎
自己紹介:
import MyProfile
import coffee_pote from TWITTER
import amazonのほしい物リスト from WISH_LIST
print "先月子供が産まれました!"
# 最終更新 2022/10/25
職業:物理屋
趣味:映画鑑賞、登山
出身:大阪府の南の田舎
自己紹介:
import MyProfile
import coffee_pote from TWITTER
import amazonのほしい物リスト from WISH_LIST
print "先月子供が産まれました!"
# 最終更新 2022/10/25
カテゴリー
ブログ内検索
リンク
相互リンク募集中です
(Twitterにてお知らせください)
Demo scripts for gnuplot version 5 (gnuplotのさまざまなデモ画像と作り方がまとめられている、眺めているだけでできるようになった気分になれる)
gnuplotスクリプトの解説 (米澤進吾さんの個人ページ、gnuplotと言えばこのかた)
gnuplot のページ (Takeno Lab、うちのブログがリンクされていたのでリンク返し)
Twitterから映画の評価が分かる & 映画の鑑賞記録が残せる coco (映画の感想をまとめられるサイト、いつもお世話になっています)
Astronomy Picture of the Day Archive (天文や宇宙関連の最新の話題について画像とともにNASAが説明しているページ)
今日のほしぞら (任意の時刻の空で見える星を表示してくれる、国立天文台が管理している)
GNUPLOTとアニメーション (応用の項目の「見せてあげよう!ラピュタの雷を!!」あたりからすごすぎる)
読書メーター (読んだ本をリストできる便利なサイト)
flickr難民の写真置き場 (20XX年、flickrは有料化の炎に包まれた。あらゆるflickr無料ユーザーは絶滅したかに見えた。 しかし、tumblr移住民は死に絶えてはいなかった。)
教授でもできるMac OS X へのLaTeX, X11, gccのインストレーションと環境設定 (阪大の山中卓さんのwebページ、タイトルにセンスが溢れている、内容は超充実してる、特にTeX関連、学振DCとかPDの申請書類作成時にはお世話になっております)
英語論文執筆用の例文検索サービス (とんでもないものを見つけてしまった・・・・ arXivに収録されている 811,761報の 英語論文から,例文を検索するための検索エンジン)
Demo scripts for gnuplot version 5 (gnuplotのさまざまなデモ画像と作り方がまとめられている、眺めているだけでできるようになった気分になれる)
gnuplotスクリプトの解説 (米澤進吾さんの個人ページ、gnuplotと言えばこのかた)
gnuplot のページ (Takeno Lab、うちのブログがリンクされていたのでリンク返し)
Twitterから映画の評価が分かる & 映画の鑑賞記録が残せる coco (映画の感想をまとめられるサイト、いつもお世話になっています)
Astronomy Picture of the Day Archive (天文や宇宙関連の最新の話題について画像とともにNASAが説明しているページ)
今日のほしぞら (任意の時刻の空で見える星を表示してくれる、国立天文台が管理している)
GNUPLOTとアニメーション (応用の項目の「見せてあげよう!ラピュタの雷を!!」あたりからすごすぎる)
読書メーター (読んだ本をリストできる便利なサイト)
flickr難民の写真置き場 (20XX年、flickrは有料化の炎に包まれた。あらゆるflickr無料ユーザーは絶滅したかに見えた。 しかし、tumblr移住民は死に絶えてはいなかった。)
教授でもできるMac OS X へのLaTeX, X11, gccのインストレーションと環境設定 (阪大の山中卓さんのwebページ、タイトルにセンスが溢れている、内容は超充実してる、特にTeX関連、学振DCとかPDの申請書類作成時にはお世話になっております)
英語論文執筆用の例文検索サービス (とんでもないものを見つけてしまった・・・・ arXivに収録されている 811,761報の 英語論文から,例文を検索するための検索エンジン)
最新記事
(11/20)
(03/05)
(02/29)
(02/21)
(02/21)
(02/21)
(02/21)
(01/13)
(01/05)
(01/05)