【环境配置】

anaconda(python的各种库)

sublime(文本编辑器)

【源程序】

# -*- coding: utf-8 -*-

import numpy as np
import math
import matplotlib.pyplot as plt

X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C, S = np.cos(X), np.sin(X)

plt.plot(X, C)
plt.plot(X, S)

plt.show()


【测试结果】

【Python繁星点点】【KPoint-005】plot sin&&cos

相关文章:

  • 2021-05-02
  • 2021-11-09
  • 2021-10-03
  • 2021-05-29
  • 2021-09-05
  • 2021-12-20
  • 2021-12-16
  • 2021-07-30
猜你喜欢
  • 2021-05-08
  • 2021-05-06
  • 2021-10-22
  • 2022-01-18
  • 2021-05-29
  • 2022-12-23
  • 2021-06-14
相关资源
相似解决方案