0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

gnuplotで電磁波のグラフ

0
Posted at

電磁波のグラフのgnuplotでの作成例

諸々のグラフ作成の雛形になるポテンシャルを感じたので、ここに置いておこうと思います。

reset

#グラフ設定
set terminal pngcairo size 1000,1000      
set output 'wave.png'                                  
unset border
unset xtics
unset ytics
unset ztics
unset zlabel
unset xlabel
unset ylabel
set ticslevel 0  
set xrange [0:4*pi]                          
set yrange [-1:1]                          
set zrange [-1:1]
                 

set parametric
set urange [0:4*pi]

#label
set label 11 "波の伝播方向"   at 4*pi, 0, 0 offset 1,-0.1 front
set label 12 "電場" at 0,    1, 0 offset -0.5,1.0 front
set label 13 "磁場" at 0,    0, 1 offset -1,1.0 front

#軸
set arrow 1 from 0,0,0 to 4*pi,0,0 \
    head filled size screen 0.03,15,45 lw 2
set arrow 2 from 0,-1,0 to 0,1,0 \
    head filled size screen 0.03,15,45 lw 2
set arrow 3 from 0,0,-1 to 0,0,1 \
    head filled size screen 0.03,15,45 lw 2


splot u, sin(u), 0 w l lc 'blue',\
 u, 0, sin(u) w l lc 'red'

結果

Screenshot 2025-12-03 at 1.01.20.png

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?