LoginSignup
1
0

More than 5 years have passed since last update.

入力された数式をmatplotplibでプロット(Python3)

Last updated at Posted at 2018-11-29

はじめに

Python3を用いたグラフ描写プログラムを書いていきます。

環境

Python 3.6.6
matplotlib
numpy

プログラム本体

from numpy import *
import matplotlib.pyplot as plt

x = arange(-10, 10, 0.1)
y = eval(input('f(x)='))

plt.plot(x, y)
plt.show()

Github

入力された関数のグラフがプロットされます。

お疲れ様でした。

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