Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- def main():
- x = np.linspace(0,3,4) # xの値域(0, 1, 2, 3)
- y = x + 1 # 直線の式
- plt.plot(x,y,"r-") # 直線を引く
- plt.show() # グラフ表示
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment