简体   繁体   中英

Plot inside Ipython Notebook

I'm using IPython notebooks to share code and (hopefully) graphics with m collaborators. sadly, I cannot get matplotlib to plot inside the notebook, it always gives me a pop-up window, which I obviously cannot include in notebook pastes or similar.

Here's two minimal examples of how I go about plotting things.

Either with invoking plt.show() , or without it .

this either gives me an external pop-up, or plots nothing.

您需要使用matplotlib内联后端

%matplotlib inline

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM