Was doing some plotting to display a Gantt Chart with VegaLite, and I tried the save() function I saw on a basic example for VegaLite usage.
But there is some modifications from the save() function, compared to the visualization in VSCode JuliaPlots, as you can see :
As far as I understand what’s going on, the format of the plot is contained in VLSpec Object, and the function display() and save(), may does not share the same default VLSpec ? (Which can explain the output difference)
So, if it’s the reason : how can I find the VLSpec for display(), and give it to the save() function?
Thanks in advance !
You can just set width and height, e.g.:
If these values aren’t explicitly set they seem not to be part of the VLSpec, as you can see with
julia> p = dataset("movies") |> @vlplot(
No width,height in what is dumped out. Same when you open the Vega Editor. So, to have it fixed, it needs to be specified.
Thanks for the answer!
But what I’m looking for, is more the scalable aspect of the display() function.
With a fix size, if for an instance I get more elements on the vertical axis for example, the display function will adapt the size and I will always get a perfect square for every [x,y] “point”.
Hm, ok, can’t say something, because when I do this in VSCode, for me, it opens in the plots pane (or browser if switched off) and the size is fixed and I can’t change any display size to adapt for anything.
Let’s see who else comes to help…
Your idea was good though, I manage to scale it with variable width/height considering the input.
Still want to get the exact display() configuration to get some properties lost with the save, but the scaling size was the main thing to get close from the result I want !