import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from numpy.random import randn
from pandas import Series, DataFrame
from matplotlib import rcParams
%matplotlib inline
rcParams['figure.figsize'] = 5,4
x = range(1,10)
y = [1,2,3,4,0,4,3,2,1]
fig = plt.figure()
ax = fig.add_axes([.1,.1,1,1])
ax.plot(x,y)
[<matplotlib.lines.Line2D at 0x1da765be280>]
fig = plt.figure()
ax = fig.add_axes([.1,.1,1,1])
ax.set_xlim([1,9])
ax.set_ylim([0,5])
ax.set_xticks([0,1,2,4,5,6,8,9,10])
ax.set_yticks([0,1,2,3,4,5])
ax.plot(x,y)
[<matplotlib.lines.Line2D at 0x1da764afd60>]
fig = plt.figure()
ax = fig.add_axes([.1,.1,1,1])
ax.set_xlim([1,9])
ax.set_ylim([0,5])
ax.grid()
ax.plot(x,y)
[<matplotlib.lines.Line2D at 0x1da76481550>]
#plot 1:
x1 = np.array([0, 1, 2, 3])
y1 = np.array([3, 8, 1, 10])
plt.subplot(1, 2, 1)
plt.plot(x1,y1)
#plot 2:
x2 = np.array([0, 1, 2, 3])
y2 = np.array([10, 20, 30, 40])
plt.subplot(1, 2, 2)
plt.plot(x2,y2)
plt.show()
import os
os.system('jupyter nbconvert --to html 1_filter_select.ipynb')