Is it possible to change the direction of the axis in a scatterternary generated with plotly?
Let me explain it graphically:
Now what I can easily draw using plotly, with regards to the default coordinations looks like this:
But what I am looking for is a ternary diagram with axes in such directions:
As a sample diagram, I put here the sample code offered by plotly developers Ternary Plots in R:
library(plotly)
journalist <- c(75,70,75,5,10,10,20,10,15,10,20)
developer <- c(25,10,20,60,80,90,70,20,5,10,10)
designer <- c(0,20,5,35,10,0,10,70,80,80,70)
label <- c('point 1','point 2','point 3','point 4','point 5','point 6',
'point 7','point 8','point 9','point 10','point 11')
df <- data.frame(journalist,developer,designer,label)
# axis layout
axis <- function(title) {
list(
title = title,
titlefont = list(
size = 20
),
tickfont = list(
size = 15
),
tickcolor = 'rgba(0,0,0,0)',
ticklen = 5
)
}
p <- df %>%
plot_ly() %>%
add_trace(
type = 'scatterternary',
mode = 'markers',
a = ~journalist,
b = ~developer,
c = ~designer,
text = ~label,
marker = list(
symbol = 100,
color = '#DB7365',
size = 14,
line = list('width' = 2)
)
) %>%
layout(
title = "Simple Ternary Plot with Markers",
ternary = list(
sum = 100,
aaxis = axis('Journalist'),
baxis = axis('Developer'),
caxis = axis('Designer')
)
)
p
Is it modifiable in plotly to change the direction of the axes? There are other packages to plot ternaries, but plotly offers some dynamic tools for zooming and panning which are very useful in my case.