# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from IPython.display import Image
Image('mat01.png')

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-2*np.pi, 2*np.pi, 128)
y1 = np.sin(x)

print('the len of x:', len(x))
print('the len of y1:', len(y1))
# print(x)
# print(' ')
# print(y1)
print(np.round(x[0]-x[1],5))
print(np.round(x[-1]-x[-2],5))

plt.plot(x,y1,color='r')

# +
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl

x = np.linspace(-2*np.pi, 2*np.pi, 128)
y1 = np.sin(x)
y2 = np.cos(x)

plt.title('plot simple image', color='k',fontsize=14)

plt.plot(x, y1, 'r', label='y1=sin(x)')
plt.plot(x, y2, 'b', label='y2=cos(x)')
plt.axvline(x=0, color='k')
plt.axhline(y=0, color='k')
plt.legend(loc=2,fontsize=14)
# -

# ## All done !!!
# - Please feel free to let me know if there is any questions
# - Please subscribe my youtube channel too
# - Thank you very much

StarcoderdataJupyterScriptsDedupFiltered