Hi,
Can someone guide me on Which Library to use when. I have seen that libraries like ploty, matplotlib, panda all can do plotting, then which one to use when.
Any tutorial on this?
Hi,
Can someone guide me on Which Library to use when. I have seen that libraries like ploty, matplotlib, panda all can do plotting, then which one to use when.
Any tutorial on this?
Iâm pretty sure Pandas uses Matplotlib under the hood for its plots. Pandasâ plotting functions are more like convenient shortcuts to Matplotlib patterns. Pandasâ focus is really on creating and manipulating dataframes, table-like objects that house data , for working with your data. It makes merging datasets, filtering data, and preparing it for analysis and visualization easier.
Matplotlib is a great general-purpose graphing library. It lets you graph pretty much anything, itâs popular in many circles for creating âpublication qualityâ graphs. Its power comes with some degree of complexity though and is a commitment to learn and use well (this might just be my opinion).
Plotly is similar to Matplotlib in function, it creates graphs/visualizations and will also take some time to learn; but it differs a little on execution and focus. It is more focused on convenience for interactivity, things like web apps with interactive or changing visuals.
Which libraries you use is really dependent on what field and industry youâre in. Generally speaking, if youâre using Python in the data science field youâre also probably using Pandas and Numpy to manipulate your data. So take some time to really learn these libraries well because they let you prepare your data for whatever comes next, be it plotting, modeling, or analysis. The best way to learn Pandas is to first read the docs, then use it. Try kaggle competitions if youâre looking for data science, youâll get a lot of pandas & matplotlib examples.
Which plotting library you use is largely a product of personal taste and what your peers/coworkers use. Stick with it long enough and youâll likely know both Matplotlib and Plotly, plus many more. Matplotlib is in a lot of ways âthe standardâ for data visualizations in Python. There are many tutorials and guides that use it exclusively for plotting. Also, who knows how many other Python libraries exist that use Matplotlib under the hood for built-in plotting methods. Itâs almost hard not to learn it at some point for these reasons. Plotly is gaining a lot of traction in industry because it makes building data-driven apps slightly faster. In fact you can import Matplotlib plots into Plotly for things like web deployment. You MAY find it quicker to produce visuals in Plotly that are aesthetically pleasing when compared to Matplotlib, but your mileage may vary.