# pip install ipympl
17 Interactividad en Matplotlib
%matplotlib widget
import pandas as pd
import matplotlib.pyplot as plt
from dateutil.parser import parse
= '../data/Temixco_2018_10Min.csv'
f = pd.read_csv(f,index_col=0,parse_dates=True)
tmx = tmx.columns
columnas columnas
Index(['Ib', 'Ig', 'To', 'RH', 'WS', 'WD', 'P'], dtype='object')
= plt.subplots()
fig, ax
for columna in columnas[:2]:
=columna)
ax.plot(tmx[columna],label
0,1200) ax.set_ylim(
(0.0, 1200.0)
= plt.subplots(2,sharex=True)
fig, ax
for columna in columnas[:2]:
0].plot(tmx[columna],label=columna)
ax[
1].plot(tmx.To,label="To")
ax[
for eje in ax:
eje.legend()
eje.grid()
plt.show()