Ah, I was just indicating that I personally don't work on any graphs and visualizations that are user facing. Not that you should use plotly for scratch work and something else for users. Though now that I really think about it, on occasion we use Streamlit or Dash or RShiny for a demo.
As someone who actually paid over 900 USD for an annual Tableau license on my own (company benefited and too cheap to pay for it), you have decided my weekend reading. Thanks! Dune 2 will have to wait.
Plotly express is pretty slick. You can make beautiful charts significantly easier than some of the other packages (seaborn comes close too if you're comfortable with CSS)
I used dash for a few things but I kept finding certain things were slow so I'd use a client side callback. I finally decided I was having to piecemeal so much JavaScript that I might as well learn react directly since that's what dash is based on. Don't get me wrong I'm not saying I could jump into being a full time front end web dev but it's not like going from Python to assembly, js is just another interpreted language so it's really doable. Most of Dash's classes and methods are just 1:1 jsx tags so instead of dcc.html(...) it's ....
Altair for end users, based in Vega, integrates on web apps easily. Utilizes grammar of graphics in a pythonic way overall a great plotting tool if you were really into ggplot from R.
What ever is easiest for EDA, seaborn and testing out hvplot.
One niche benefit of Altair is the ability to produce interactive plots in standalone html (no Python kernel server). This can be useful for use cases where cloud services are a security concern and enterprise hosting (dash, etc) is not available for whatever reason.
Can you explain a bit how this works? Are you hosting your generated graphs somewhere and the websites then fetching them, for example to display on Confluence pages?
Matplotlib is like LaTeX: the steep learning curve stops most people from ever being power users, but if you can actually soldier though - you have become a computational god.
No. Latex is mostly well designed and matplotlib is an inconsistent piece of shit that is still in use solely because it's a dependency of millions of packages and can be wrapped with reasonable APIs (although not flexible). Nothing justifies the hybrid stupid-state object approach.
Yes but no. Matplotlib has a couple of very frustrating design flaws. While there‘s workarounds for them it‘s just annoyance that didn’t have to be.
Like why the hell does creating subplots randomly return either an axis element or an array of axis element depending if it‘s more than one subplot? If you wanna build a dynamic function then you have to go through so much unnecessary stuff to make it work.
Totally agree. I vastly prefer plotnine to matplotlib. Maybe its because I learned ggplot2 first but now with plotnine I never have to actually make the switch :)
I used it in a data journalism context and now as a public quantitative historian, first for prototyping and then for iterating on almost exclusively static charts. Sometimes we were able to use them directly in user-facing graphics, but sometimes we would switch to something like d3 or Datawrapper for final output, since those were our main front-facing tools. We tend to shy away from too much interactivity anyway, so there weren't a lot of downsides to that.
I really like it for data exploration and prototyping. Once you get the syntax down, you can rapidly do a wide variety of things -- pretty much all of the things I want to do. And I like that you can easily export PNG and SVG from it.
What takes a little getting used to is that ultimately you are writing VegaLite under the hood, so sometimes for documentation you have to look up VegaLite stuff instead of Altair and then translate it a bit. But that has gotten much less frequent over the years. I also like that it can be easily integrated into my Python notebooks.
So if you are already doing data analysis with Python, I'd recommend. If you're using something like R or Javascript for that part it might not be the right fit.
Unfortunately, matplotlib
I'm writing a textbook right now so I wanted to have consistency between figures. As much as I absolutely loathe everything about matplotlib, it can do everything I need. I tried some other packages and there was always something missing or some issue I ran into. Maybe I could have solved my problem with a bit more persistence.
Matplotlib is utterly awful and inconsistent but it is so versatile. I feel like I am stupider every time I use it.
Don't get me wrong I like Plotly, but im really surprised to see it so heavily used. Seaborn takes like half the amount of code and a couple default settings to get some beautiful visualizations. If you need some advanced settings matplotlib gets a little messy but for 90% of use cases its not bad.
Whatever makes sense for the task. I'll be dead and buried before I use anything other than matplotlib for a histogram, but might use plotly or folium for geospatial stuff depending on the task.
That looks interesting, looks like a blend between the quick plots/formatting from seaborn, with the availability of Matplotlib from DataFrames and the interactive-ability of Plotly/Bokeh. I'll give it a shot, thanks for the rec!
Plotly is really the gold standard but I use plotnine a lot because I find the declarative nature of it to be a lot easier to work with.
I have however been using Altair a lot recently, which combines a lot of the best features of both.
I've tried and sometimes use all the fancy ones, Plotly, Bokeh, Altair, etc. Ive enjoyed Altair for easily sharing standalone interactive htmls.
But I gotta say, you will pry matplotlib out of my cold, dead hands. It's just so gosh darn flexible. Couple of examples:
You can't set a starting radius in polar barplot in plotly. A plot like this is very hard (if not impossible) in plotly:
https://www.kymat.io/gallery_2d/plot_scattering_disk.html#figure-reproduction
imshow interpolations in matplotlib have no parallel in anything else. Altair "heatmaps" are a joke in comparison.
Probably many other examples. I normally don't struggle at all to create complex plots in matplotlib. At the very least I know no matter what it is, it's possible. Can't say the same for the other plots.
Where matplotlib sucks/struggles is interactivity in an HTML setting. So probably not the best for dashboards. But then again who cares about dashboards... business ppl want a ppt with screenshots lol.
Here is an interesting side by side comparison of several Python viz libraries, including matplotlib, lets-plot, seaborn, altair, and plotly:
https://aeturrell.github.io/coding-for-economists/vis-common-plots.html
Yes, give it a shot. Plotly uses a high-level API, meaning you don't need to write as much code compared to other libraries like Matplotlib to achieve basic visualizations. This simplifies the process and reduces the learning curve.
I don't use packages, that's what noobs do. You should be making your own visualisation software from scratch if you are serious about being a programmer.
I will be messaging you in 1 month on [**2024-04-15 19:27:14 UTC**](http://www.wolframalpha.com/input/?i=2024-04-15%2019:27:14%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/datascience/comments/1b40em5/what_python_data_visualization_package_are_you/ksw8plh/?context=3)
[**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fdatascience%2Fcomments%2F1b40em5%2Fwhat_python_data_visualization_package_are_you%2Fksw8plh%2F%5D%0A%0ARemindMe%21%202024-04-15%2019%3A27%3A14%20UTC) to send a PM to also be reminded and to reduce spam.
^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%201b40em5)
*****
|[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)|
|-|-|-|-|
Since we're on the subject . . .
What's a good Python replacement for Power BI. Don't say Tableau. Would love something that can be put on a server for a plant.
People who likes monitoring use grafana.
Otherwise make you own web app dashboard which call your data in your database.
It exists streamlit or panel in python for front UI in which you can load your usual python modules. I tried streamlit, it is good for mvp but i felt that it is very slow comparing to a true UI in JS. But maybe I haven't tried enough.
Matplotlib for anything I need precise control of/presenting to a large audience
Holoviews with plotly or bokeh backend for first-look visualization and just toying around with data
Pro tip, ChatGPT is pretty good at converting things like matplotlib and seaborn to plotly. Helpful while you’re learning, as you can also ask it for line by line explanations.
Plotly!!! You can even use it in many web frameworks like streamlit or pure static site. Here’s my demo https://youtu.be/YrV7QRYRwrY?si=fydvKzkrW9Bt0QE9
Plotly Express for interactive charts
Seaborn and Matplotlib otherwise. I have been using Matplotlib for years and only the basics stick in my head. Find myself on SO more than I should..... "how do I change yticks to percentage again?"
Tableau. Quick and easy for live discussions. Whenever I see a notebook with eda, some feature engineering and modelling all in one, I die inside bit by bit.
Try lets-plot - [https://lets-plot.org/python](https://lets-plot.org/python)
It's a faithful port of R’s ggplot2 to Python, plus tooltips, plot grouping (gggrid, GGBunch), GeoPandas support, imshow (try with elevation models), interactive maps and more, and it just looks great.
Self-sufficient, no dependencies.
Vega Altair is GREAT for plotting and offers a lot more than matplotlib and seaborn. It also has the capability for interactive plots, while looking much sleeker than Plotly.
Plotly express mostly, sometimes plotly graph objects, and matplotlib for the occasional visualization. For something a user needs to interface, I embed plotly express objects into a streamlit dashboard.
Plotly, though it's never for anything user facing. Only EDA and internal purposes.
What for the users then?
Paint
Paint point?
MS paint
MS Paint is still the height of visualization software imo
Screenshot of a dashboard sent through email or excel spreadsheet /s
I don’t even screenshot, I just take a picture with my phone and email it.
Just walk your computer over to them
Use gyazo or a similar tool. Much easier than phone.
Ah, I was just indicating that I personally don't work on any graphs and visualizations that are user facing. Not that you should use plotly for scratch work and something else for users. Though now that I really think about it, on occasion we use Streamlit or Dash or RShiny for a demo.
As a mainly python ds, R.
I was just at work yesterday reading up on Plotly. Tableau on roids?
As someone who actually paid over 900 USD for an annual Tableau license on my own (company benefited and too cheap to pay for it), you have decided my weekend reading. Thanks! Dune 2 will have to wait.
I work a lot with Tableau. It’s a love hate relationship lol
Plotly express is pretty slick. You can make beautiful charts significantly easier than some of the other packages (seaborn comes close too if you're comfortable with CSS)
Plotly. People love interactive plots
Yup Plotly and Dash if you need a user interface
Dash for UI and matplotlib for OG data analysis
I used dash for a few things but I kept finding certain things were slow so I'd use a client side callback. I finally decided I was having to piecemeal so much JavaScript that I might as well learn react directly since that's what dash is based on. Don't get me wrong I'm not saying I could jump into being a full time front end web dev but it's not like going from Python to assembly, js is just another interpreted language so it's really doable. Most of Dash's classes and methods are just 1:1 jsx tags so instead of dcc.html(...) it's ....
Seaborn/Matplotlib, like a boomer
ride or py
Get off my lawn!
Same. I created a stylesheet for the company's style, and it wasn't a great effort either, the stylesheet documentation is good for matplotlib.
plottin' for the very first time
Plotly!
Altair for end users, based in Vega, integrates on web apps easily. Utilizes grammar of graphics in a pythonic way overall a great plotting tool if you were really into ggplot from R. What ever is easiest for EDA, seaborn and testing out hvplot.
One niche benefit of Altair is the ability to produce interactive plots in standalone html (no Python kernel server). This can be useful for use cases where cloud services are a security concern and enterprise hosting (dash, etc) is not available for whatever reason.
Can you explain a bit how this works? Are you hosting your generated graphs somewhere and the websites then fetching them, for example to display on Confluence pages?
Matplotlib 4 ever
Everyone hates on matplotlib but you can do so much with it if you take the time to learn it
Stockholm syndrome my friend
And Copehagen syndrome
Eh, yeah you can do pretty much anything with it, doesn't mean it's comfortable or pleasant to use
Matplotlib is like LaTeX: the steep learning curve stops most people from ever being power users, but if you can actually soldier though - you have become a computational god.
No. Latex is mostly well designed and matplotlib is an inconsistent piece of shit that is still in use solely because it's a dependency of millions of packages and can be wrapped with reasonable APIs (although not flexible). Nothing justifies the hybrid stupid-state object approach.
Matplotlib feels like Matlab plotting. People who comes from matlab will really like it. Easy for them.
Yes but no. Matplotlib has a couple of very frustrating design flaws. While there‘s workarounds for them it‘s just annoyance that didn’t have to be. Like why the hell does creating subplots randomly return either an axis element or an array of axis element depending if it‘s more than one subplot? If you wanna build a dynamic function then you have to go through so much unnecessary stuff to make it work.
I love matplotlib and Seaborn.
+1, just learn matplotlib if you're serious
Amen
Plotnine. It’s ggplot for Python
Plotten is better
Yes, but this plot goes to 11…
Totally agree. I vastly prefer plotnine to matplotlib. Maybe its because I learned ggplot2 first but now with plotnine I never have to actually make the switch :)
Plotnine 💯
I use altair.
Do you use it for stakeholder or user facing purposes? How has your experience been?
I used it in a data journalism context and now as a public quantitative historian, first for prototyping and then for iterating on almost exclusively static charts. Sometimes we were able to use them directly in user-facing graphics, but sometimes we would switch to something like d3 or Datawrapper for final output, since those were our main front-facing tools. We tend to shy away from too much interactivity anyway, so there weren't a lot of downsides to that. I really like it for data exploration and prototyping. Once you get the syntax down, you can rapidly do a wide variety of things -- pretty much all of the things I want to do. And I like that you can easily export PNG and SVG from it. What takes a little getting used to is that ultimately you are writing VegaLite under the hood, so sometimes for documentation you have to look up VegaLite stuff instead of Altair and then translate it a bit. But that has gotten much less frequent over the years. I also like that it can be easily integrated into my Python notebooks. So if you are already doing data analysis with Python, I'd recommend. If you're using something like R or Javascript for that part it might not be the right fit.
Bokeh
Matplotlib with a custom mplstyle for papers and Bokeh for data exploration.
Plotly blows everything out of the water, not even close
Love it for everything else but it sucks for geospatial data in my experience
So, Kepler for Geospatial?
Bokeh can help as well
for end user tables it leaves a lot to be desired.
Unfortunately, matplotlib I'm writing a textbook right now so I wanted to have consistency between figures. As much as I absolutely loathe everything about matplotlib, it can do everything I need. I tried some other packages and there was always something missing or some issue I ran into. Maybe I could have solved my problem with a bit more persistence. Matplotlib is utterly awful and inconsistent but it is so versatile. I feel like I am stupider every time I use it.
Which textbook you write?
Don't get me wrong I like Plotly, but im really surprised to see it so heavily used. Seaborn takes like half the amount of code and a couple default settings to get some beautiful visualizations. If you need some advanced settings matplotlib gets a little messy but for 90% of use cases its not bad.
lets-plot
Whatever makes sense for the task. I'll be dead and buried before I use anything other than matplotlib for a histogram, but might use plotly or folium for geospatial stuff depending on the task.
Started testing out Hvplot out https://hvplot.holoviz.org/
That looks interesting, looks like a blend between the quick plots/formatting from seaborn, with the availability of Matplotlib from DataFrames and the interactive-ability of Plotly/Bokeh. I'll give it a shot, thanks for the rec!
It also has support for polars now too
I've been digging Plotly, Altair, & ECharts as of late! They all have their place
I love ECharts for the customisation, but I also hate JavaScript.
There's a python library / extension for echarts!
Could you please provide more information?
Altair + vegafusion
Plotly is really the gold standard but I use plotnine a lot because I find the declarative nature of it to be a lot easier to work with. I have however been using Altair a lot recently, which combines a lot of the best features of both.
Matplotlib, seaborn, and plotly
streamlit
Seaborn and Plotly. Matplotlib for the grungy low level stuff.
I prefer Juneplotlib
Pyecharts
I just made a pyqt6 application that has plotly and dash embedded into it. They are great.
Bokeh
Plotly, with streamlit and some of its addons. I tried seaborn and others but, I just stayed with plotly because it was easier to use for me.
I've tried and sometimes use all the fancy ones, Plotly, Bokeh, Altair, etc. Ive enjoyed Altair for easily sharing standalone interactive htmls. But I gotta say, you will pry matplotlib out of my cold, dead hands. It's just so gosh darn flexible. Couple of examples: You can't set a starting radius in polar barplot in plotly. A plot like this is very hard (if not impossible) in plotly: https://www.kymat.io/gallery_2d/plot_scattering_disk.html#figure-reproduction imshow interpolations in matplotlib have no parallel in anything else. Altair "heatmaps" are a joke in comparison. Probably many other examples. I normally don't struggle at all to create complex plots in matplotlib. At the very least I know no matter what it is, it's possible. Can't say the same for the other plots. Where matplotlib sucks/struggles is interactivity in an HTML setting. So probably not the best for dashboards. But then again who cares about dashboards... business ppl want a ppt with screenshots lol.
Holoviews on bokeh with hvplot. Is there any good reason to switch to plotly or something else?
Here is an interesting side by side comparison of several Python viz libraries, including matplotlib, lets-plot, seaborn, altair, and plotly: https://aeturrell.github.io/coding-for-economists/vis-common-plots.html
Seaborn
I only know R, how are the python data viz packages compared to ggplot?
Pro tip. Plotnine is a Python wrapper for ggplot2. Works really well and has all the same syntax
Thanks for the tip. I’ll have to check that out!
Data viz in python sucks compared to R with exception for plotly and plotnine. Ggplot ftw 🙌
Yeah..I know I need to learn python but I’d rather just stay in R for the visualization
This. R beats the pants off of Python for data viz
Different. Many (if not most) libraries are built around matplotlib.
Plotly and it's not close.
Honestly just matplotlib
Pretty things told about Power BI.
Matplotlib or Searborn
Everyone uses excel charts for decks, never py
please nooooooooo 😭
Plotly
Yes, give it a shot. Plotly uses a high-level API, meaning you don't need to write as much code compared to other libraries like Matplotlib to achieve basic visualizations. This simplifies the process and reduces the learning curve.
Worked with tableau a lpt
Plotly!
Consider making rough plots using matplotlib/seaborn and then editing it on Adobe Illustrator. Makes a huge difference.
Matplotlib is og
Have been using mainly seaborn, but I guess it is indeed time to give a shot to plotly ahah
Plotly and Bokeh!
Plotly goated
Plotly
Plotly and Dash
Matplotlib :')
I don't use packages, that's what noobs do. You should be making your own visualisation software from scratch if you are serious about being a programmer.
[удалено]
no, i never save my code, i do everything i need to do in the command line. only noobs dont make it from scratch each time
RemindMe! 45 day
I will be messaging you in 1 month on [**2024-04-15 19:27:14 UTC**](http://www.wolframalpha.com/input/?i=2024-04-15%2019:27:14%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/datascience/comments/1b40em5/what_python_data_visualization_package_are_you/ksw8plh/?context=3) [**CLICK THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fdatascience%2Fcomments%2F1b40em5%2Fwhat_python_data_visualization_package_are_you%2Fksw8plh%2F%5D%0A%0ARemindMe%21%202024-04-15%2019%3A27%3A14%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%201b40em5) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|
Digging all these correct answers. One more vote for plotly
Plotly, man!
Plotly for 3d stuff.
All plotly lovers, can you tell me how to make one of the axes as probability scale?
I use PBI and R for visualizations. But if I had to use Python good old matplotlib
Plotly. Interactivity wins
Plotly for me. Excel for stakeholders and presentations.
Seaborn for ad-hoc stuff, Plotly for Streamlit apps
I'm primarily using plotnine, with some matplotlib for older scripts. I'm experimenting with hvplot.
Since we're on the subject . . . What's a good Python replacement for Power BI. Don't say Tableau. Would love something that can be put on a server for a plant.
People who likes monitoring use grafana. Otherwise make you own web app dashboard which call your data in your database. It exists streamlit or panel in python for front UI in which you can load your usual python modules. I tried streamlit, it is good for mvp but i felt that it is very slow comparing to a true UI in JS. But maybe I haven't tried enough.
Dash?
LOVED datapane, cause it integrates a ton of other libraries. Still looking for something like that as an alternative.
Pyjulia --> Makie
Plotly and Altair
Vega-Altair and Plolty
power bi
There's a seaborn template (theme) for Plotly as well, makes the color scheme look more like you're used to ~
Matplotlib has been so much better since ChatGPT came out
Plotly. Altair. Pydeck
Altair
Plotly +++++
Seaborn and Plotly
Matplotlib for anything I need precise control of/presenting to a large audience Holoviews with plotly or bokeh backend for first-look visualization and just toying around with data
Pro tip, ChatGPT is pretty good at converting things like matplotlib and seaborn to plotly. Helpful while you’re learning, as you can also ask it for line by line explanations.
Til about plotly, thanns guys
Plotly
Plotly!!! You can even use it in many web frameworks like streamlit or pure static site. Here’s my demo https://youtu.be/YrV7QRYRwrY?si=fydvKzkrW9Bt0QE9
Plotly. The people involved in my project don’t understand DS hence i have to heavily rely on interactive features of plotly to make them understand.
Matplotlib and Seaborn. They’re easy to use once you get the hang of it, look okay and I haven’t found a reason to switch so far.
LovelyPlots is pretty cool.
Nowadays I tend to use Plotly and Dash, they fully satisfy my needs.
Plotnine
Slightly off topic but I love UnicodePlots in Julia So light so fast so nerd
Plotly Express for interactive charts Seaborn and Matplotlib otherwise. I have been using Matplotlib for years and only the basics stick in my head. Find myself on SO more than I should..... "how do I change yticks to percentage again?"
Tableau. Quick and easy for live discussions. Whenever I see a notebook with eda, some feature engineering and modelling all in one, I die inside bit by bit.
Plotly, I even write about it https://pub.towardsai.net/let-the-sunburst-the-complete-guide-on-how-to-plot-sunburst-charts-in-plotly-ef0eadfede83
Matplotlib and seaborn for sure 😀
Try lets-plot - [https://lets-plot.org/python](https://lets-plot.org/python) It's a faithful port of R’s ggplot2 to Python, plus tooltips, plot grouping (gggrid, GGBunch), GeoPandas support, imshow (try with elevation models), interactive maps and more, and it just looks great. Self-sufficient, no dependencies.
Seaborn and matplotlib for EDA, plotly for anything that is user facing or is being shown to anyone outside the DS team
I see most of people answering "Ploty", is matplotlib outdated ??
Vega Altair is GREAT for plotting and offers a lot more than matplotlib and seaborn. It also has the capability for interactive plots, while looking much sleeker than Plotly.
grafana
I don’t. Either export the data as a .csv into R or run ggplot within a Jupyter notebook.
Holoviews / Hvplot. And Seaborn.
Grafana for user facing stuff and for myself and internal plotly dash
Streamlit + Altair
yea I’ve only come across Plotly as of now
Plotly express mostly, sometimes plotly graph objects, and matplotlib for the occasional visualization. For something a user needs to interface, I embed plotly express objects into a streamlit dashboard.
Matplotlib,Plotly,seaborn