85 Interactive Radar
We can use plotly
to draw interactive radar plot. Here is a example:
we should define the type and add multible trace on it. In the plot we get, we can zoom in and out, see the detailed value and information when we move the mouse to the corresponding position.
mtcars_theta = c('drat','wt','qsec','vs','am','drat')
p <- plot_ly(
type = 'scatterpolar',
fill = 'toself'
) %>%
add_trace(
r = c(0.359447,0.5259524,0.0119047, 0, 1, 0.359447),
theta = mtcars_theta,
name = 'Maserati Bora'
) %>%
add_trace(
r = c(0.6221198, 0.3239581, 0.4880952, 1, 1, 0.6221198),
theta = mtcars_theta,
name = 'Volvo 142E'
) %>%
layout(
polar = list(
radialaxis = list(
visible = TRUE,
range = c(0,1)
)
)
)
p