绘制df1['Volume (BTC)'].plot(label='EUR Volume')
后,第一个子图(ax1)的图形线完全消失。我做错了吗?
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
df = pd.read_csv('eurPrice.csv', index_col='Timestamp', parse_dates=True)
ax1 = plt.subplot(2, 1, 1)
df['sourceA'].plot(label='sourceA')
df['sourceB'].plot(label='sourceB')
plt.legend()
ax2 = plt.subplot(2, 1, 2, sharex = ax1)
df1 = pd.read_csv('eurVolume.csv', index_col='Timestamp', parse_dates=True)
df1['Volume (BTC)'].plot(label='EUR Volume')
plt.legend()
plt.show()