Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change order of axis ticks for a ternary diagram?

Is it possible to reverse scale, for example for AC from 0.1-1 to 1-0.1? enter image description here

like image 769
Ann Avatar asked Jul 07 '26 08:07

Ann


2 Answers

According to a statement on github 12.09.2019 this was not possible back then:

We don't offer a way to do this at the moment unfortunately. This would make a great addition to the library though.

And taking a closer look at the structure of a ternary axis, there does not seem to be an attribute that lets you change the order of the axes:

layout.ternary.Aaxis({
    'color': '#444',
    'exponentformat': 'B',
    'gridcolor': 'white',
    'gridwidth': 1,
    'hoverformat': '',
    'layer': 'above traces',
    'linecolor': 'white',
    'linewidth': 1,
    'min': 0,
    'minexponent': 3,
    'nticks': 6,
    'separatethousands': False,
    'showexponent': 'all',
    'showgrid': True,
    'showline': True,
    'showticklabels': True,
    'tickfont': {'color': '#2a3f5f', 'family': '"Open Sans", verdana, arial, sans-serif', 'size': 12},
    'tickformat': 'g',
    'tickmode': 'auto',
    'tickprefix': '',
    'ticks': '',
    'ticksuffix': '',
    'title': {'font': {'color': '#2a3f5f', 'family': '"Open Sans", verdana, arial, sans-serif', 'size': 14},
              'text': 'Joly'}
})
like image 96
vestland Avatar answered Jul 09 '26 21:07

vestland


A ternary plot MUST have the axes such that for any given axis at value of 1 the other two axes have a value of 0 (assuming sum of 1)... thus reversing an axis would reverse the other two axes.

So for the question of...

Is it possible to reverse scale, for example for AC from 0.1-1 to 1-0.1?"

...the answer is no, not possible to reverse just one axis.

@vestland points out this question but this case is for using only two dimensions in ternary plot, and judging by the picture provided in the question asked above this is not the case.

like image 34
jayveesea Avatar answered Jul 09 '26 20:07

jayveesea