mirror of https://github.com/mpastell/Weave.jl
Fix figure display for Gadfly
parent
2e65f08e0e
commit
4bc5435e6d
|
@ -2,6 +2,10 @@ import Gadfly
|
|||
|
||||
Gadfly.set_default_plot_format(:svg)
|
||||
|
||||
function Base.display(report::Report, m::MIME"image/png", p::Gadfly.Plot)
|
||||
display(report, MIME("image/svg+xml"), p)
|
||||
end
|
||||
|
||||
#Gadfly doesn't call the default display methods, this catches
|
||||
#all Gadfly plots
|
||||
function Base.display(report::Report, m::MIME"image/svg+xml", p::Gadfly.Plot)
|
||||
|
|
|
@ -52,6 +52,7 @@ julia> x = 1:10
|
|||
1:10
|
||||
|
||||
julia> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -63,6 +64,7 @@ julia> plot(x = x, y = x)
|
|||
julia> print(x)
|
||||
1:10
|
||||
julia> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -89,6 +91,7 @@ julietta> x = 1:10
|
|||
1:10
|
||||
|
||||
julietta> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -100,6 +103,7 @@ julietta> plot(x = x, y = x)
|
|||
julietta> print(x)
|
||||
1:10
|
||||
julietta> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -180,6 +184,7 @@ julia> x = 1:10
|
|||
1:10
|
||||
|
||||
julia> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -191,6 +196,7 @@ julia> plot(x = x, y = x)
|
|||
julia> print(x)
|
||||
1:10
|
||||
julia> plot(x = x, y = x)
|
||||
Plot(...)
|
||||
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Reference in New Issue