VegaLite.jl icon indicating copy to clipboard operation
VegaLite.jl copied to clipboard

Missing layer in output

Open haberdashPI opened this issue 4 years ago • 3 comments

Using the example from my last issue (#303), the output is missing the horizontal line in the file output (but not the output generated in a browser window):

pl =
    @vlplot() +
    @vlplot(data=[{}], mark=:rule,
    encoding = {
      y = {datum = 50, type=:quantitative},
      strokeDash = {value = [2,2]}
    }) +
    (best_vals |>
     @vlplot(x={:winlen, type=:ordinal, axis={title="Length (s)"}}) +
     @vlplot(mark={:errorbar,filled=true},
            y={:low,scale={zero=true}, axis={title=""},type=:quantitative},
            y2={:high, type=:quantitative}, color={:salience, type=:nominal}) +
     @vlplot(mark={:point,filled=true},
            y={:correct,type=:quantitative,scale={zero=true},axis={title="% Correct Classification"}},
            color={:salience, type=:nominal}))

With best_vals data being:

winlen,salience,correct,low,high
0.17,high,85.1063829787234,80.85106382978724,89.36170212765958
0.17,low,80.0,73.33333333333334,86.66666666666669
1.08,high,80.0,73.33333333333334,86.66666666666669
1.08,low,97.5,95.0,100.0

Here's a screen shot of the browser output

image

Here's the output when saved to png (similar results for pdf and svg).

image

haberdashPI avatar Apr 24 '20 15:04 haberdashPI

Uh, that is weird... My best guess is that maybe the version of vega-lite that is used for the save case is somehow old? I should probably update to the latest vega-lite version here in the package. I'll try to do that right now.

davidanthoff avatar Jun 04 '20 03:06 davidanthoff

New version is pending: https://github.com/JuliaRegistries/General/pull/16067. Could you try again once that is registered?

davidanthoff avatar Jun 09 '20 03:06 davidanthoff

Oh shoot. Things have changed, but not for the better:

image

And here it is in a file:

image

Looks like both plots are now missing the grid lines, and the second layer doesn't plot to a file yet.

haberdashPI avatar Jun 11 '20 17:06 haberdashPI