plotnine
plotnine copied to clipboard
Please provide some example with plain Python
Hello, all the examples and tutorial are based on iPython: %matplotlib inline
start generating some fancy graph
How can I produce graphs in a simple python script ? f, ax = plt.subplots(figsize=(8, 6)
generate some graph
plt.show()
Thanks
like this
from plotnine import *
from plotnine.data import mtcars
p = ggplot(mtcars, aes(x='hp', y='mpg))
p = p + geom_point()
p.save("output.png")
OK, thanks. Is there something similar to plt.show() ?
Thank you Pascal
OK, thanks. Is there something similar to plt.show() ?
print(p)