-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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
05/18/2019 wenyu
When I use the dataset dataSets/landdata-states.csv
. I find vega-lite cannot recognize the field Home.Value
. Well, I realized that Vega cannot recognize any name with a dot(.). For now, I don't find a way to let vega recognize a name contains a dot. And we know that R and ggplot2 can use dot in their name. If we cannot find a way to let vega understand dot, maybe we should change the column names of the dataset. For example, I use Home_Value
rather than Home.Value
to pass the test.
05/20/2019 wenyu
In the example line1.R
. ggplot2 has a property linetype
. However, I cannot find vega has a similar property. Vega can only define the style of lines in the Mark
which means we cannot encode the styles of lines. I will use color
to substitute linetype
. I'm not sure does vega provide style encoding now. If you have some information, please tell me. Thanks!