第十三章 菜品摆放——数据可视化,知识点
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(4,5))
ax1=fig.add_subplot(2,2,1)
plt.subplot2grid((2,2),(0,0))
import numpy as np
x=np.arange(6)
y=np.arange(6)
plt.subplot2grid((2,2),(0,0))
plt.plot(x,y)
plt.bar(x,y)
plt.subplot()
plt.plot(x,y)
plt.subplot()
plt.bar(x,y)
fig,axes=plt.subplots(2,2)
axes[0,0].plot(x,y)
axes[1,1].bar(x,y)
fig=plt.figure()
ax1=fig.add_subplot(1,1,1)