The Plotly library is an interactive open-source library. Plotly makes data visualization and understanding simple and easy. Plotly is a high-level, declarative charting library that includes over 30 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.
Why do we need plotly when there is matplotlib, seaborn like libraries in python?
All these three libraries do the same task, which is to plot a graph or chart for data visualization. But the difference because of which the library Plotly stands out are:
- Plotly has hover tool capabilities that allow you to detect any outliers or anomalies in a large number of data points. When you hover your mouse cursor over the graph plotted by plotly you get the every details about that particular point in the graph where your cursor is.
- It is visually attractive that can be accepted by a wide range of audiences. Many themes are available in plotly to make your charts and graph more appealing.
- It allows you for the endless customization of your graphs that makes your plot more meaningful and understandable for others.
- The plotly graphs can be exported in various formats such as PNG, SVG, PDF and HTML to your local machine.
Run the following command in your terminal to install Plotly using pip.
pip install plotly
if you are using Anaconda then run the following command in your terminal to install Plotly using conda.
conda install -c plotly plotly
Before we can start using Plotly, let’s test its installation with an easy command:
import plotly print(plotly.__version__)
So, in this article, we have talked about – why to use over other visualization modules supported by Python and Plotly installation. Next, we will talk about various plots in Plotly such as Line Plot, Scatter Plot, etc…