Hi, is there a way to set image width for VegaLite.jl at the time of image saving?
And maintaining the default chart ratio (sometimes when I set width the ratio is changed)?
using DataFrames, VegaLite, JSON
# Plotting code does not know the required image width, so it can't specify it
df = DataFrame(x=0:9, y=(i->i^2).(0:9))
vspec = (
mark=(type=:line,),
encoding=(
x=(field="x", type=:quantitative),
y=(field="y", type=:quantitative)
)
)
spec = VegaLite.VLSpec(JSON.parse(JSON.json(vspec)))
fig = spec(df)
# Image saving code, it knows the image width, but how to specify it?
VegaLite.save("plot.png", fig)
Also, when using multi-plot plot (facet, column, row) - the image width multiplied by count of rows, so you specify width=800px and with 3 columns got 2400px instead. Is there a way to set width for the whole image?