GiovineItalia / Gadfly.jl

Crafty statistical graphics for Julia.
http://gadflyjl.org/stable/
Other
1.9k stars 250 forks source link

hstack "blacks out" spy plots #950

Open ghost opened 7 years ago

ghost commented 7 years ago

julia 0.5, latest release of Gadfly

This seems to be based on the range of values present in the matrix being plotted. This does not occur when a wider range of values are present.

weird

tlnagy commented 7 years ago

That's a crazy bug. Does this happen when you output to a .png or .svg file?

ghost commented 7 years ago

It does render when I export it to a .png

tlnagy commented 7 years ago

Does this happen in jupyter notebooks as well? This might be a weird artifact with Juno displaying SVGs

ghost commented 7 years ago

The error occurred in a jupyter notebook (I use a dark theme). I did not try running it in Juno.

tlnagy commented 7 years ago

Ah. It just looked like Juno. Yeah, I've run into this bug intermittently. Not sure why the blanking out happens.

Mattriks commented 4 years ago

With Gadfly v1.3, and in jupyter I see the following:

raw_img = rand([1.0, 0.0], 20, 20)
fig1 = spy(raw_img, Scale.color_continuous(minvalue=0, maxvalue=1), Guide.xlabel(nothing),
Guide.ylabel(nothing), Guide.xticks(ticks=nothing), Guide.yticks(ticks=nothing), 
    Theme(key_position=:none))
draw(SVGJS(), hstack(fig1, fig1)) # works
hstack(fig1, fig1) # blacks out

My comments on the last 2 lines.