ggvis
ggvis copied to clipboard
export_png failing for group_by plots
This works
> p=mtcars %>%
ggvis(~wt, ~mpg) %>%
layer_points(fill = ~factor(cyl))
> export_png(p,"plot1.png")
>
But this fails
> p=mtcars %>%
ggvis(~wt, ~mpg, fill = ~factor(cyl)) %>%
layer_points() %>%
group_by(cyl) %>%
layer_model_predictions(model = "lm")
> export_png(p,"plot1.png")
/usr/local/lib/node_modules/vega/vega.js:4799
var tx = vg.data[def.type]();
^
TypeError: Property 'treefacet' of object #<Object> is not a function
at vg.parse.transform (/usr/local/lib/node_modules/vega/vega.js:4799:29)
at Array.map (native)
at Object.vg.parse.dataflow (/usr/local/lib/node_modules/vega/vega.js:4261:34)
at /usr/local/lib/node_modules/vega/vega.js:4234:27
at Array.forEach (native)
at Object.vg.parse.data (/usr/local/lib/node_modules/vega/vega.js:4223:16)
at parse (/usr/local/lib/node_modules/vega/vega.js:4788:22)
at Object.vg.parse.spec (/usr/local/lib/node_modules/vega/vega.js:4794:23)
at Object.vg.headless.render (/usr/local/lib/node_modules/vega/vega.js:7248:12)
at render (/usr/local/lib/node_modules/vega/bin/vg2png:55:15)
R 3.1.1, ggvis 0.4, and the following node modules:
[email protected] /usr/local/lib/node_modules/vega
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected])
A similar error has been reported on the ggvis google group but I thought it should go here.
I have also commented this on the ggvis google group. I'm facing the exact same issue when trying to export a simple boxplot. Moreover, any grouping does not work.
Where can I get vg2png or Vega for Windows?