使用%matplotlib笔记本时,我得到了两个图,而不是熊猫系列中的一个图。
单元格中的代码为:
%matplotlib notebook import matplotlib.pyplot as plt fig=plt.figure() ax1=fig.add_subplot(1,1,1) cTitle='H-alpha plot '+galaxy[10:17] cXAxisTitle='Galactocentric radius/pixels' cYAxisTitle='Data counts' ax1.set_title(cTitle) ax1.set_xlabel(cXAxisTitle) ax1.set_ylabel(cYAxisTitle) ax1.grid() ds.plot()
我得到图1和图2:
图1中的标题,轴标签和网格线是我想要的(期望),图2中的图也是我期望的。但是为什么我还是要得到两个地块?
[使用%matplotlib笔记本时,我得到了两个图,而不是熊猫系列中的一个图。单元格中的代码为:%matplotlib笔记本将matplotlib.pyplot导入为plt fig = plt.figure()ax1 = fig.add_subplot(...
开始于: