legends orientation in ggvis
问题 In ggvis how to make legend vertical? mtcars %>% ggvis(x = ~wt, y = ~mpg, fill = ~cyl) %>% layer_points() %>% add_legend("fill",properties = legend_props( legend = list(x = 500, y = 50))) It puts the legends horizontally. I want it to be vertical. 回答1: Try the below code: mtcars %>% ggvis(~wt, ~mpg, size = ~cyl, fill = ~cyl) %>% layer_points() %>% add_legend(c("size", "fill")) Output chart: Hope this helps. Edit: I explored the add_legend properties and unfortunately I do not see any way of