working on 0.5 changes -- String
This commit is contained in:
parent
0a86ccb142
commit
3cc9425219
20
src/Plots.jl
20
src/Plots.jl
@ -285,9 +285,9 @@ plot3d!(args...; kw...) = plot!(args...; kw..., seriestype = :path3d)
|
|||||||
# quiver!(args...; kw...) = plot!(args...; kw..., seriestype = :quiver)
|
# quiver!(args...; kw...) = plot!(args...; kw..., seriestype = :quiver)
|
||||||
|
|
||||||
|
|
||||||
title!(s::@compat(String); kw...) = plot!(; title = s, kw...)
|
title!(s::AbstractString; kw...) = plot!(; title = s, kw...)
|
||||||
xlabel!(s::@compat(String); kw...) = plot!(; xlabel = s, kw...)
|
xlabel!(s::AbstractString; kw...) = plot!(; xlabel = s, kw...)
|
||||||
ylabel!(s::@compat(String); kw...) = plot!(; ylabel = s, kw...)
|
ylabel!(s::AbstractString; kw...) = plot!(; ylabel = s, kw...)
|
||||||
xlims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; xlims = lims, kw...)
|
xlims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; xlims = lims, kw...)
|
||||||
ylims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; ylims = lims, kw...)
|
ylims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; ylims = lims, kw...)
|
||||||
zlims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; zlims = lims, kw...)
|
zlims!{T<:Real,S<:Real}(lims::Tuple{T,S}; kw...) = plot!(; zlims = lims, kw...)
|
||||||
@ -296,9 +296,9 @@ ylims!(ymin::Real, ymax::Real; kw...) = plot!(; ylims = (ymi
|
|||||||
zlims!(zmin::Real, zmax::Real; kw...) = plot!(; zlims = (zmin,zmax), kw...)
|
zlims!(zmin::Real, zmax::Real; kw...) = plot!(; zlims = (zmin,zmax), kw...)
|
||||||
xticks!{T<:Real}(v::AVec{T}; kw...) = plot!(; xticks = v, kw...)
|
xticks!{T<:Real}(v::AVec{T}; kw...) = plot!(; xticks = v, kw...)
|
||||||
yticks!{T<:Real}(v::AVec{T}; kw...) = plot!(; yticks = v, kw...)
|
yticks!{T<:Real}(v::AVec{T}; kw...) = plot!(; yticks = v, kw...)
|
||||||
xticks!{T<:Real,S<:@compat(String)}(
|
xticks!{T<:Real,S<:AbstractString}(
|
||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(; xticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(; xticks = (ticks,labels), kw...)
|
||||||
yticks!{T<:Real,S<:@compat(String)}(
|
yticks!{T<:Real,S<:AbstractString}(
|
||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(; yticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(; yticks = (ticks,labels), kw...)
|
||||||
annotate!(anns...; kw...) = plot!(; annotation = anns, kw...)
|
annotate!(anns...; kw...) = plot!(; annotation = anns, kw...)
|
||||||
annotate!{T<:Tuple}(anns::AVec{T}; kw...) = plot!(; annotation = anns, kw...)
|
annotate!{T<:Tuple}(anns::AVec{T}; kw...) = plot!(; annotation = anns, kw...)
|
||||||
@ -307,9 +307,9 @@ yflip!(flip::Bool = true; kw...) = plot!(; yflip = flip
|
|||||||
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
||||||
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
||||||
|
|
||||||
title!(plt::Plot, s::@compat(String); kw...) = plot!(plt; title = s, kw...)
|
title!(plt::Plot, s::AbstractString; kw...) = plot!(plt; title = s, kw...)
|
||||||
xlabel!(plt::Plot, s::@compat(String); kw...) = plot!(plt; xlabel = s, kw...)
|
xlabel!(plt::Plot, s::AbstractString; kw...) = plot!(plt; xlabel = s, kw...)
|
||||||
ylabel!(plt::Plot, s::@compat(String); kw...) = plot!(plt; ylabel = s, kw...)
|
ylabel!(plt::Plot, s::AbstractString; kw...) = plot!(plt; ylabel = s, kw...)
|
||||||
xlims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; xlims = lims, kw...)
|
xlims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; xlims = lims, kw...)
|
||||||
ylims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; ylims = lims, kw...)
|
ylims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; ylims = lims, kw...)
|
||||||
zlims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; zlims = lims, kw...)
|
zlims!{T<:Real,S<:Real}(plt::Plot, lims::Tuple{T,S}; kw...) = plot!(plt; zlims = lims, kw...)
|
||||||
@ -318,9 +318,9 @@ ylims!(plt::Plot, ymin::Real, ymax::Real; kw...) = plot!(pl
|
|||||||
zlims!(plt::Plot, zmin::Real, zmax::Real; kw...) = plot!(plt; zlims = (zmin,zmax), kw...)
|
zlims!(plt::Plot, zmin::Real, zmax::Real; kw...) = plot!(plt; zlims = (zmin,zmax), kw...)
|
||||||
xticks!{T<:Real}(plt::Plot, ticks::AVec{T}; kw...) = plot!(plt; xticks = ticks, kw...)
|
xticks!{T<:Real}(plt::Plot, ticks::AVec{T}; kw...) = plot!(plt; xticks = ticks, kw...)
|
||||||
yticks!{T<:Real}(plt::Plot, ticks::AVec{T}; kw...) = plot!(plt; yticks = ticks, kw...)
|
yticks!{T<:Real}(plt::Plot, ticks::AVec{T}; kw...) = plot!(plt; yticks = ticks, kw...)
|
||||||
xticks!{T<:Real,S<:@compat(String)}(plt::Plot,
|
xticks!{T<:Real,S<:AbstractString}(plt::Plot,
|
||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; xticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; xticks = (ticks,labels), kw...)
|
||||||
yticks!{T<:Real,S<:@compat(String)}(plt::Plot,
|
yticks!{T<:Real,S<:AbstractString}(plt::Plot,
|
||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; yticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; yticks = (ticks,labels), kw...)
|
||||||
annotate!(plt::Plot, anns...; kw...) = plot!(plt; annotation = anns, kw...)
|
annotate!(plt::Plot, anns...; kw...) = plot!(plt; annotation = anns, kw...)
|
||||||
annotate!{T<:Tuple}(plt::Plot, anns::AVec{T}; kw...) = plot!(plt; annotation = anns, kw...)
|
annotate!{T<:Tuple}(plt::Plot, anns::AVec{T}; kw...) = plot!(plt; annotation = anns, kw...)
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
immutable Animation
|
immutable Animation
|
||||||
dir::@compat(String)
|
dir::Compat.ASCIIString
|
||||||
frames::Vector{@compat(String)}
|
frames::Vector{Compat.ASCIIString}
|
||||||
end
|
end
|
||||||
|
|
||||||
function Animation()
|
function Animation()
|
||||||
tmpdir = convert(@compat(String), mktempdir())
|
tmpdir = convert(Compat.ASCIIString, mktempdir())
|
||||||
Animation(tmpdir, @compat(String)[])
|
Animation(tmpdir, Compat.ASCIIString[])
|
||||||
end
|
end
|
||||||
|
|
||||||
function frame{P<:AbstractPlot}(anim::Animation, plt::P=current())
|
function frame{P<:AbstractPlot}(anim::Animation, plt::P=current())
|
||||||
@ -21,10 +21,10 @@ end
|
|||||||
|
|
||||||
"Wraps the location of an animated gif so that it can be displayed"
|
"Wraps the location of an animated gif so that it can be displayed"
|
||||||
immutable AnimatedGif
|
immutable AnimatedGif
|
||||||
filename::@compat(String)
|
filename::Compat.ASCIIString
|
||||||
end
|
end
|
||||||
|
|
||||||
function gif(anim::Animation, fn::@compat(String) = "tmp.gif"; fps::Integer = 20)
|
function gif(anim::Animation, fn::Compat.ASCIIString = "tmp.gif"; fps::Integer = 20)
|
||||||
fn = abspath(fn)
|
fn = abspath(fn)
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@ -678,8 +678,8 @@ end
|
|||||||
|
|
||||||
"A special type that will break up incoming data into groups, and allow for easier creation of grouped plots"
|
"A special type that will break up incoming data into groups, and allow for easier creation of grouped plots"
|
||||||
type GroupBy
|
type GroupBy
|
||||||
groupLabels::Vector{@compat(String)} # length == numGroups
|
groupLabels::Vector # length == numGroups
|
||||||
groupIds::Vector{Vector{Int}} # list of indices for each group
|
groupIds::Vector{Vector{Int}} # list of indices for each group
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ function process_axis_arg!(d::KW, arg, letter = "")
|
|||||||
elseif arg in (:flip, :invert, :inverted)
|
elseif arg in (:flip, :invert, :inverted)
|
||||||
d[Symbol(letter,:flip)] = true
|
d[Symbol(letter,:flip)] = true
|
||||||
|
|
||||||
elseif T <: @compat(String)
|
elseif T <: AbstractString
|
||||||
d[Symbol(letter,:guide)] = arg
|
d[Symbol(letter,:guide)] = arg
|
||||||
|
|
||||||
# xlims/ylims
|
# xlims/ylims
|
||||||
|
|||||||
@ -158,7 +158,7 @@ function plotlyfont(font::Font, color = font.color)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_annotation_dict(x, y, val::Union{@compat(String),Symbol})
|
function get_annotation_dict(x, y, val)
|
||||||
KW(
|
KW(
|
||||||
:text => val,
|
:text => val,
|
||||||
:xref => "x",
|
:xref => "x",
|
||||||
|
|||||||
@ -196,7 +196,7 @@ function getPyPlotMarker(markers::AVec)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# pass through
|
# pass through
|
||||||
function getPyPlotMarker(marker::@compat(String))
|
function getPyPlotMarker(marker::AbstractString)
|
||||||
@assert length(marker) == 1
|
@assert length(marker) == 1
|
||||||
marker
|
marker
|
||||||
end
|
end
|
||||||
@ -1096,7 +1096,7 @@ end
|
|||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
function createPyPlotAnnotationObject(sp::Subplot{PyPlotBackend}, x, y, val::@compat(String))
|
function createPyPlotAnnotationObject(sp::Subplot{PyPlotBackend}, x, y, val)
|
||||||
ax = sp.o
|
ax = sp.o
|
||||||
ax[:annotate](val, xy = (x,y))
|
ax[:annotate](val, xy = (x,y))
|
||||||
end
|
end
|
||||||
|
|||||||
@ -280,7 +280,7 @@ end
|
|||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
# since this is such a hack, it's only callable using `png`... should error during normal `writemime`
|
# since this is such a hack, it's only callable using `png`... should error during normal `writemime`
|
||||||
function png(plt::AbstractPlot{UnicodePlotsBackend}, fn::@compat(String))
|
function png(plt::AbstractPlot{UnicodePlotsBackend}, fn::AbstractString)
|
||||||
fn = addExtension(fn, "png")
|
fn = addExtension(fn, "png")
|
||||||
|
|
||||||
# make some whitespace and show the plot
|
# make some whitespace and show the plot
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# CREDIT: parts of this implementation were inspired by @joshday's PlotlyLocal.jl
|
# CREDIT: parts of this implementation were inspired by @joshday's PlotlyLocal.jl
|
||||||
|
|
||||||
|
|
||||||
function standalone_html(plt::AbstractPlot; title::@compat(String) = get(plt.attr, :window_title, "Plots.jl"))
|
function standalone_html(plt::AbstractPlot; title::AbstractString = get(plt.attr, :window_title, "Plots.jl"))
|
||||||
"""
|
"""
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@ -19,7 +19,7 @@ function standalone_html(plt::AbstractPlot; title::@compat(String) = get(plt.att
|
|||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
function open_browser_window(filename::@compat(String))
|
function open_browser_window(filename::AbstractString)
|
||||||
@osx_only return run(`open $(filename)`)
|
@osx_only return run(`open $(filename)`)
|
||||||
@linux_only return run(`xdg-open $(filename)`)
|
@linux_only return run(`xdg-open $(filename)`)
|
||||||
@windows_only return run(`$(ENV["COMSPEC"]) /c start $(filename)`)
|
@windows_only return run(`$(ENV["COMSPEC"]) /c start $(filename)`)
|
||||||
|
|||||||
@ -18,7 +18,8 @@ colorscheme(c::Colorant; kw...) = ColorWrapper(c; kw...)
|
|||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
convertColor(c::@compat(Union{@compat(String), Symbol})) = parse(Colorant, string(c))
|
convertColor(c::AbstractString) = parse(Colorant, c)
|
||||||
|
convertColor(c::Symbol) = parse(Colorant, string(c))
|
||||||
convertColor(c::Colorant) = c
|
convertColor(c::Colorant) = c
|
||||||
convertColor(cvec::AbstractVector) = map(convertColor, cvec)
|
convertColor(cvec::AbstractVector) = map(convertColor, cvec)
|
||||||
convertColor(c::ColorScheme) = c
|
convertColor(c::ColorScheme) = c
|
||||||
|
|||||||
@ -196,7 +196,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
immutable Font
|
immutable Font
|
||||||
family::@compat(String)
|
family::AbstractString
|
||||||
pointsize::Int
|
pointsize::Int
|
||||||
halign::Symbol
|
halign::Symbol
|
||||||
valign::Symbol
|
valign::Symbol
|
||||||
@ -227,7 +227,7 @@ function font(args...)
|
|||||||
valign = arg
|
valign = arg
|
||||||
elseif T <: Colorant
|
elseif T <: Colorant
|
||||||
color = arg
|
color = arg
|
||||||
elseif T <: @compat Union{Symbol,@compat(String)}
|
elseif T <: Symbol || T <: AbstractString
|
||||||
try
|
try
|
||||||
color = parse(Colorant, string(arg))
|
color = parse(Colorant, string(arg))
|
||||||
catch
|
catch
|
||||||
@ -247,7 +247,7 @@ end
|
|||||||
|
|
||||||
"Wrap a string with font info"
|
"Wrap a string with font info"
|
||||||
immutable PlotText
|
immutable PlotText
|
||||||
str::@compat(String)
|
str::AbstractString
|
||||||
font::Font
|
font::Font
|
||||||
end
|
end
|
||||||
PlotText(str) = PlotText(string(str), font())
|
PlotText(str) = PlotText(string(str), font())
|
||||||
@ -287,7 +287,7 @@ function stroke(args...; alpha = nothing)
|
|||||||
style = arg
|
style = arg
|
||||||
elseif T <: Colorant
|
elseif T <: Colorant
|
||||||
color = arg
|
color = arg
|
||||||
elseif T <: @compat Union{Symbol,@compat(String)}
|
elseif T <: Symbol || T <: AbstractString
|
||||||
try
|
try
|
||||||
color = parse(Colorant, string(arg))
|
color = parse(Colorant, string(arg))
|
||||||
end
|
end
|
||||||
@ -319,7 +319,7 @@ function brush(args...; alpha = nothing)
|
|||||||
|
|
||||||
if T <: Colorant
|
if T <: Colorant
|
||||||
color = arg
|
color = arg
|
||||||
elseif T <: @compat Union{Symbol,@compat(String)}
|
elseif T <: Symbol || T <: AbstractString
|
||||||
try
|
try
|
||||||
color = parse(Colorant, string(arg))
|
color = parse(Colorant, string(arg))
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,48 +2,48 @@
|
|||||||
|
|
||||||
defaultOutputFormat(plt::Plot) = "png"
|
defaultOutputFormat(plt::Plot) = "png"
|
||||||
|
|
||||||
function png(plt::Plot, fn::@compat(String))
|
function png(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "png")
|
fn = addExtension(fn, "png")
|
||||||
io = open(fn, "w")
|
io = open(fn, "w")
|
||||||
writemime(io, MIME("image/png"), plt)
|
writemime(io, MIME("image/png"), plt)
|
||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
png(fn::@compat(String)) = png(current(), fn)
|
png(fn::AbstractString) = png(current(), fn)
|
||||||
|
|
||||||
function svg(plt::Plot, fn::@compat(String))
|
function svg(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "svg")
|
fn = addExtension(fn, "svg")
|
||||||
io = open(fn, "w")
|
io = open(fn, "w")
|
||||||
writemime(io, MIME("image/svg+xml"), plt)
|
writemime(io, MIME("image/svg+xml"), plt)
|
||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
svg(fn::@compat(String)) = svg(current(), fn)
|
svg(fn::AbstractString) = svg(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
function pdf(plt::Plot, fn::@compat(String))
|
function pdf(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "pdf")
|
fn = addExtension(fn, "pdf")
|
||||||
io = open(fn, "w")
|
io = open(fn, "w")
|
||||||
writemime(io, MIME("application/pdf"), plt)
|
writemime(io, MIME("application/pdf"), plt)
|
||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
pdf(fn::@compat(String)) = pdf(current(), fn)
|
pdf(fn::AbstractString) = pdf(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
function ps(plt::Plot, fn::@compat(String))
|
function ps(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "ps")
|
fn = addExtension(fn, "ps")
|
||||||
io = open(fn, "w")
|
io = open(fn, "w")
|
||||||
writemime(io, MIME("application/postscript"), plt)
|
writemime(io, MIME("application/postscript"), plt)
|
||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
ps(fn::@compat(String)) = ps(current(), fn)
|
ps(fn::AbstractString) = ps(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
function tex(plt::Plot, fn::@compat(String))
|
function tex(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "tex")
|
fn = addExtension(fn, "tex")
|
||||||
io = open(fn, "w")
|
io = open(fn, "w")
|
||||||
writemime(io, MIME("application/x-tex"), plt)
|
writemime(io, MIME("application/x-tex"), plt)
|
||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
tex(fn::@compat(String)) = tex(current(), fn)
|
tex(fn::AbstractString) = tex(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
@ -57,7 +57,7 @@ tex(fn::@compat(String)) = tex(current(), fn)
|
|||||||
"tex" => tex,
|
"tex" => tex,
|
||||||
)
|
)
|
||||||
|
|
||||||
function getExtension(fn::@compat(String))
|
function getExtension(fn::AbstractString)
|
||||||
pieces = split(fn, ".")
|
pieces = split(fn, ".")
|
||||||
length(pieces) > 1 || error("Can't extract file extension: ", fn)
|
length(pieces) > 1 || error("Can't extract file extension: ", fn)
|
||||||
ext = pieces[end]
|
ext = pieces[end]
|
||||||
@ -65,7 +65,7 @@ function getExtension(fn::@compat(String))
|
|||||||
ext
|
ext
|
||||||
end
|
end
|
||||||
|
|
||||||
function addExtension(fn::@compat(String), ext::@compat(String))
|
function addExtension(fn::AbstractString, ext::AbstractString)
|
||||||
try
|
try
|
||||||
oldext = getExtension(fn)
|
oldext = getExtension(fn)
|
||||||
if oldext == ext
|
if oldext == ext
|
||||||
@ -78,7 +78,7 @@ function addExtension(fn::@compat(String), ext::@compat(String))
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function savefig(plt::Plot, fn::@compat(String))
|
function savefig(plt::Plot, fn::AbstractString)
|
||||||
|
|
||||||
# get the extension
|
# get the extension
|
||||||
local ext
|
local ext
|
||||||
@ -96,7 +96,7 @@ function savefig(plt::Plot, fn::@compat(String))
|
|||||||
end
|
end
|
||||||
func(plt, fn)
|
func(plt, fn)
|
||||||
end
|
end
|
||||||
savefig(fn::@compat(String)) = savefig(current(), fn)
|
savefig(fn::AbstractString) = savefig(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
@ -171,7 +171,7 @@ end
|
|||||||
# IJulia
|
# IJulia
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
const _ijulia_output = @compat(String)["text/html"]
|
const _ijulia_output = Compat.ASCIIString["text/html"]
|
||||||
|
|
||||||
function setup_ijulia()
|
function setup_ijulia()
|
||||||
# override IJulia inline display
|
# override IJulia inline display
|
||||||
@ -179,18 +179,16 @@ function setup_ijulia()
|
|||||||
@eval begin
|
@eval begin
|
||||||
import IJulia
|
import IJulia
|
||||||
export set_ijulia_output
|
export set_ijulia_output
|
||||||
function set_ijulia_output(mimestr::@compat(String))
|
function set_ijulia_output(mimestr::AbstractString)
|
||||||
# info("Setting IJulia output format to $mimestr")
|
# info("Setting IJulia output format to $mimestr")
|
||||||
global _ijulia_output
|
global _ijulia_output
|
||||||
_ijulia_output[1] = mimestr
|
_ijulia_output[1] = mimestr
|
||||||
end
|
end
|
||||||
function IJulia.display_dict(plt::Plot)
|
function IJulia.display_dict(plt::Plot)
|
||||||
global _ijulia_output
|
global _ijulia_output
|
||||||
Dict{@compat(String), ByteString}(_ijulia_output[1] => sprint(writemime, _ijulia_output[1], plt))
|
Dict{Compat.ASCIIString, ByteString}(_ijulia_output[1] => sprint(writemime, _ijulia_output[1], plt))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# IJulia.display_dict(plt::Plot) = Dict{@compat(String), ByteString}("text/html" => sprint(writemime, "text/html", plt))
|
|
||||||
set_ijulia_output("text/html")
|
set_ijulia_output("text/html")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user