diff --git a/REQUIRE b/REQUIRE index 2d184bf7..39402c3d 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,4 +1,4 @@ -julia 0.6 +julia 0.6-pre RecipesBase PlotUtils 0.4.1 diff --git a/src/Plots.jl b/src/Plots.jl index 9b613056..2f9caeca 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -1,4 +1,4 @@ -__precompile__(true) +__precompile__(false) module Plots @@ -118,6 +118,15 @@ ignoreNaN_extrema(x) = Base.extrema(x) # --------------------------------------------------------- +# to cater for block matrices, Base.transpose is recursive. +# This makes it impossible to create row vectors of String and Symbol with the transpose operator. +# This solves this issue, internally in Plots at least. + +Base.transpose(x::Symbol) = x +Base.transpose(x::String) = x + +# --------------------------------------------------------- + import Measures import Measures: Length, AbsoluteLength, Measure, BoundingBox, mm, cm, inch, pt, width, height, w, h const BBox = Measures.Absolute2DBox diff --git a/src/examples.jl b/src/examples.jl index 7025999f..e4c13ca6 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -41,7 +41,7 @@ PlotExample("Colors", [:(begin y = rand(100) plot(0:10:100,rand(11,4),lab="lines",w=3,palette=:grays,fill=0, α=0.6) - scatter!(y, zcolor=abs(y-.5), m=(:heat,0.8,stroke(1,:green)), ms=10*abs(y-0.5)+4, lab="grad") + scatter!(y, zcolor=abs.(y-.5), m=(:heat,0.8,stroke(1,:green)), ms=10*abs.(y-0.5)+4, lab="grad") end)] ), @@ -269,7 +269,7 @@ PlotExample("Polar Plots", "", [:(begin Θ = linspace(0,1.5π,100) - r = abs(0.1randn(100)+sin(3Θ)) + r = abs.(0.1randn(100)+sin.(3Θ)) plot(Θ, r, proj=:polar, m=2) end)] ), diff --git a/src/plot.jl b/src/plot.jl index 2e8063af..3ab41701 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -60,7 +60,7 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...) # build our plot vector from the args n = length(plts_tail) + 1 - plts = Array(Plot, n) + plts = Array{Plot}(n) plts[1] = plt1 for (i,plt) in enumerate(plts_tail) plts[i+1] = plt diff --git a/src/recipes.jl b/src/recipes.jl index e8ea3096..a474bd74 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -669,7 +669,7 @@ end edge_x, edge_y, weights = x, y, z.surf float_weights = float(weights) - if is(float_weights, weights) + if float_weights === weights float_weights = deepcopy(float_weights) end for (i, c) in enumerate(float_weights) diff --git a/src/utils.jl b/src/utils.jl index 1de784e1..8f51fc4d 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -355,8 +355,8 @@ function convert_to_polar(x, y, r_extrema = calc_r_extrema(x, y)) x = zeros(n) y = zeros(n) for i in 1:n - x[i] = cycle(r,i) * cos(cycle(phi,i)) - y[i] = cycle(r,i) * sin(cycle(phi,i)) + x[i] = cycle(r,i) * cos.(cycle(phi,i)) + y[i] = cycle(r,i) * sin.(cycle(phi,i)) end x, y end