plotly / plotly.R

An interactive graphing library for R
https://plotly-r.com
Other
2.54k stars 622 forks source link

Support ggplot2's theme(legend.direction = "horizontal") #684

Open this-username-is-taken opened 8 years ago

this-username-is-taken commented 8 years ago

This feature is now supported by plotly.js:

https://github.com/plotly/plotly.js/pull/535

cpsievert commented 8 years ago

It is supported:

plot_ly(mtcars, x = ~mpg, y = ~disp, color = ~factor(vs)) %>% 
  layout(legend = list(orientation = "h"))

We don't, however, have support for ggplot2::theme(legend.direction = "horizontal") yet. Changing the title to reflect this.

this-username-is-taken commented 8 years ago

Thanks Carson!

abalter commented 8 years ago

Is this added now?

https://plot.ly/python/legend/#changing-orientation-of-legend