Fix some deprecation warnings
This commit is contained in:
parent
7415a362c4
commit
f097fb57b5
@ -706,7 +706,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
rotation = sp[:xaxis][:rotation])
|
rotation = sp[:xaxis][:rotation])
|
||||||
for (cv, dv) in zip(xticks...)
|
for (cv, dv) in zip(xticks...)
|
||||||
# use xor ($) to get the right y coords
|
# use xor ($) to get the right y coords
|
||||||
xi, yi = GR.wctondc(cv, (flip $ mirror) ? ymax : ymin)
|
xi, yi = GR.wctondc(cv, xor(flip, mirror) ? ymax : ymin)
|
||||||
# @show cv dv ymin xi yi flip mirror (flip $ mirror)
|
# @show cv dv ymin xi yi flip mirror (flip $ mirror)
|
||||||
gr_text(xi, yi + (mirror ? 1 : -1) * 5e-3, string(dv))
|
gr_text(xi, yi + (mirror ? 1 : -1) * 5e-3, string(dv))
|
||||||
end
|
end
|
||||||
@ -723,7 +723,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
rotation = sp[:yaxis][:rotation])
|
rotation = sp[:yaxis][:rotation])
|
||||||
for (cv, dv) in zip(yticks...)
|
for (cv, dv) in zip(yticks...)
|
||||||
# use xor ($) to get the right y coords
|
# use xor ($) to get the right y coords
|
||||||
xi, yi = GR.wctondc((flip $ mirror) ? xmax : xmin, cv)
|
xi, yi = GR.wctondc(xor(flip, mirror) ? xmax : xmin, cv)
|
||||||
# @show cv dv xmin xi yi
|
# @show cv dv xmin xi yi
|
||||||
gr_text(xi + (mirror ? 1 : -1) * 1e-2, yi, string(dv))
|
gr_text(xi + (mirror ? 1 : -1) * 1e-2, yi, string(dv))
|
||||||
end
|
end
|
||||||
|
|||||||
@ -507,7 +507,7 @@ end
|
|||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
abstract AbstractSurface
|
abstract type AbstractSurface end
|
||||||
|
|
||||||
"represents a contour or surface mesh"
|
"represents a contour or surface mesh"
|
||||||
immutable Surface{M<:AMat} <: AbstractSurface
|
immutable Surface{M<:AMat} <: AbstractSurface
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
abstract ColorScheme
|
abstract type ColorScheme end
|
||||||
|
|
||||||
Base.getindex(scheme::ColorScheme, i::Integer) = getColor(scheme, i)
|
Base.getindex(scheme::ColorScheme, i::Integer) = getColor(scheme, i)
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
# This should cut down on boilerplate code and allow more focused dispatch on type
|
# This should cut down on boilerplate code and allow more focused dispatch on type
|
||||||
# note: returns meta information... mainly for use with automatic labeling from DataFrames for now
|
# note: returns meta information... mainly for use with automatic labeling from DataFrames for now
|
||||||
|
|
||||||
typealias FuncOrFuncs{F} Union{F, Vector{F}, Matrix{F}}
|
const FuncOrFuncs{F} = Union{F, Vector{F}, Matrix{F}}
|
||||||
|
|
||||||
all3D(d::KW) = trueOrAllTrue(st -> st in (:contour, :contourf, :heatmap, :surface, :wireframe, :contour3d, :image), get(d, :seriestype, :none))
|
all3D(d::KW) = trueOrAllTrue(st -> st in (:contour, :contourf, :heatmap, :surface, :wireframe, :contour3d, :image), get(d, :seriestype, :none))
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ end
|
|||||||
|
|
||||||
@recipe function f{T<:Colorant}(mat::AMat{T})
|
@recipe function f{T<:Colorant}(mat::AMat{T})
|
||||||
n, m = size(mat)
|
n, m = size(mat)
|
||||||
|
|
||||||
if is_seriestype_supported(:image)
|
if is_seriestype_supported(:image)
|
||||||
seriestype := :image
|
seriestype := :image
|
||||||
SliceIt, 1:m, 1:n, Surface(mat)
|
SliceIt, 1:m, 1:n, Surface(mat)
|
||||||
|
|||||||
@ -32,7 +32,7 @@ get_subplot(plt::Plot, k) = plt.spmap[k]
|
|||||||
get_subplot(series::Series) = series.d[:subplot]
|
get_subplot(series::Series) = series.d[:subplot]
|
||||||
|
|
||||||
get_subplot_index(plt::Plot, idx::Integer) = Int(idx)
|
get_subplot_index(plt::Plot, idx::Integer) = Int(idx)
|
||||||
get_subplot_index(plt::Plot, sp::Subplot) = findfirst(_ -> _ === sp, plt.subplots)
|
get_subplot_index(plt::Plot, sp::Subplot) = findfirst(x -> x === sp, plt.subplots)
|
||||||
|
|
||||||
series_list(sp::Subplot) = sp.series_list # filter(series -> series.d[:subplot] === sp, sp.plt.series_list)
|
series_list(sp::Subplot) = sp.series_list # filter(series -> series.d[:subplot] === sp, sp.plt.series_list)
|
||||||
|
|
||||||
|
|||||||
@ -8,9 +8,9 @@ const KW = Dict{Symbol,Any}
|
|||||||
|
|
||||||
immutable PlotsDisplay <: Display end
|
immutable PlotsDisplay <: Display end
|
||||||
|
|
||||||
abstract AbstractBackend
|
abstract type AbstractBackend end
|
||||||
abstract AbstractPlot{T<:AbstractBackend}
|
abstract type AbstractPlot{T<:AbstractBackend} end
|
||||||
abstract AbstractLayout
|
abstract type AbstractLayout end
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@ -469,7 +469,7 @@ ok(tup::Tuple) = ok(tup...)
|
|||||||
# compute one side of a fill range from a ribbon
|
# compute one side of a fill range from a ribbon
|
||||||
function make_fillrange_side(y, rib)
|
function make_fillrange_side(y, rib)
|
||||||
frs = zeros(length(y))
|
frs = zeros(length(y))
|
||||||
for (i, (yi, ri)) in enumerate(zip(y, Base.cycle(rib)))
|
for (i, (yi, ri)) in enumerate(zip(y, Base.Iterators.cycle(rib)))
|
||||||
frs[i] = yi + ri
|
frs[i] = yi + ri
|
||||||
end
|
end
|
||||||
frs
|
frs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user