Is ggplot2 available for Python? Is it true tht ggplot2 is called plotnine in Python?

Hello everyone,

I'm aware that I can do Python in RStudio.

Is ggplot2 actually available in Python? I see pyplot has a "ggplot" style, but that's no ggplot.

Upon Googling, I see plotnine, having exactly the same syntax as ggplot2. So, I guess this is ggplot2?



ggpy purports to be a ggplot2 partial emulator. I can't think of a use case for it, since anything that might be wished for as the result of a Python call can be made through {reticulate} environment and handled natively.

Thanks ggpy looks real good to me! Just curious, what's with plotnine that uses the exact syntax as ggplot2? For example,

from import economics

from plotnine import ggplot, aes, geom_line


    ggplot(economics)  # What data to use

    + aes(x="date", y="pop")  # What variable to use

    + geom_line()  # Geometric object to use for drawing


There are several derivative packages from the original ggplot2, I'm curious as to who is the "authorized retailer" so to speak.

Sorry, I have no insight for that.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.