Learning about the different ways of using scatter plots: markers, lines, and text
We have a number of different options when using graph_objects
to create scatter plots, as mentioned in the introduction, so we will be exploring it together with Plotly Express. To give you an idea of the versatility of the available scatter plots, the following code extracts all the scatter
methods available to the Figure
object, as well as those available in Plotly Express:
import plotly.graph_objects as go import plotly.express as px fig = go.Figure() [f for f in dir(fig) if 'scatter' in f] ['add_scatter', 'add_scatter3d', 'add_scattercarpet', 'add_scattergeo', 'add_scattergl', 'add_scattermapbox', 'add_scatterpolar', 'add_scatterpolargl', 'add_scatterternary'] [f for f in dir(px) if 'scatter' in f] ['scatter', 'scatter_3d', 'scatter_geo', &apos...