I have created the above ternary plot using the code below:
import plotly.figure_factory as ff
fig = ff.create_ternary_contour(np.stack((prob0,prob1,prob2)),some_calc_val,
pole_labels=[r'$\text{AxesA}$', r'$\text{AxesB}$', r'$\text{AxesC}$'],
interp_mode='cartesian',
ncontours=50,
colorscale='Jet',
showscale=True,
title=r'$\text{Plot}$')
fig.update_ternaries(
aaxis = dict(
tickmode = 'array',
ticklen = 10,
tickvals = [0.2, 0.4, 0.6, 0.8],
ticktext = [r'$0.2$', r'$0.4$', r'$0.6$', r'$0.8$']
),
baxis = dict(
tickmode = 'array',
ticklen = 10,
tickvals = [0.2, 0.4, 0.6, 0.8],
ticktext = [r'$0.2$', r'$0.4$', r'$0.6$', r'$0.8$']
),
caxis = dict(
tickmode = 'array',
ticklen = 10,
tickvals = [0.2, 0.4, 0.6, 0.8],
ticktext = [r'$0.2$', r'$0.4$', r'$0.6$', r'$0.8$']
)
)
fig.update_layout(width=600, height=600)
fig.show()
Data for refrence
prob0=[9.99960940e-01 6.03061907e-04 9.10372544e-12 9.99952169e-01
2.81419593e-04 2.17084140e-18 9.99882767e-01 5.63535132e-11
1.86320179e-25]
prob1=[3.90598546e-05 9.99396859e-01 6.40065936e-01 4.78313969e-05
5.71105924e-01 1.86904565e-07 5.85691843e-05 1.40045638e-07
1.96443635e-14]
prob2=[4.32181700e-19 7.88323607e-08 3.59934064e-01 5.03536073e-12
4.28612656e-01 9.99999813e-01 5.86636024e-05 9.99999860e-01
1.00000000e+00]
some_calc_val=[3.90598546e-05 6.03140740e-04 3.59934064e-01 4.78314019e-05
4.28894076e-01 1.86904565e-07 1.17232787e-04 1.40101991e-07
1.95399252e-14]
Questions:
- I would like to Latexify the ticks for the color bar on the right, I have looked around in the layout but did not find any such color bar which I could update the ticks for
- Is it possible to add a little space between the ternary plot and the color bar, the name of the AxesC falls right under the color bar which is not ideal for my use case.
- Also is there a way to add labels similar to what is used in go.Countour() which has a showlabels key
References before posting: