对大家有帮助的问答会被标记为“推荐”,看完课程过来浏览一下别人提的问题,会帮你学得更全面
用c.NotebookApp.notebook_dir搜索不出,但用c.ServerApp.notebook_dir 可以成功搜索并修改
在ipynb文件中代码执行不报错,但是图形没有显示,是什么原因呢。我把render_notebook()改成render()也没有生成html文件
这个图例只显示了一个,是哪出问题了呀
from matplotlib import pyplot as plt
plt.rcParams['font.sans-serif']=['KaiTi']
data1=[1,2,3,5,10,12,13]
data2=[3,-1,10,12,13,9,11]
x=range(1,8)
ax1=plt.subplot()
ax2=ax1.twinx()
ax1.plot(x,data1,label='温度',color='r')
ax1.set_xlabel('时间')
ax1.set_ylabel('湿度')
ax2.set_ylabel('温度')
ax2.plot(x,data2,label='湿度',color='blue')
plt.legend()
plt.show()
老师,用c.NotebookApp.notebook_dir搜索不出
用c.ServerApp.notebook_dir 可以成功搜索并修改