Skip to content
wenyuyangpku edited this page May 18, 2019 · 2 revisions

Welcome to the ggscheme-examples wiki!

Add domain in encoding.x.scale

05/17/2019 wenyu

domain is the range of the axis. For example, in ggplot2, the x range of mtcar example is (1.32,5.62). But vega-lite cannot find the range so the x-axis starts from 0. That's why I add this property. I think you can find the range from the layout function in ggplot2. You can refer to gg2list() from plotly.

gglist<-gg2list(ggplot2-object)
gglist$layout$xaxis$range
Clone this wiki locally