简体   繁体   中英

ggplot not showing inside ipython notebook output area, rather popping up

I'm using IPython notebooks to save my results and perhaps to share code including graphics. I am using ggplot right now. But I cannot get ggplot to plot inside the notebook output area. It always gives me a pop-up window that shows the plot. I don't know how to save it along with the notebook easily. Is there something I need to configure to make that happen? "%matplotlib inline" I saw in a ggplot tutorial that below code should do it. What am I missing?

My code:

plot = ggplot(my_dataframe, aes("x")) + geom_histogram()
print plot

I got my answer elsewhere. It worked like a charm!

%pylab 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