Fix deprecations
This commit is contained in:
parent
0eab0dc680
commit
3a769549d8
@ -654,6 +654,7 @@ function handleColors!(d::KW, arg, csym::Symbol)
|
|||||||
d[csym] = c
|
d[csym] = c
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|||||||
@ -80,7 +80,7 @@ function _initialize_backend(::GLVisualizeBackend; kw...)
|
|||||||
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
is_marker_supported(::GLVisualizeBackend, shape::GLVisualize.AllPrimitives) = true
|
||||||
is_marker_supported(::GLVisualizeBackend, shape::Union{Vector{Matrix{C}}, Matrix{C}}) where {C<:Colorant} = true
|
is_marker_supported(::GLVisualizeBackend, shape::Union{Vector{Matrix{C}}, Matrix{C}}) where {C<:Colorant} = true
|
||||||
is_marker_supported(::GLVisualizeBackend, shape::Shape) = true
|
is_marker_supported(::GLVisualizeBackend, shape::Shape) = true
|
||||||
const GL = Plots
|
GL = Plots
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -146,7 +146,7 @@ function _initialize_backend(::HDF5Backend)
|
|||||||
export HDF5
|
export HDF5
|
||||||
if length(HDF5PLOT_MAP_TELEM2STR) < 1
|
if length(HDF5PLOT_MAP_TELEM2STR) < 1
|
||||||
#Possible element types of high-level data types:
|
#Possible element types of high-level data types:
|
||||||
const telem2str = Dict{String, Type}(
|
telem2str = Dict{String, Type}(
|
||||||
"NATIVE" => HDF5PlotNative,
|
"NATIVE" => HDF5PlotNative,
|
||||||
"VOID" => Void,
|
"VOID" => Void,
|
||||||
"BOOL" => Bool,
|
"BOOL" => Bool,
|
||||||
|
|||||||
@ -166,7 +166,7 @@ function _initialize_backend(::InspectDRBackend; kw...)
|
|||||||
export InspectDR
|
export InspectDR
|
||||||
|
|
||||||
#Glyph used when plotting "Shape"s:
|
#Glyph used when plotting "Shape"s:
|
||||||
const INSPECTDR_GLYPH_SHAPE = InspectDR.GlyphPolyline(
|
INSPECTDR_GLYPH_SHAPE = InspectDR.GlyphPolyline(
|
||||||
2*InspectDR.GLYPH_SQUARE.x, InspectDR.GLYPH_SQUARE.y
|
2*InspectDR.GLYPH_SQUARE.x, InspectDR.GLYPH_SQUARE.y
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -347,8 +347,8 @@ end
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function _inspectdr_setupsubplot(sp::Subplot{InspectDRBackend})
|
function _inspectdr_setupsubplot(sp::Subplot{InspectDRBackend})
|
||||||
const plot = sp.o
|
plot = sp.o
|
||||||
const strip = plot.strips[1] #Only 1 strip supported with Plots.jl
|
strip = plot.strips[1] #Only 1 strip supported with Plots.jl
|
||||||
|
|
||||||
xaxis = sp[:xaxis]; yaxis = sp[:yaxis]
|
xaxis = sp[:xaxis]; yaxis = sp[:yaxis]
|
||||||
xgrid_show = xaxis[:grid]
|
xgrid_show = xaxis[:grid]
|
||||||
@ -406,7 +406,7 @@ end
|
|||||||
# called just before updating layout bounding boxes... in case you need to prep
|
# called just before updating layout bounding boxes... in case you need to prep
|
||||||
# for the calcs
|
# for the calcs
|
||||||
function _before_layout_calcs(plt::Plot{InspectDRBackend})
|
function _before_layout_calcs(plt::Plot{InspectDRBackend})
|
||||||
const mplot = _inspectdr_getmplot(plt.o)
|
mplot = _inspectdr_getmplot(plt.o)
|
||||||
if nothing == mplot; return; end
|
if nothing == mplot; return; end
|
||||||
|
|
||||||
mplot.title = plt[:plot_title]
|
mplot.title = plt[:plot_title]
|
||||||
|
|||||||
@ -82,21 +82,21 @@ function _initialize_backend(::PyPlotBackend)
|
|||||||
append!(Base.Multimedia.displays, otherdisplays)
|
append!(Base.Multimedia.displays, otherdisplays)
|
||||||
|
|
||||||
export PyPlot
|
export PyPlot
|
||||||
const pycolors = PyPlot.pyimport("matplotlib.colors")
|
pycolors = PyPlot.pyimport("matplotlib.colors")
|
||||||
const pypath = PyPlot.pyimport("matplotlib.path")
|
pypath = PyPlot.pyimport("matplotlib.path")
|
||||||
const mplot3d = PyPlot.pyimport("mpl_toolkits.mplot3d")
|
mplot3d = PyPlot.pyimport("mpl_toolkits.mplot3d")
|
||||||
const pypatches = PyPlot.pyimport("matplotlib.patches")
|
pypatches = PyPlot.pyimport("matplotlib.patches")
|
||||||
const pyfont = PyPlot.pyimport("matplotlib.font_manager")
|
pyfont = PyPlot.pyimport("matplotlib.font_manager")
|
||||||
const pyticker = PyPlot.pyimport("matplotlib.ticker")
|
pyticker = PyPlot.pyimport("matplotlib.ticker")
|
||||||
const pycmap = PyPlot.pyimport("matplotlib.cm")
|
pycmap = PyPlot.pyimport("matplotlib.cm")
|
||||||
const pynp = PyPlot.pyimport("numpy")
|
pynp = PyPlot.pyimport("numpy")
|
||||||
pynp["seterr"](invalid="ignore")
|
pynp["seterr"](invalid="ignore")
|
||||||
const pytransforms = PyPlot.pyimport("matplotlib.transforms")
|
pytransforms = PyPlot.pyimport("matplotlib.transforms")
|
||||||
const pycollections = PyPlot.pyimport("matplotlib.collections")
|
pycollections = PyPlot.pyimport("matplotlib.collections")
|
||||||
const pyart3d = PyPlot.art3D
|
pyart3d = PyPlot.art3D
|
||||||
|
|
||||||
# "support" matplotlib v1.5
|
# "support" matplotlib v1.5
|
||||||
const set_facecolor_sym = if PyPlot.version < v"2"
|
set_facecolor_sym = if PyPlot.version < v"2"
|
||||||
warn("You are using Matplotlib $(PyPlot.version), which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0")
|
warn("You are using Matplotlib $(PyPlot.version), which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0")
|
||||||
:set_axis_bgcolor
|
:set_axis_bgcolor
|
||||||
else
|
else
|
||||||
|
|||||||
@ -69,6 +69,7 @@ function weave(x,y; ordering = Vector[x,y])
|
|||||||
for o in ordering
|
for o in ordering
|
||||||
try
|
try
|
||||||
push!(ret, shift!(o))
|
push!(ret, shift!(o))
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
done = isempty(x) && isempty(y)
|
done = isempty(x) && isempty(y)
|
||||||
@ -388,6 +389,7 @@ function stroke(args...; alpha = nothing)
|
|||||||
elseif T <: Symbol || T <: AbstractString
|
elseif T <: Symbol || T <: AbstractString
|
||||||
try
|
try
|
||||||
color = parse(Colorant, string(arg))
|
color = parse(Colorant, string(arg))
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
elseif allAlphas(arg)
|
elseif allAlphas(arg)
|
||||||
alpha = arg
|
alpha = arg
|
||||||
@ -420,6 +422,7 @@ function brush(args...; alpha = nothing)
|
|||||||
elseif T <: Symbol || T <: AbstractString
|
elseif T <: Symbol || T <: AbstractString
|
||||||
try
|
try
|
||||||
color = parse(Colorant, string(arg))
|
color = parse(Colorant, string(arg))
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
elseif allAlphas(arg)
|
elseif allAlphas(arg)
|
||||||
alpha = arg
|
alpha = arg
|
||||||
|
|||||||
@ -46,7 +46,7 @@ convertToAnyVector(v::Volume, d::KW) = Any[v], nothing
|
|||||||
# convertToAnyVector(v::AVec{OHLC}, d::KW) = Any[v], nothing
|
# convertToAnyVector(v::AVec{OHLC}, d::KW) = Any[v], nothing
|
||||||
|
|
||||||
# # dates
|
# # dates
|
||||||
convertToAnyVector{D<:Union{Date,DateTime}}(dts::AVec{D}, d::KW) = Any[dts], nothing
|
convertToAnyVector(dts::AVec{D}, d::KW) where {D<:Union{Date,DateTime}} = Any[dts], nothing
|
||||||
|
|
||||||
# list of things (maybe other vectors, functions, or something else)
|
# list of things (maybe other vectors, functions, or something else)
|
||||||
function convertToAnyVector(v::AVec, d::KW)
|
function convertToAnyVector(v::AVec, d::KW)
|
||||||
|
|||||||
@ -307,6 +307,7 @@ function _expand_limits(lims, x)
|
|||||||
lims[2] = NaNMath.max(lims[2], e2)
|
lims[2] = NaNMath.max(lims[2], e2)
|
||||||
# catch err
|
# catch err
|
||||||
# warn(err)
|
# warn(err)
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
nothing
|
nothing
|
||||||
end
|
end
|
||||||
|
|||||||
@ -10,6 +10,7 @@ ENV["MPLBACKEND"] = "Agg"
|
|||||||
try
|
try
|
||||||
@eval import PyPlot
|
@eval import PyPlot
|
||||||
info("Matplotlib version: $(PyPlot.matplotlib[:__version__])")
|
info("Matplotlib version: $(PyPlot.matplotlib[:__version__])")
|
||||||
|
catch
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user