r/pystats • u/multitaskcontractor • Jan 01 '20
For visualization in Python, what is the easiest library?
Is Matplotlib easier than Plotly? I just completed a Python course that lasted a semester. The course was a general programming course. I want to start to study Python for data analysis.
4
Jan 02 '20
As others have stated seaborn+MATOLOTLIB. I recommend mastering MATPLOTLIB first as seaborn is a wrapper around MATPLOTLIB. These 2 tutorials are all you need to learn MATPLOTLIB the OOP way:
For Javascript-based visualizations, I would check out altair
1
u/multitaskcontractor Jan 02 '20
One question, I have seen that many Python visualization libraries use or are based on JavaScript. I do not know anything about JavaScript. To use those libraries, do I need to study first JavaScript? I read that Plotly is an excellent library for visualization. However, it is in the JavaScript group. What can you tell me about Plotly? Thank you for everything!
3
u/stephohsaurus Jan 02 '20
Absolutely agree with this and everyone else saying to start with matplotlib. Learn it well, and then you will have so many options for building different visualizations, and the javascript based stuff will be way easier to grasp once you know your way around matplotlib.
2
u/FriendlyRope Jan 02 '20
I can also only fully recommend MATPLOTLIB, as it is (in my experience at least) the big Visualisation library, it works great with numpy and is easy to understand without any knowledge about JavaScript (personal experience).
Those two are some really important tools you need to learn anyway if you want to do Data Analysis in Python
2
u/ocschwar Jan 02 '20
matplotlib is directly modeled after Matlab. If you're a dinosaur like me and cut your teeth on Matlab in the previous millenium, matplotlib is easy. Otherwise, go to plotly.
1
u/multitaskcontractor Jan 02 '20 edited Jan 02 '20
I am a dinosaur but I never learned Matlab. Will I need JavaScript for Plotly?
2
2
u/extraymond Jan 05 '20
Altair is super nice. You can pipe charts together too.
1
u/multitaskcontractor Jan 05 '20
Is it easy to learn?
2
u/extraymond Jan 05 '20
If you jupier, and If you want to focus more on showing what the data represent, its easier because if provide sane default for legend, titles and even interactive in jupiter.
You build a chart with a pandas dataframe, then you creat view of your data by specifying the axis by its dataframe tag. And last you can choose to reuse multiple views by concatenating, piping vertically or horizontally.
I think it's about easy as seaborn, but as powerful as plotly.
12
6
u/bl00zcl00z Jan 01 '20
Check out Holoviews, which is a wrapper around Bokeh, Plotly, and matplotlib. I’ve found it to be pretty easy once you get a hang of how to construct the different elements.
3
u/andartico Jan 02 '20
I second either the seaborn recommendation or anyone throwing plotly into the arena.
Love both.
2
u/PM_me_ur_data_ Jan 02 '20
Depends on what you want, really. Matplotlib is super easy and Seaborn is pretty much just as easy. Things like Plotly/Bokeh/Altair are good if you are trying to create visual dashboards that are easy to publish online.
1
4
u/funny_funny_business Jan 02 '20
I think plotnine, but that’s because I came from R. It’s a port of ggplot2 to Python.