I'm trying to draw plots using the plotly where all of them share the same axis. This is one dataset
X variable value
1 1 SH 0.002814895
2 1 VH 0.002591173
3 1 SS 0.002599700
4 1 HCG 0.002810790
and this is its plotly graph
plot_ly(rr1, x=~variable, y=~value, type = 'scatter', marker=list(size=10, color='rgba(255,182,193,0.9)',
line=list(color='rgba(152,0,0,0.8)', width = 2)), name = "Character and Degree")%>%
layout(title = "Graph", font = list(family = "Arial Black"),yaxis=list(zerolinecolor = toRGB("red"),
gridcolor = "rgb(190,190,190)"), xaxis=list(gridcolor = "rgb(190,190,190)")) %>%
layout(plot_bgcolor='rgb(230, 230, 230)',paper_bgcolor='rgb(220, 220, 220)',
font = list(color = 'rgb(100,100,100)'))
and this is the other dataset
X variable value
1 1 SH 0.000982607
2 1 VH 0.000917569
3 1 SS 0.000911039
4 1 HCG 0.000971009
and this is its plot
plot_ly(rr2, x=~variable, y=~value, type = 'scatter', marker=list(size=10, color='rgba(38,182,193,0.9)',
line=list(color='rgba(75,0,0,0.8)', width = 2)), name = "Character and Degree")%>%
layout(title = "Graph", font = list(family = "Arial Black"),yaxis=list(zerolinecolor = toRGB("red"),
gridcolor = "rgb(190,190,190)"), xaxis=list(gridcolor = "rgb(190,190,190)")) %>%
layout(plot_bgcolor='rgb(230, 230, 230)',paper_bgcolor='rgb(220, 220, 220)',
font = list(color = 'rgb(100,100,100)'))
I want these two graphs to share the same axis leaving the colours as it is.