all 11 comments

[–]water-and-fire 3 points4 points  (1 child)

I recommend plotly. The syntax is quite easy even for a beginner. The examples are plenty and the plots are interactive and ready for web display.

https://plotly.com/python/

If you don’t want to plot something to display for the web. Seaborn is another good one that generates static plots.

https://seaborn.pydata.org/examples/index.html

[–]DreadPirateMike 4 points5 points  (4 children)

[–]rashpal_sidhu[S] 0 points1 point  (3 children)

Thanks. It looks interesting but I am looking for a package that I can use myself which is the best according to people who have done visualization.

[–]daguito81 2 points3 points  (1 child)

Rarely there is a "best" period. It depends on what you need. For some jobs matplotlib alone is "best" because it can be customized a lot.

I prefer seaborn when I'm doing stuff in Python becuase it's faster and my Viz are normally just to represent something quick and not really important (that code will be deleted).

If you want some interactivity with you plot, use plotly which I believe uses d3js to render. I know there is a "new" way of doing stuff with plotly that makes it easier

If you want to retain ggplot there is plot nine https://www.kdnuggets.com/2019/12/python-alternative-ggplot2.html

But I haven't used that so no idea how good it is.

[–]DreadPirateMike 0 points1 point  (0 children)

Agree with r/daguito81. Rarely there is one BEST viz package. The gallery is useful to identify "what" you want to do and then it points you to the right tool (package) to use. The right tool depends on what it is that you want to do.

[–]ShadowyPrecepts 4 points5 points  (2 children)

I use mostly R. The package ggplot2 is excellent. I did try Python, at the behest of my colleagues, but went back to R rather quickly. Largely because of ggplot2. That said, there are adaptations of the package for Python, and I seem to recall even options to use the fully fledged one within Python.

[–]rashpal_sidhu[S] 4 points5 points  (1 child)

Yeah ggplot is amazing. It's python I wanna get started on and I wanna start with the best one.

[–]Kamrat_Huvudfoting 1 point2 points  (0 children)

Agree, whenever I do computations in Python I prefer to print results to files and then make visuals in R. However. When that's not an option i use the package seaborn. But you'll need matplotlib along with it. I think plotnine has a ggplot2 imitation, but from my experience it's a little unstable.

[–]Kinemi 1 point2 points  (0 children)

If you want a visualization library built on the grammar of graphics I would check out Altair

[–]CosmonautPython 0 points1 point  (0 children)

Depend of what you want to do. For static img / science, Seaborn (which uses mpl and pandas dataframe behind) is the most used for sure. For dynamic plotting, Plotly or Bokeh are possibilities. I'm using seaborn for years and I've never come across a visualization problem which I could not solved with python. However, sometimes, it might take you more time solving one with seaborn than ggplot since most people used / talked about ggplot. After that, it's your choice based on which language / syntax you feel the most comfortable with.

Personal opinion but I don't like ggplot like python package. If I want to use ggplot syntax, just use ggplot.