Im trying to put vertically xlab in a plot using Plotly package. I want to do the same as "las= 2" on standard R.
I found 'tickangle = 45' but it is for ticks, not for labels.
Any one can help me?
` plot_ly(x = account$country,
opacity = 0.6,
type = "histogram",
histnorm = "probability",
color = c('More than One account'),
colors = 'red') %>%
add_trace(x = account2$country,
opacity = 0.6,
type = "histogram",
histnorm = "probability",
color = c('Account'),
colors='blue') %>%
layout(barmode="overlay",
title = "Clients test",
xaxis = list(title = "Country", color ="red"),
yaxis = list(title = "Clients"))
`
Thank you.
In your case, you can add tickangle in xaxis:
layout(barmode="overlay",
title = "Clients test",
xaxis = list(title = "Country", color ="red", tickangle = 90),
yaxis = list(title = "Clients"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With