Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide some example with plain Python #307

Open
CdeMills opened this issue Aug 22, 2019 · 3 comments
Open

Please provide some example with plain Python #307

CdeMills opened this issue Aug 22, 2019 · 3 comments
Labels

Comments

@CdeMills
Copy link

@CdeMills CdeMills commented Aug 22, 2019

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

@TyberiusPrime
Copy link
Contributor

@TyberiusPrime TyberiusPrime commented Aug 22, 2019

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")
@CdeMills
Copy link
Author

@CdeMills CdeMills commented Aug 22, 2019

OK, thanks. Is there something similar to plt.show() ?

Thank you
Pascal

@has2k1
Copy link
Owner

@has2k1 has2k1 commented Aug 22, 2019

OK, thanks. Is there something similar to plt.show() ?

print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.