Closed pdimens closed 3 years ago
However, saving the plot as a variable and calling save
separately works fine:
someplot = @vlplot(etc...)
save("path/to/loc", someplot)
Can you write a test which captures this behavior on a PR?
E.g. add a test with a minimal reproducible example here on a forked version of the library? The github actions CI/CD tests Unix, Windows and Mac, so the source of the error should show up in the logs. :)
https://github.com/queryverse/VegaLite.jl/blob/master/test/test_io.jl
Sure. I wrote a test comparing the behavior with #363
Hey! One thing I noticed:
Your example with the pipe uses arg1=plot, arg2= path, but the appropriate syntax is the opposite:
p |> x->save(joinpath(pwd(), "testplot.png"), x)
I looked at your MWE again and think that it's already covered by the following test (so I don't think a PR is necessary):
save(joinpath(folder,"test3.png"), p)
This is an upstream bug that was introduced in FileIO v.1.6.0, see here.
@pdimens Then we definitely want that test! ;) I think you can just add it below the test I quoted though (as a one liner using the existing 'p' object which is used by the other tests
@pdimens You can use @test_broken
to signify that the functionality should work, but does not at the moment
@pdimens Hey! Sorry for writing in the comments what I should have demonstrated on a separate branch. What do you think about the following? https://github.com/queryverse/VegaLite.jl/pull/368
I guess that works. Whatever makes most sense for y'all.
I think this is now resolve, right? Closing for now.
I'm still seeing this issue. Here is the warning and my Julia environment:
┌ Warning: Mapping to the storage type failed; perhaps your data had out-of-range values?
│ Try `map(clamp01nan, img)` to clamp values to a valid range.
└ @ ImageMagick ~/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:180
I am seeing the same error when trying to save as .eps
julia> Pkg.status(["FileIO", "VegaLite", "ImageMagick"])
Status `C:\Users\HD\.julia\environments\v1.6\Project.toml`
[5789e2e9] FileIO v1.10.1
[6218d12a] ImageMagick v1.2.1
[112f6efa] VegaLite v2.6.0
I haven't tested this on a *nix machine, but with a fresh install of VegaLite.jl and ImageMagick.jl, piping a barplot into
save("somefile.png")
gives this error:The plot is a simple bar plot with three values
[1.17, 0.804799, 119.48]