Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬 Register for the Oct 27 webinar.

Different axis scales in ternary plot

Wondering if it is possible to have different scale the axis in ternary plots.

I’ve seen all the examples have the same range.

If I had axis with the following ranges a 50-100, b 0-1, c 0-10 it doesn’t look like this can be plotted using the ternary plots at the moment

I notice that other ternary plots offer the ability to change the starting and ending points of the axis limits provided that they match the scale (I think plotly calls this sum)


@shimwell With data from your link above, you can restrict the aaxis from a 0< min_val <100 and the corresponding ternary plot looks like this one:

import plotly.graph_objects as go
import numpy as np

points = np.array([(62, 12, 26), (63.5, 13.5, 23), (65, 14, 21), (61, 15, 24),
          (62, 16, 22), (67.5, 14.5, 18), (68.2, 16.5, 15.3), (62, 22.5, 15.5)])
A, B, C = points.T
fig=go.Figure(go.Scatterternary(a=A, b=B, c=C, mode='markers',  marker_size=8))
fig.update_ternaries(sum=100, aaxis_min=55);


1 Like