From 698d583d1d261e01d0d17e364db16c1e9d0c1ab7 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 8 May 2017 15:16:21 -0500 Subject: [PATCH 1/2] Fix world-age problem with IJulia --- src/output.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.jl b/src/output.jl index f3efd812..84225e9b 100644 --- a/src/output.jl +++ b/src/output.jl @@ -271,7 +271,7 @@ function setup_ijulia() show(io, MIME("text/html"), plt) end end - set_ijulia_output("text/html") + @eval set_ijulia_output("text/html") end end From 10f214fbb4cb700e0ad800c96eee6bab38c51c02 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Mon, 8 May 2017 15:20:21 -0500 Subject: [PATCH 2/2] Change typealias to const --- NEWS.md | 2 +- src/Plots.jl | 2 +- src/components.jl | 4 ++-- src/deprecated/series_args.jl | 2 +- src/series.jl | 2 +- src/types.jl | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NEWS.md b/NEWS.md index 8cd7a38e..dcf896a1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -364,7 +364,7 @@ - z-axis keywords - 3D indexing overhaul: `push!`, `append!` support - matplotlib colormap constants (`:inferno` is the new default colormap for Plots) -- `typealias KW Dict{Symbol,Any}` used in place of splatting in many places +- `const KW = Dict{Symbol,Any}` used in place of splatting in many places - png generation for plotly backend using wkhtmltoimage - `normalize` and `weights` keywords - background/foreground subcategories for fine-tuning of looks diff --git a/src/Plots.jl b/src/Plots.jl index 113242e9..7e630ad7 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -108,7 +108,7 @@ export import Measures import Measures: Length, AbsoluteLength, Measure, BoundingBox, mm, cm, inch, pt, width, height, w, h -typealias BBox Measures.Absolute2DBox +const BBox = Measures.Absolute2DBox export BBox, BoundingBox, mm, cm, inch, pt, px, pct, w, h # --------------------------------------------------------- diff --git a/src/components.jl b/src/components.jl index 551fbee8..b20eb3d0 100644 --- a/src/components.jl +++ b/src/components.jl @@ -1,7 +1,7 @@ -typealias P2 FixedSizeArrays.Vec{2,Float64} -typealias P3 FixedSizeArrays.Vec{3,Float64} +const P2 = FixedSizeArrays.Vec{2,Float64} +const P3 = FixedSizeArrays.Vec{3,Float64} nanpush!(a::AbstractVector{P2}, b) = (push!(a, P2(NaN,NaN)); push!(a, b)) nanappend!(a::AbstractVector{P2}, b) = (push!(a, P2(NaN,NaN)); append!(a, b)) diff --git a/src/deprecated/series_args.jl b/src/deprecated/series_args.jl index 7d491290..2d7536f4 100644 --- a/src/deprecated/series_args.jl +++ b/src/deprecated/series_args.jl @@ -5,7 +5,7 @@ # 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 -typealias FuncOrFuncs @compat(Union{Function, AVec{Function}}) +const FuncOrFuncs = @compat(Union{Function, AVec{Function}}) all3D(d::KW) = trueOrAllTrue(st -> st in (:contour, :contourf, :heatmap, :surface, :wireframe, :contour3d, :image), get(d, :seriestype, :none)) diff --git a/src/series.jl b/src/series.jl index f7233c1a..cf9756c5 100644 --- a/src/series.jl +++ b/src/series.jl @@ -6,7 +6,7 @@ # 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 -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)) diff --git a/src/types.jl b/src/types.jl index 0f1e4909..284b6534 100644 --- a/src/types.jl +++ b/src/types.jl @@ -2,9 +2,9 @@ # TODO: I declare lots of types here because of the lacking ability to do forward declarations in current Julia # I should move these to the relevant files when something like "extern" is implemented -typealias AVec AbstractVector -typealias AMat AbstractMatrix -typealias KW Dict{Symbol,Any} +const AVec = AbstractVector +const AMat = AbstractMatrix +const KW = Dict{Symbol,Any} immutable PlotsDisplay <: Display end @@ -62,7 +62,7 @@ Extrema() = Extrema(Inf, -Inf) # ----------------------------------------------------------- -typealias SubplotMap Dict{Any, Subplot} +const SubplotMap = Dict{Any, Subplot} # -----------------------------------------------------------