Bubble Chart
The bubble chart in Plotly is created using the scatter plot. It can be created using the scatter() method of plotly.express
. A bubble chart is a data visualization which helps to displays multiple circles (bubbles) in a two-dimensional plot as same in scatter plot. A bubble chart is primarily used to depict and show relationships between numeric variables.
Example:
Python3
import plotly.express as px df = px.data.iris() fig = px.scatter(df, x = "sepal_width" , y = "sepal_length" , color = "species" , size = 'petal_length' , hover_data = [ 'petal_width' ]) fig.show() |
Output:
Bubble chart using Plotly in Python
Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot, and many more. It is mainly used in data analysis as well as financial analysis. Plotly is an interactive visualization library.