Open zaphar opened 4 years ago
Note this issue only occurs with hstack'd or vstack'd plots. Same with any Compose.Context
. The workaround I found was to explicitly include a draw
call:
draw(PDF(), hstack(plot1, plot2));
Looking at Weave.jl src now. The issue is that hstack'd and vstack'd plots are no longer objects of type Gadfly.Plot
, as they are converted to objects of type Compose.Context
.
Weave's gadfly.jl file defines display methods only for Gadfly.Plot
. But Gadfly's display methods are defined for Union{Gadfly.Plot, Compose.Context}
, so I think this is what needs to be done in Weave.jl. This would also enable Compose graphics in Weave.
Yeah, I can confirm that this works in a simple test as well.
Details are in https://github.com/GiovineItalia/Compose.jl/issues/372 It's possible that this just needs to be noted in the documentation until Compose supports show methods for pdf output. Or Weave could shim in a show method until then.
Setting the chunk option
fig_ext=".png"
or another supported format appears to workaround it.