LoginSignup
0
1

More than 1 year has passed since last update.

Matplotlib_テスト

Last updated at Posted at 2023-06-14

初投稿になります。

matplotlibの使い方_グラフ作成(y1:sin波、y2:cos波)

import numpy as np 
import matplotlib.pyplot as plt

#データの作成
x=np.arange(0,6,0.1)
print(x)
y1=np.sin(x)
y2=np.cos(x)

#グラフの描画
plt.plot(x,y1, label="sin")
plt.plot(x,y2, linestyle="--", label="cos")#破線で描画
plt.xlabel("x")
plt.ylabel("y")
plt.title('sin&cos')#タイトル
plt.legend()
plt.show()
0
1
1

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
1