Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
349 views
in Technique[技术] by (71.8m points)

pandas - How to update/re-show inline figure in Jupyter

I'm making some plots in Juptyer Notebook with Python 3 and Pandas:

hist = df.hist('grade', bins=10, histtype='step')

which works fine, produces the histogram and all. But now I want to make some changes to the plot:

for ax in hist[0]:
    ax.spines['right'].set_visible(False)
    ax.spines['top'].set_visible(False)
    ax.spines['left'].set_visible(False)

which doesn't produce any errors but also doesn't produce a new plot with the changes. How do I get a new inline plot to appear, or update the original plot? I've tried plt.show() and display(hist[0]) and again get no errors but also no plot.

question from:https://stackoverflow.com/questions/65640967/how-to-update-re-show-inline-figure-in-jupyter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...