本文へスキップ
Ctrl+K

Home

  • Gallery
  • Research
  • Github
  • Memo
  • Note
  • Gallery
  • Research
  • Github
  • Memo
  • Note

セクションナビゲーション

  • Gallery
  • Plotting cos function

注釈

Go to the end to download the full example code.

Plotting cos function#

\[x \rightarrow \cos(x)\]
plot cos
import numpy as np
import matplotlib.pyplot as plt

fig, ax = plt.subplots(1,1)
x = np.linspace(0, 2*np.pi, 100)
y = np.cos(x)
ax.plot(x,y)
plt.show()

Total running time of the script: (0 minutes 0.062 seconds)

Download Jupyter notebook: plot_cos.ipynb

Download Python source code: plot_cos.py

Download zipped: plot_cos.zip

Gallery generated by Sphinx-Gallery

前へ

Gallery

次へ

multiple contourf plots with colorbar1

このページ

  • ソースコードを表示

© Copyright 2021, Yasutaka Hanada.

Sphinx 7.3.7 を使用して作成されました。

PyData Sphinx Theme 0.16.1 で構築されています。