I would like to create a radar chart using plotly
but I want the plot to have sides on the chart instead of being a circle.
I'm using the example from the plotly
website.
The default output looks like this:
I would like something like this:
My code:
library(plotly)
fig <- plot_ly(
type = 'scatterpolar',
r = c(39, 28, 8, 7, 28, 39),
theta = c('A','B','C', 'D', 'E', 'A'),
fill = 'toself'
)
fig <- fig %>%
layout(
polar = list(
radialaxis = list(
visible = T,
range = c(0,50)
)
),
showlegend = F
)
fig
Adding gridshape = 'linear'
to layout()
worked for me.