{"slug": "plotnine", "name": "plotnine", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 7, "commenters": 12, "warners": 0, "score": 7.234, "rising": -2.29, "first": "2025-11-25", "latest": "2026-08-01", "why": "One of the best things to happen recently in data science is the plotnine library, bringing the grammar of graphics to python imho", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 7, "neutral": 2, "compare": 3, "warn": 0}, "spark": [2, 1, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "One of the best things to happen recently in data science is the plotnine library, bringing the grammar of graphics to python imho", "kind": "", "icon": true, "domain": "plotnine.org", "github_repo": null, "official_url": "https://plotnine.org", "pricing": "", "aliases": ["plotnine", "Plotnine"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 786181632, "item_id": 49136352, "url": "https://news.ycombinator.com/item?id=49136352", "by": "abirch", "date": "2026-08-01", "stance": "recommend", "quote": "Have you checked out plotnine?", "excerpt": "Have you checked out plotnine? https://raw.githubusercontent.com/rstudio/cheatsheets/main/plotnine.pdf it's made by the same people behind ggplot. Hadley Wickham worked for RStudio which also created plotnine. plotnine is currently sponsored by Posit where Hadley works.", "context": "", "use_case": "Plotting / charting", "switched_from": "", "story": "Flint: A Visualization Language for the AI Era"}, {"id": 778421168, "item_id": 48651323, "url": "https://news.ycombinator.com/item?id=48651323", "by": "epistasis", "date": "2026-06-23", "stance": "recommend", "quote": "This is definitely one of the better Python plotting libraries out there", "excerpt": "This is definitely one of the better Python plotting libraries out there, but no matter which one I use, they make me yearn for R. The R language is just so much more beautiful than Python, in its full lispy goodness, with lazy evaluation. It doesn't matter quite as much now that I have LLMs write a good chunk of the plotting code. But the LLM python plotting code is easily 5x-10x as many lines as a hand-crafted R pl", "context": "", "use_case": "plotting", "switched_from": "", "story": "Plotnine"}, {"id": 778328608, "item_id": 48645538, "url": "https://news.ycombinator.com/item?id=48645538", "by": "kasperset", "date": "2026-06-23", "stance": "recommend", "quote": "While it is good to have plotnine for python", "excerpt": "While it is good to have plotnine for python but ggplot2 in R has this whole ecosystem of packages/extensions that augment the ggplot2 such as ggalluvial, ggrepel. More at this link https://exts.ggplot2.tidyverse.org/gallery/ This would make it really compelling to tip my toes in the Python world. Regardless, I am liking this \"ggplotification\" of python. All we need is more \"tidification\" of Python data frame world.", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 777613474, "item_id": 48600842, "url": "https://news.ycombinator.com/item?id=48600842", "by": "mightyham", "date": "2026-06-19", "stance": "recommend", "quote": "it gives me a nice ggplot like API", "excerpt": "I find matplotlib to be clunky and verbose compared to ggplot. When using python, I will often use https://plotnine.org/ because it gives me a nice ggplot like API.", "context": "", "use_case": "ggplot-style Python plots", "switched_from": "", "story": "Gribouille 0.3.0: A Grammar of Graphics for Typst"}, {"id": 737976368, "item_id": 46123523, "url": "https://news.ycombinator.com/item?id=46123523", "by": "clickety_clack", "date": "2025-12-02", "stance": "recommend", "quote": "One of the best things to happen recently in data science is the plotnine library, bringing the grammar of graphics to python imho", "excerpt": "The R ecosystem has had a similar evolution with the tidyverse, it was just a little further ago. As for Matlab, I initially learned statistical programming with it a long time ago, but I\u2019m not sure I\u2019ve ever seen it in the wild. I don\u2019t know what\u2019s going on there. I\u2019m actually quite partial to R myself, and I used to use it extensively back when quick analysis was more valuable to my career. Things have probably pro", "context": "", "use_case": "Grammar-of-graphics plotting in Python", "switched_from": "", "story": "Python Data Science Handbook"}]}], "caveats": [], "who": [{"by": "drtc", "context": "data scientist", "url": "https://news.ycombinator.com/item?id=46067873", "date": "2025-11-27"}], "tags": [], "use_cases": ["plotting", "plotting / charting", "agent-generated plots", "data visualization", "ggplot-style python plots", "grammar-of-graphics plotting in python"], "compared": [{"slug": "ggplot2", "name": "ggplot2", "co": 6, "switched_from": 0, "switched_to": 0}, {"slug": "matplotlib", "name": "matplotlib", "co": 4, "switched_from": 0, "switched_to": 0}, {"slug": "altair", "name": "Altair", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "seaborn", "name": "seaborn", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [{"id": 778347616, "item_id": 48646726, "url": "https://news.ycombinator.com/item?id=48646726", "by": "closed", "date": "2026-06-23", "stance": "recommend", "quote": "I worked on the plotnine guide (https://plotnine.org/guide/).", "excerpt": "Hey! I worked on the plotnine guide (https://plotnine.org/guide/). Always interested to hear what people find hard to understand about plotnine, or what they wish there were more of (e.g. examples, guide pages, api reference docs). (Both has2k1 and I work for Posit, which supports plotnine work, but authoring its guide was mostly an act of passion for me :)", "context": "", "use_case": "Python plotting library", "switched_from": "", "story": "Plotnine"}, {"id": 778299297, "item_id": 48643706, "url": "https://news.ycombinator.com/item?id=48643706", "by": "has2k1", "date": "2026-06-23", "stance": "neutral", "quote": "I am the author of plotnine.", "excerpt": "There is this new and very promising package that adds interactivity to plotnine graphs https://y-sunflower.github.io/ninejs/. Disclaimer: I am the author of plotnine.", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 778285520, "item_id": 48642845, "url": "https://news.ycombinator.com/item?id=48642845", "by": "has2k1", "date": "2026-06-23", "stance": "recommend", "quote": "the next release (v0.16.0) will bring nice capabilities.", "excerpt": "If you already use plotnine, or if this has piqued your interest, the next release (v0.16.0) will bring nice capabilities. You can get a sneak peek by installing the pre-release: pip install --pre plotnine Details here: https://github.com/has2k1/plotnine/issues/1031 Disclaimer: I'm the author.", "context": "author of plotnine", "use_case": "", "switched_from": "", "story": "Plotnine"}], "threads": [{"url": "https://news.ycombinator.com/item?id=48596488", "title": "Plotnine", "mentions": 10}, {"url": "https://news.ycombinator.com/item?id=48541062", "title": "Gribouille 0.3.0: A Grammar of Graphics for Typst", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=46047580", "title": "Python is not a great language for data science", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49130604", "title": "Flint: A Visualization Language for the AI Era", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46120611", "title": "Python Data Science Handbook", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 2}, "2025-12": {"recommend": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 3, "compare": 3, "neutral": 2}, "2026-07": {}, "2026-08": {"recommend": 1}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 786181632, "item_id": 49136352, "url": "https://news.ycombinator.com/item?id=49136352", "by": "abirch", "date": "2026-08-01", "stance": "recommend", "quote": "Have you checked out plotnine?", "excerpt": "Have you checked out plotnine? https://raw.githubusercontent.com/rstudio/cheatsheets/main/plotnine.pdf it's made by the same people behind ggplot. Hadley Wickham worked for RStudio which also created plotnine. plotnine is currently sponsored by Posit where Hadley works.", "context": "", "use_case": "Plotting / charting", "switched_from": "", "story": "Flint: A Visualization Language for the AI Era"}, {"id": 778426402, "item_id": 48651650, "url": "https://news.ycombinator.com/item?id=48651650", "by": "jablongo", "date": "2026-06-23", "stance": "compare", "quote": "difficult for me to see the difference between matplotlib, seaborn, and plotnine, when used in this way", "excerpt": "I use agents more and more for generating and refining plots, and its difficult for me to see the difference between matplotlib, seaborn, and plotnine, when used in this way. Agentic coding seems especially well suited to working with scientific figures, and that performance seems more or less agnostic to the underlying framework used (though they seem to prefer matplotlib, given the amount of training data for using", "context": "", "use_case": "agent-generated plots", "switched_from": "", "story": "Plotnine"}, {"id": 778421168, "item_id": 48651323, "url": "https://news.ycombinator.com/item?id=48651323", "by": "epistasis", "date": "2026-06-23", "stance": "recommend", "quote": "This is definitely one of the better Python plotting libraries out there", "excerpt": "This is definitely one of the better Python plotting libraries out there, but no matter which one I use, they make me yearn for R. The R language is just so much more beautiful than Python, in its full lispy goodness, with lazy evaluation. It doesn't matter quite as much now that I have LLMs write a good chunk of the plotting code. But the LLM python plotting code is easily 5x-10x as many lines as a hand-crafted R pl", "context": "", "use_case": "plotting", "switched_from": "", "story": "Plotnine"}, {"id": 778343648, "item_id": 48646478, "url": "https://news.ycombinator.com/item?id=48646478", "by": "ForceBru", "date": "2026-06-23", "stance": "compare", "quote": "plotnine renders plots using matplotlib and has matplotlib as a dependency", "excerpt": "Seems like plotnine renders plots using matplotlib and has matplotlib as a dependency: https://github.com/has2k1/plotnine/blob/f6f5cb424f38329c52672d5b9dc33684bd73e39b/pyproject.toml#L26", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 778328608, "item_id": 48645538, "url": "https://news.ycombinator.com/item?id=48645538", "by": "kasperset", "date": "2026-06-23", "stance": "recommend", "quote": "While it is good to have plotnine for python", "excerpt": "While it is good to have plotnine for python but ggplot2 in R has this whole ecosystem of packages/extensions that augment the ggplot2 such as ggalluvial, ggrepel. More at this link https://exts.ggplot2.tidyverse.org/gallery/ This would make it really compelling to tip my toes in the Python world. Regardless, I am liking this \"ggplotification\" of python. All we need is more \"tidification\" of Python data frame world.", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 778275776, "item_id": 48642236, "url": "https://news.ycombinator.com/item?id=48642236", "by": "qrobit", "date": "2026-06-23", "stance": "neutral", "quote": "And it comes with tidyverse-like cheatsheet[1] that I confused with ggplot2 when first discovered plotnine", "excerpt": "And it comes with tidyverse-like cheatsheet[1] that I confused with ggplot2 when first discovered plotnine [1]: https://github.com/rstudio/cheatsheets/blob/main/plotnine.pdf", "context": "", "use_case": "data visualization", "switched_from": "", "story": "Plotnine"}, {"id": 778273200, "item_id": 48642075, "url": "https://news.ycombinator.com/item?id=48642075", "by": "jamessb", "date": "2026-06-23", "stance": "neutral", "quote": "Whilst it's still not yet at 1.0.0, it's not that new", "excerpt": "> a new python plotting library Whilst it's still not yet at 1.0.0, it's not that new: the first (0.1.0) release was in 2017: https://pypi.org/project/plotnine/#history", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 778272416, "item_id": 48642026, "url": "https://news.ycombinator.com/item?id=48642026", "by": "jamessb", "date": "2026-06-23", "stance": "neutral", "quote": "Plotnine is heavily inspired by the ggplot2 library", "excerpt": "Plotnine is heavily inspired by the ggplot2 library, which uses the + operator in the same way: https://ggplot2.tidyverse.org/#usage", "context": "", "use_case": "", "switched_from": "", "story": "Plotnine"}, {"id": 778062002, "item_id": 48628875, "url": "https://news.ycombinator.com/item?id=48628875", "by": "mcanouil", "date": "2026-06-22", "stance": "compare", "quote": "I already drifted apart from ggplot2/plotnine in many ways", "excerpt": "With a constructor, you get to document/validate. A plain dictionary makes this harder or virtually impossible (you most often will silently fail). https://m.canouil.dev/gribouille/reference/core/aes.html I already drifted apart from ggplot2/plotnine in many ways, I don't mind as long as it's not confusing. I've opened a GitHub issue about this question (no ansers at this point): https://github.com/mcanouil/gribouill", "context": "", "use_case": "", "switched_from": "", "story": "Gribouille 0.3.0: A Grammar of Graphics for Typst"}, {"id": 777613474, "item_id": 48600842, "url": "https://news.ycombinator.com/item?id=48600842", "by": "mightyham", "date": "2026-06-19", "stance": "recommend", "quote": "it gives me a nice ggplot like API", "excerpt": "I find matplotlib to be clunky and verbose compared to ggplot. When using python, I will often use https://plotnine.org/ because it gives me a nice ggplot like API.", "context": "", "use_case": "ggplot-style Python plots", "switched_from": "", "story": "Gribouille 0.3.0: A Grammar of Graphics for Typst"}, {"id": 737976368, "item_id": 46123523, "url": "https://news.ycombinator.com/item?id=46123523", "by": "clickety_clack", "date": "2025-12-02", "stance": "recommend", "quote": "One of the best things to happen recently in data science is the plotnine library, bringing the grammar of graphics to python imho", "excerpt": "The R ecosystem has had a similar evolution with the tidyverse, it was just a little further ago. As for Matlab, I initially learned statistical programming with it a long time ago, but I\u2019m not sure I\u2019ve ever seen it in the wild. I don\u2019t know what\u2019s going on there. I\u2019m actually quite partial to R myself, and I used to use it extensively back when quick analysis was more valuable to my career. Things have probably pro", "context": "", "use_case": "Grammar-of-graphics plotting in Python", "switched_from": "", "story": "Python Data Science Handbook"}, {"id": 737085974, "item_id": 46067873, "url": "https://news.ycombinator.com/item?id=46067873", "by": "drtc", "date": "2025-11-27", "stance": "recommend", "quote": "Seaborn, altair, plotnine all take ggplot's GoG and bring it to Python and I'm really grateful for that.", "excerpt": "I work as a data scientist where I do lots of exploratory work using Python+Pandas/Polars+Jupyter notebooks, I have to say that I agree with the title of the article. I feel like I'm using Python more and more in a way that is just not native to it. Strict typing is simply necessary at some point in time, but I don't get any of the performance benefits or compile-time warnings that other languages provide. But more t", "context": "data scientist", "use_case": "plotting", "switched_from": "", "story": "Python is not a great language for data science"}, {"id": 736822256, "item_id": 46051391, "url": "https://news.ycombinator.com/item?id=46051391", "by": "aorist", "date": "2025-11-25", "stance": "recommend", "quote": "If you want the admittedly very thoughtful design of ggplot in Python, use plotnine", "excerpt": "> Examples include converting boxplots into violins or vice versa, turning a line plot into a heatmap, plotting a density estimate instead of a histogram, performing a computation on ranked data values instead of raw data values, and so on. Most of this is not about Python, it\u2019s about matplotlib. If you want the admittedly very thoughtful design of ggplot in Python, use plotnine > I would consider the R code to be sl", "context": "", "use_case": "Grammar of graphics plotting in Python", "switched_from": "", "story": "Python is not a great language for data science"}]}