In this Plotly tutorial, you will learn how to plot ternary plot in Python. You have to use px.scatter_ternary()
function for ternary plot.
# Import Plotly Module import plotly.express as px # Import Dataset dataset = px.data.gapminder().query("continent=='Oceania'") # Ternary Plot plot = px.scatter_ternary(dataset, a="gdpPercap", b="lifeExp", c="pop", color="country") # Show the Plot plot.show()
Output: