From 60222095b6c2fe2765ff04020cd5c8e838df3f42 Mon Sep 17 00:00:00 2001 From: yha Date: Tue, 7 Dec 2021 19:13:32 +0200 Subject: [PATCH 01/14] boxplots: rename range->whisker_range --- src/shorthands.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shorthands.jl b/src/shorthands.jl index 923ed5a4..0e776533 100644 --- a/src/shorthands.jl +++ b/src/shorthands.jl @@ -348,8 +348,8 @@ Make a box and whisker plot. # Keyword arguments - `notch`: Bool. Notch the box plot? (false) -- `range`: Real. Values more than range*IQR below the first quartile - or above the third quartile are shown as outliers (1.5) +- `whisker_range`: Real. Whiskers extend `whisker_range`*IQR below the first quartile + and above the third quartile. Values outside this range are shown as outliers (1.5) - `outliers`: Bool. Show outliers? (true) - `whisker_width`: Real or Symbol. Length of whiskers (:match) From 5d97de1345f675fa8d99a5ed0bae6c5fb94075c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 19 Dec 2021 23:21:41 +0100 Subject: [PATCH 02/14] Format .jl files [skip ci] (#4012) Co-authored-by: t-bltg --- src/utils.jl | 6 ++++-- test/runtests.jl | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 322f6d47..866ff1d6 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -216,9 +216,11 @@ maketuple(x::Real) = (x, x) maketuple(x::Tuple{T,S}) where {T,S} = x RecipesPipeline.unzip(v) = unzip(v) -RecipesPipeline.unzip(points::AbstractVector{<:GeometryBasics.Point}) = unzip(Tuple.(points)) +RecipesPipeline.unzip(points::AbstractVector{<:GeometryBasics.Point}) = + unzip(Tuple.(points)) RecipesPipeline.unzip(points::AbstractVector{GeometryBasics.Point{N,T}}) where {N,T} = - isbitstype(T) && sizeof(T) > 0 ? unzip(reinterpret(NTuple{N,T}, points)) : unzip(Tuple.(points)) + isbitstype(T) && sizeof(T) > 0 ? unzip(reinterpret(NTuple{N,T}, points)) : + unzip(Tuple.(points)) # given 2-element lims and a vector of data x, widen lims to account for the extrema of x function _expand_limits(lims, x) diff --git a/test/runtests.jl b/test/runtests.jl index 44c9e4d8..66885cff 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -191,7 +191,10 @@ end ) for z in zipped @test isequal(collect(zip(Plots.RecipesPipeline.unzip(z)...)), z) - @test isequal(collect(zip(Plots.RecipesPipeline.unzip(GeometryBasics.Point.(z))...)), z) + @test isequal( + collect(zip(Plots.RecipesPipeline.unzip(GeometryBasics.Point.(z))...)), + z, + ) end op1 = Plots.process_clims((1.0, 2.0)) op2 = Plots.process_clims((1, 2.0)) From cb359c0d4e9be2ff0f7a55ed7c38debb3d701821 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 20 Dec 2021 21:01:25 +0100 Subject: [PATCH 03/14] 1.25.3 [skip ci] --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 658b2f27..f253fab6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.25.2" +version = "1.25.3" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" From 492f94bf10627961c03c0e6b8adce8ebb857ad5b Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 20 Dec 2021 21:24:58 +0100 Subject: [PATCH 04/14] Fix fillranges with OffsetVectors for plotly (#4006) * don't mutate the Plot object * remove show * collect vectors to workaround vcat issue --- src/backends/plotly.jl | 4 ++-- src/examples.jl | 10 +++++----- src/utils.jl | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index eb5f2692..94073d00 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -940,7 +940,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z plotattributes_out_fillrange[:showlegend] = false # if fillrange is provided as real or tuple of real, expand to array if typeof(series[:fillrange]) <: Real - series[:fillrange] = fill(series[:fillrange], length(rng)) + plotattributes_out[:fillrange] = fill(series[:fillrange], length(rng)) elseif typeof(series[:fillrange]) <: Tuple f1 = typeof(series[:fillrange][1]) <: Real ? @@ -948,7 +948,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z f2 = typeof(series[:fillrange][2]) <: Real ? fill(series[:fillrange][2], length(rng)) : series[:fillrange][2][rng] - series[:fillrange] = (f1, f2) + plotattributes_out[:fillrange] = (f1, f2) end if isa(series[:fillrange], AbstractVector) plotattributes_out_fillrange[:y] = series[:fillrange][rng] diff --git a/src/examples.jl b/src/examples.jl index c173f328..0c56bce9 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -962,9 +962,9 @@ const _examples = PlotExample[ """ Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically. You can also specify the connections using the connections keyword. - The connections can be specified in two ways: Either as a tuple of vectors where each vector - contains the 0-based indices of one point of a triangle, such that elements at the same - position of these vectors form a triangle. Or as a vector of NTuple{3,Ints} where each element + The connections can be specified in two ways: Either as a tuple of vectors where each vector + contains the 0-based indices of one point of a triangle, such that elements at the same + position of these vectors form a triangle. Or as a vector of NTuple{3,Ints} where each element contains the 1-based indices of the three points of a triangle. """, [ @@ -1235,7 +1235,7 @@ const _examples = PlotExample[ PlotExample( # 56 "Bar plot customizations", """ - Width of bars may be specified as `bar_width`. + Width of bars may be specified as `bar_width`. The bars' baseline may be specified as `fillto`. Each may be scalar, or a vector spcifying one value per bar. """, @@ -1271,7 +1271,7 @@ _animation_examples = [2, 31] _backend_skips = Dict( :gr => [25, 30], :pyplot => [2, 25, 30, 31, 49, 55, 56], - :plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51, 55, 56], + :plotlyjs => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55, 56], :pgfplotsx => [ 2, # animation 6, # images diff --git a/src/utils.jl b/src/utils.jl index 866ff1d6..b0ed9e60 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -434,9 +434,9 @@ end #turn tuple of fillranges to one path function concatenate_fillrange(x, y::Tuple) - rib1, rib2 = first(y), last(y) - yline = vcat(rib1, (rib2)[end:-1:1]) - xline = vcat(x, x[end:-1:1]) + rib1, rib2 = collect(first(y)), collect(last(y)) # collect needed until https://github.com/JuliaLang/julia/pull/37629 is merged + yline = vcat(rib1, reverse(rib2)) + xline = vcat(x, reverse(x)) return xline, yline end From e0bc4b1406de71d412736589fd8d360d5ce0097a Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Wed, 22 Dec 2021 12:59:42 +0100 Subject: [PATCH 05/14] [GR] bump version bump GR version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index f253fab6..a71c4a5b 100644 --- a/Project.toml +++ b/Project.toml @@ -39,7 +39,7 @@ Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" Contour = "0.5" FFMPEG = "0.2 - 0.4" FixedPointNumbers = "0.6 - 0.8" -GR = "0.62.1" +GR = "0.63.0" GeometryBasics = "0.2, 0.3.1, 0.4" JSON = "0.21, 1" Latexify = "0.14 - 0.15" From 834a1523af59ba68c0484064a08cab20520062d3 Mon Sep 17 00:00:00 2001 From: Zhanibek Date: Mon, 27 Dec 2021 23:44:37 +0900 Subject: [PATCH 06/14] add extrakw for colorbar positioning control in 3d --- src/backends/pyplot.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 3f1a9141..7ba29c3b 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -1725,7 +1725,8 @@ function _update_plot_object(plt::Plot{PyPlotBackend}) _cbar_width - 1mm, height(sp.bbox) - 4mm, ) - pcts = bbox_to_pcts(cb_bbox, figw, figh) + pcts = get(sp[:extra_kwargs], "3d_colorbar_axis", bbox_to_pcts(cb_bbox, figw, figh)) + sp.attr[:cbar_ax]."set_position"(pcts) end end From 30d2f01d9d35a4d713039b6839ed2193ef07c560 Mon Sep 17 00:00:00 2001 From: Diego Javier Zea Date: Wed, 29 Dec 2021 13:30:00 +0100 Subject: [PATCH 07/14] Update boxplot doc (#4014) Update and improve whisker_width documentation (boxplots). --- src/shorthands.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shorthands.jl b/src/shorthands.jl index 0e776533..d8963443 100644 --- a/src/shorthands.jl +++ b/src/shorthands.jl @@ -351,7 +351,7 @@ Make a box and whisker plot. - `whisker_range`: Real. Whiskers extend `whisker_range`*IQR below the first quartile and above the third quartile. Values outside this range are shown as outliers (1.5) - `outliers`: Bool. Show outliers? (true) -- `whisker_width`: Real or Symbol. Length of whiskers (:match) +- `whisker_width`: Real or Symbol. Length of whiskers; the options are `:match` to match the box width, `:half`, or a number to indicate the total length. (:half) # Example ```julia-repl From 95d1fa00019172ec598ce3f214d1e69adcc0e1a2 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Wed, 29 Dec 2021 07:31:29 -0500 Subject: [PATCH 08/14] Set max_methods=1 (#4010) --- src/Plots.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Plots.jl b/src/Plots.jl index fcf76991..5717a37e 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -3,6 +3,9 @@ module Plots if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel")) @eval Base.Experimental.@optlevel 1 end +if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@max_methods")) + @eval Base.Experimental.@max_methods 1 +end const _current_plots_version = VersionNumber( split( From 693391e135a881bdbaffc697a308b201c4d2a424 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 14:03:04 +0100 Subject: [PATCH 09/14] Update precompile_*.jl file [skip ci] (#4015) Co-authored-by: t-bltg --- .../precompile/1.7/precompile_Plots.jl | 59 ++++--------------- 1 file changed, 10 insertions(+), 49 deletions(-) diff --git a/deps/SnoopCompile/precompile/1.7/precompile_Plots.jl b/deps/SnoopCompile/precompile/1.7/precompile_Plots.jl index 2fdca94c..44372671 100644 --- a/deps/SnoopCompile/precompile/1.7/precompile_Plots.jl +++ b/deps/SnoopCompile/precompile/1.7/precompile_Plots.jl @@ -74,15 +74,12 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Tuple{Int64, Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol}) Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:flip,), Tuple{Bool}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{Symbol}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :flip, :minorgrid, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Float64, Float64}}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Float64, Float64}, Bool}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :guide), Tuple{Bool, Bool, String}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :mirror, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid,), Tuple{Bool}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:gridlinewidth, :grid, :gridalpha, :gridstyle, :foreground_color_grid), Tuple{Int64, Bool, Float64, Symbol, RGBA{Float64}}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis}) @@ -90,11 +87,7 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, StepRange{Int64, Int64}, String}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid,), Tuple{Bool}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:rotation,), Tuple{Int64}},typeof(attr!),Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis}) Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)}) Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:titlefont, :legendfontsize, :guidefont, :tickfont, :guide, :framestyle, :yminorgrid), Tuple{Tuple{Int64, String}, Int64, Tuple{Int64, Symbol}, Tuple{Int64, Symbol}, String, Symbol, Bool}},typeof(default)}) @@ -105,9 +98,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:rotation, :color), Tuple{Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(lens!)),Any,typeof(lens!),Any,Vararg{Any}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}}) @@ -125,8 +115,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{GRBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{PlotlyBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Float64}}) @@ -139,14 +127,11 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:xgrid,), Tuple{Tuple{Symbol, Symbol, Int64, Symbol, Float64}}},typeof(plot!),Plot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!),Plot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!),Plot{PlotlyBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:arrow,), Tuple{Int64}},typeof(plot),Vector{Float64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bar_width, :alpha, :color, :fillto, :label, :seriestype), Tuple{Float64, Float64, Vector{Symbol}, StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, String, Symbol}},typeof(plot),Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}}) @@ -159,7 +144,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:labels,), Tuple{Matrix{String}}},typeof(plot),PortfolioComposition}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{Matrix{Any}, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}}) @@ -194,7 +178,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:projection, :seriestype), Tuple{Symbol, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},UnitRange{Int64},Matrix{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:quiver, :seriestype), Tuple{Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:reg, :fill), Tuple{Bool, Tuple{Int64, Symbol}}},typeof(plot),Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Int64}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64, Int64}, LinRange{Float64, Int64}}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}}) @@ -217,9 +200,9 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip,), Tuple{Vector{Int64}}},typeof(test_examples),Symbol}) Base.precompile(Tuple{Core.kwftype(typeof(yaxis!)),Any,typeof(yaxis!),Any,Any}) Base.precompile(Tuple{Type{GridLayout},Int64,Vararg{Int64}}) + Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{<:GeometryBasics.Point}}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{OHLC}}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},PortfolioComposition}) - Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barbins}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barhist}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bar}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any}) @@ -239,10 +222,9 @@ function _precompile_() Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}}) Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}}) Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict}) - Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plot{GRBackend},Dict{Symbol, Any},Symbol}) - Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plot{PlotlyBackend},Dict{Symbol, Any},Symbol}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}}) + Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Float64},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Int64},String}) @@ -250,12 +232,7 @@ function _precompile_() Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String}) - Base.precompile(Tuple{typeof(_cycle),Base.OneTo{Int64},Vector{Int64}}) - Base.precompile(Tuple{typeof(_cycle),ColorPalette,Int64}) Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}}) - Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}}) - Base.precompile(Tuple{typeof(_cycle),Vector{Float64},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(_cycle),Vector{Float64},Vector{Int64}}) Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool}) Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool}) Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool}) @@ -286,7 +263,6 @@ function _precompile_() Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}}) Base.precompile(Tuple{typeof(get_series_color),SubArray{Symbol, 1, Vector{Symbol}, Tuple{UnitRange{Int64}}, true},Subplot{GRBackend},Int64,Symbol}) Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol}) - Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{PlotlyBackend},Int64,Symbol}) Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any}}) Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any}}) Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any}}) @@ -302,18 +278,19 @@ function _precompile_() Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol}) Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol}) + Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}}) + Base.precompile(Tuple{typeof(gr_draw_markers),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64},Vector{Float64},Tuple{Float64, Float64}}) + Base.precompile(Tuple{typeof(gr_draw_markers),Series,UnitRange{Int64},Vector{Float64},Tuple{Float64, Float64}}) + Base.precompile(Tuple{typeof(gr_draw_markers),Series,Vector{Int64},Vector{Float64},Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}}) - Base.precompile(Tuple{typeof(gr_draw_segments),Series,UnitRange{Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}}) - Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}}) Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}}) Base.precompile(Tuple{typeof(gr_get_3d_axis_angle),Vector{Float64},Float64,Float64,Symbol}) Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64}) - Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Int64}, Vector{String}},Int64}) Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}}) Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, Vector{String}}}) Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}}) @@ -331,18 +308,15 @@ function _precompile_() Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol,Vector{Float64},Symbol,Tuple{Int64, Int64},Bool}) Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol}) Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}}) - Base.precompile(Tuple{typeof(layout_args),Matrix{Any}}) + Base.precompile(Tuple{typeof(is_2tuple),Tuple{Int64, Int64}}) Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :blank), Tuple{Symbol, Bool}}}) Base.precompile(Tuple{typeof(layout_args),NamedTuple{(:label, :width, :height), Tuple{Symbol, Symbol, Float64}}}) - Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64, Int64}}) - Base.precompile(Tuple{typeof(make_steps),Vector{Float64},Symbol,Bool}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Float64},Symbol,Symbol}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Int64},Symbol,Symbol}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol}) Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol}) - Base.precompile(Tuple{typeof(partialcircle),Float64,Float64,Int64}) Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64}) Base.precompile(Tuple{typeof(plot),Any,Any}) Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}}}) @@ -352,12 +326,9 @@ function _precompile_() Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Matrix{Symbol}}) Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Symbol}) - Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Bool}) - Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Float64}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}}) - Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Stroke}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol}) Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText}) Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}}) @@ -367,35 +338,25 @@ function _precompile_() Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}}) Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol}) Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol}) - Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Tuple{Int64, Int64},Symbol}) Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}}) Base.precompile(Tuple{typeof(quiver_using_arrows),DefaultsDict}) Base.precompile(Tuple{typeof(resetfontsizes)}) Base.precompile(Tuple{typeof(scalefontsizes),Float64}) Base.precompile(Tuple{typeof(series_annotations),Vector{Any}}) - Base.precompile(Tuple{typeof(slice_arg),Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64}) Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64}) Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{PlotUtils.ContinuousColorGradient},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{String},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{Symbol},Int64}) Base.precompile(Tuple{typeof(spy),Any}) Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64}) Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any}}) Base.precompile(Tuple{typeof(title!),AbstractString}) - Base.precompile(Tuple{typeof(unzip),Vector{GeometryBasics.Point2{Float64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Float64, Float64, Float64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Vector{Float64}, Vector{Float64}}}}) + Base.precompile(Tuple{typeof(update_clims),Float64,Float64,SubArray{Int64, 1, Vector{Int64}, Tuple{UnitRange{Int64}}, true},typeof(ignorenan_extrema)}) Base.precompile(Tuple{typeof(vline!),Any}) Base.precompile(Tuple{typeof(warn_on_attr_dim_mismatch),Series,Vector{Float64},Vector{Float64},Nothing,Base.Iterators.Flatten{Vector{Tuple{SeriesSegment}}}}) Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any}}) - Base.precompile(Tuple{typeof(xgrid!),Plot{PlotlyBackend},Symbol,Vararg{Any}}) Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}}) isdefined(Plots, Symbol("#4#8")) && Base.precompile(Tuple{getfield(Plots, Symbol("#4#8")),UnitRange{Int64}}) - isdefined(Plots, Symbol("#add_major_or_minor_segments#124")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#124")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool}) - isdefined(Plots, Symbol("#add_major_or_minor_segments#125")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#125")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool}) + isdefined(Plots, Symbol("#add_major_or_minor_segments#104")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#104")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool}) + isdefined(Plots, Symbol("#add_major_or_minor_segments#105")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#105")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool}) let fbody = try __lookup_kwbody__(which(annotate!, (AbstractVector{<:Tuple},))) catch missing end if !ismissing(fbody) precompile(fbody, (Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}},typeof(annotate!),AbstractVector{<:Tuple},)) From 6e79cf4a3e3ce9265bedbfbb6c111f26b7db23f4 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Wed, 29 Dec 2021 14:04:38 +0100 Subject: [PATCH 10/14] Run SnoopCompile on master only --- .github/workflows/SnoopCompile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SnoopCompile.yml b/.github/workflows/SnoopCompile.yml index 7566c6f0..f9a84a87 100644 --- a/.github/workflows/SnoopCompile.yml +++ b/.github/workflows/SnoopCompile.yml @@ -3,7 +3,7 @@ name: SnoopCompile on: push: branches: - # - 'master' # NOTE: to run the bot only on pushes to master + - master # NOTE: to run the bot only on pushes to master defaults: run: From 0beba9d1c889b04d2204f30fb852e627ad86b1c4 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Wed, 29 Dec 2021 14:16:23 +0100 Subject: [PATCH 11/14] Update and rename SnoopCompile.yml to CompileBot.yml --- .github/workflows/{SnoopCompile.yml => CompileBot.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{SnoopCompile.yml => CompileBot.yml} (99%) diff --git a/.github/workflows/SnoopCompile.yml b/.github/workflows/CompileBot.yml similarity index 99% rename from .github/workflows/SnoopCompile.yml rename to .github/workflows/CompileBot.yml index f9a84a87..4ecab16b 100644 --- a/.github/workflows/SnoopCompile.yml +++ b/.github/workflows/CompileBot.yml @@ -1,4 +1,4 @@ -name: SnoopCompile +name: CompileBot on: push: From ead9d87942e4e804fdf578d27e5cd27910067591 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 15:24:32 +0100 Subject: [PATCH 12/14] Update precompile_*.jl file [skip ci] (#4018) Co-authored-by: t-bltg --- .../precompile/1.6/precompile_Plots.jl | 40 +++---------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/deps/SnoopCompile/precompile/1.6/precompile_Plots.jl b/deps/SnoopCompile/precompile/1.6/precompile_Plots.jl index cf0472ae..29e71861 100644 --- a/deps/SnoopCompile/precompile/1.6/precompile_Plots.jl +++ b/deps/SnoopCompile/precompile/1.6/precompile_Plots.jl @@ -104,10 +104,8 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),StepRange{Int64, Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}}) - Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Float64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}},typeof(gr_set_font),Font,Subplot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:rotation, :color), Tuple{Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}}) @@ -139,7 +137,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any, N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:xgrid,), Tuple{Tuple{Symbol, Symbol, Int64, Symbol, Float64}}},typeof(plot!),Plot{GRBackend}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!),Plot{GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!),Plot{PlotlyBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}}) @@ -159,7 +156,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}}) - Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:labels,), Tuple{Matrix{String}}},typeof(plot),PortfolioComposition}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{Matrix{Any}, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}}) @@ -237,8 +233,10 @@ function _precompile_() Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}}) Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{PlotlyBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}}) Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plot{GRBackend},DefaultsDict}) + Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plot{PlotlyBackend},Dict{Symbol, Any},Symbol}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{GRBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plot{PlotlyBackend},Vector{Dict{Symbol, Any}},Dict{Symbol, Any}}) + Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Vector{GeometryBasics.Point2{Float64}}}) Base.precompile(Tuple{typeof(_bin_centers),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Float64},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Int64},String}) @@ -246,18 +244,15 @@ function _precompile_() Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}},String}) Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String}) - Base.precompile(Tuple{typeof(_cycle),Base.OneTo{Int64},Vector{Int64}}) - Base.precompile(Tuple{typeof(_cycle),ColorPalette,Int64}) Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}}) Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}}) - Base.precompile(Tuple{typeof(_cycle),Vector{Float64},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(_cycle),Vector{Float64},Vector{Int64}}) Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool}) Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool}) Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool}) Base.precompile(Tuple{typeof(_plot!),Plot,Any,Any}) Base.precompile(Tuple{typeof(_preprocess_barlike),DefaultsDict,Base.OneTo{Int64},Vector{Float64}}) Base.precompile(Tuple{typeof(_preprocess_binlike),DefaultsDict,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}}) + Base.precompile(Tuple{typeof(_replace_markershape),Vector{Symbol}}) Base.precompile(Tuple{typeof(_update_min_padding!),GridLayout}) Base.precompile(Tuple{typeof(_update_subplot_args),Plot{GRBackend},Subplot{GRBackend},Dict{Symbol, Any},Int64,Bool}) Base.precompile(Tuple{typeof(_update_subplot_args),Plot{PlotlyBackend},Subplot{PlotlyBackend},Dict{Symbol, Any},Int64,Bool}) @@ -276,7 +271,6 @@ function _precompile_() Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}}) Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}}) Base.precompile(Tuple{typeof(fakedata),Int64,Int64}) - Base.precompile(Tuple{typeof(fakedata),MersenneTwister,Int64,Vararg{Int64, N} where N}) Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}}) Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}}) Base.precompile(Tuple{typeof(get_series_color),SubArray{Symbol, 1, Vector{Symbol}, Tuple{UnitRange{Int64}}, true},Subplot{GRBackend},Int64,Symbol}) @@ -287,7 +281,6 @@ function _precompile_() Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any, N} where N}) Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N}) Base.precompile(Tuple{typeof(get_ticks),UnitRange{Int64},Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any, N} where N}) - Base.precompile(Tuple{typeof(get_xy),OHLC{Float64},Int64,Float64}) Base.precompile(Tuple{typeof(get_xy),Vector{OHLC}}) Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}}) Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}}) @@ -312,8 +305,8 @@ function _precompile_() Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, Vector{String}}}) Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}}) Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}}) - Base.precompile(Tuple{typeof(gr_polyline),Vector{Float64},Vector{Float64},Function}) Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient}) + Base.precompile(Tuple{typeof(gr_set_line),Int64,Symbol,PlotUtils.ContinuousColorGradient,Series}) Base.precompile(Tuple{typeof(gr_text),Float64,Float64,String}) Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}}) Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}}) @@ -343,13 +336,11 @@ function _precompile_() Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N}) Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}}) Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol}) - Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Int64}) Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Matrix{Symbol}}) Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Symbol}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}}) - Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Stroke}) Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol}) Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText}) Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}}) @@ -364,41 +355,27 @@ function _precompile_() Base.precompile(Tuple{typeof(scalefontsizes),Float64}) Base.precompile(Tuple{typeof(series_annotations),Vector{Any}}) Base.precompile(Tuple{typeof(slice_arg),Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64}) Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{PlotUtils.ContinuousColorGradient},Int64}) Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64}) Base.precompile(Tuple{typeof(slice_arg),Matrix{String},Int64}) - Base.precompile(Tuple{typeof(slice_arg),Matrix{Symbol},Int64}) Base.precompile(Tuple{typeof(spy),Any}) Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64}) Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any, N} where N}) Base.precompile(Tuple{typeof(text),String,Symbol}) Base.precompile(Tuple{typeof(title!),AbstractString}) - Base.precompile(Tuple{typeof(unzip),Vector{GeometryBasics.Point2{Float64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Float64, Float64, Float64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Float64, Float64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Int64, Int64}}}) - Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Vector{Float64}, Vector{Float64}}}}) Base.precompile(Tuple{typeof(update_clims),Float64,Float64,SubArray{Int64, 1, Vector{Int64}, Tuple{UnitRange{Int64}}, true},typeof(ignorenan_extrema)}) Base.precompile(Tuple{typeof(vline!),Any}) Base.precompile(Tuple{typeof(warn_on_attr_dim_mismatch),Series,Vector{Float64},Vector{Float64},Nothing,Base.Iterators.Flatten{Vector{Tuple{SeriesSegment}}}}) Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any, N} where N}) Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}}) isdefined(Plots, Symbol("#4#8")) && Base.precompile(Tuple{getfield(Plots, Symbol("#4#8")),UnitRange{Int64}}) - isdefined(Plots, Symbol("#add_major_or_minor_segments#122")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#122")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool}) - isdefined(Plots, Symbol("#add_major_or_minor_segments#123")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#123")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool}) + isdefined(Plots, Symbol("#add_major_or_minor_segments#102")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#102")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool}) + isdefined(Plots, Symbol("#add_major_or_minor_segments#103")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#103")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool}) let fbody = try __lookup_kwbody__(which(font, (Font,Vararg{Any, N} where N,))) catch missing end if !ismissing(fbody) precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(font),Font,Vararg{Any, N} where N,)) end end - let fbody = try __lookup_kwbody__(which(gr_polyline, (Vector{Float64},Vector{Float64},typeof(GR.fillarea),))) catch missing end - if !ismissing(fbody) - precompile(fbody, (Symbol,Symbol,typeof(gr_polyline),Vector{Float64},Vector{Float64},typeof(GR.fillarea),)) - end - end let fbody = try __lookup_kwbody__(which(plot!, (Any,))) catch missing end if !ismissing(fbody) precompile(fbody, (Any,typeof(plot!),Any,)) @@ -424,9 +401,4 @@ function _precompile_() precompile(fbody, (Any,typeof(title!),AbstractString,)) end end - let fbody = try __lookup_kwbody__(which(yaxis!, (Any,Vararg{Any, N} where N,))) catch missing end - if !ismissing(fbody) - precompile(fbody, (Any,typeof(yaxis!),Any,Vararg{Any, N} where N,)) - end - end end From e5883a34473e57a7dd1d3fe5be8e1ed52484ca23 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Wed, 29 Dec 2021 16:17:50 +0100 Subject: [PATCH 13/14] 1.25.4 [skip ci] --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index a71c4a5b..c8e6e3dc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.25.3" +version = "1.25.4" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" From b6d7bd82e6c029b8cbbafa756015670cb0ab0013 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 31 Dec 2021 16:04:02 +0100 Subject: [PATCH 14/14] UnicodePlots: enhance display / show (#4021) --- src/backends.jl | 5 +- src/backends/unicodeplots.jl | 130 ++++++++++++++++++++--------------- src/init.jl | 1 - src/output.jl | 2 + 4 files changed, 79 insertions(+), 59 deletions(-) diff --git a/src/backends.jl b/src/backends.jl index 42349caf..87f0014b 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -970,7 +970,10 @@ const _unicodeplots_marker = [ const _unicodeplots_scale = [:identity, :ln, :log2, :log10] # Additional constants -const _canvas_type = Ref(:auto) +const _unicodeplots_canvas = Ref(:auto) +const _unicodeplots_border = Ref(:auto) +const _unicodeplots_height = Ref(15) +const _unicodeplots_width = Ref(40) # ------------------------------------------------------------------------------ # hdf5 diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index 0c4d6dc1..eb75484b 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -1,17 +1,17 @@ # https://github.com/JuliaPlots/UnicodePlots.jl -# don't warn on unsupported... there's just too many warnings!! +# don't warn on unsupported... there's just too many warnings ! warn_on_unsupported_args(::UnicodePlotsBackend, plotattributes) = nothing # ------------------------------------------------------------------------------------------ const _canvas_map = ( - ascii = UnicodePlots.AsciiCanvas, - block = UnicodePlots.BlockCanvas, braille = UnicodePlots.BrailleCanvas, density = UnicodePlots.DensityCanvas, - dot = UnicodePlots.DotCanvas, heatmap = UnicodePlots.HeatmapCanvas, lookup = UnicodePlots.LookupCanvas, + ascii = UnicodePlots.AsciiCanvas, + block = UnicodePlots.BlockCanvas, + dot = UnicodePlots.DotCanvas, ) # do all the magic here... build it all at once, @@ -25,19 +25,25 @@ function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend}) xlim = collect(axis_limits(sp, :x)) ylim = collect(axis_limits(sp, :y)) - # we set x/y to have a single point, + # We set x/y to have a single point, # since we need to create the plot with some data. - # since this point is at the bottom left corner of the plot, - # it shouldn't actually be shown + # Since this point is at the bottom left corner of the plot, + # it should be hidden by consecutive plotting commands. x = Float64[xlim[1]] y = Float64[ylim[1]] # create a plot window with xlim/ylim set, # but the X/Y vectors are outside the bounds - canvas_type = if (ct = _canvas_type[]) == :auto + canvas = if (up_c = _unicodeplots_canvas[]) == :auto isijulia() ? :ascii : :braille else - ct + up_c + end + + border = if (up_b = _unicodeplots_border[]) == :auto + isijulia() ? :ascii : :solid + else + up_b end kw = ( @@ -45,14 +51,16 @@ function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend}) title = texmath2unicode(sp[:title]), xlabel = texmath2unicode(xaxis[:guide]), ylabel = texmath2unicode(yaxis[:guide]), + height = _unicodeplots_height[], + width = _unicodeplots_width[], xscale = xaxis[:scale], yscale = yaxis[:scale], - border = isijulia() ? :ascii : :solid, + border = border, xlim = xlim, ylim = ylim, ) - o = UnicodePlots.Plot(x, y, _canvas_map[canvas_type]; kw...) + o = UnicodePlots.Plot(x, y, _canvas_map[canvas]; kw...) for series in series_list(sp) o = addUnicodeSeries!(sp, o, kw, series, sp[:legend_position] != :none) end @@ -190,62 +198,70 @@ end Base.show(plt::Plot{UnicodePlotsBackend}) = show(stdout, plt) Base.show(io::IO, plt::Plot{UnicodePlotsBackend}) = _show(io, MIME("text/plain"), plt) +# NOTE: _show(..) must be kept for Base.showable (src/output.jl) function _show(io::IO, ::MIME"text/plain", plt::Plot{UnicodePlotsBackend}) unicodeplots_rebuild(plt) nr, nc = size(plt.layout) - lines_colored = Array{Union{Nothing,Vector{String}}}(undef, nr, nc) - lines_uncolored = copy(lines_colored) - l_max = zeros(Int, nr) - w_max = zeros(Int, nc) - buf = IOBuffer() - cbuf = IOContext(buf, :color => true) - re_col = r"\x1B\[[0-9;]*[a-zA-Z]" - sps = 0 - for r in 1:nr - lmax = 0 - for c in 1:nc - l = plt.layout[r, c] - if l isa GridLayout && size(l) != (1, 1) - @error "UnicodePlots: complex nested layout is currently unsupported !" - else - if get(l.attr, :blank, false) - lines_colored[r, c] = lines_uncolored[r, c] = nothing - else - sp = plt.o[sps += 1] - show(cbuf, sp) - colored = String(take!(buf)) - uncolored = replace(colored, re_col => "") - lines_colored[r, c] = lc = split(colored, "\n") - lines_uncolored[r, c] = lu = split(uncolored, "\n") - lmax = max(length(lc), lmax) - w_max[c] = max(maximum(length.(lu)), w_max[c]) - end - end + if nr == 1 && nc == 1 # fast path + n = length(plt.o) + for (i, p) in enumerate(plt.o) + show(io, p) + i < n && println(io) end - l_max[r] = lmax - end - empty = String[' '^w for w in w_max] - for r in 1:nr - for n in 1:l_max[r] + else + re_col = r"\e\[[0-9;]*m" # m: color, [a-zA-Z]: all escape sequences + have_color = Base.get_have_color() + buf = IOContext(PipeBuffer(), :color => have_color) + lines_colored = Array{Union{Nothing,Vector{String}}}(undef, nr, nc) + lines_uncolored = have_color ? similar(lines_colored) : lines_colored + l_max = zeros(Int, nr) + w_max = zeros(Int, nc) + sps = 0 + for r in 1:nr + lmax = 0 for c in 1:nc - pre = c == 1 ? '\0' : ' ' - lc = lines_colored[r, c] - if lc === nothing || length(lc) < n - print(io, pre, empty[c]) + l = plt.layout[r, c] + if l isa GridLayout && size(l) != (1, 1) + @error "UnicodePlots: complex nested layout is currently unsupported !" else - lu = lines_uncolored[r, c] - print(io, pre, lc[n], ' '^(w_max[c] - length(lu[n]))) + if get(l.attr, :blank, false) + lines_colored[r, c] = lines_uncolored[r, c] = nothing + else + sp = plt.o[sps += 1] + show(buf, sp) + colored = read(buf, String) + lines_colored[r, c] = lu = lc = split(colored, '\n') + if have_color + uncolored = replace(colored, re_col => '\0') + lines_uncolored[r, c] = lu = split(uncolored, '\n') + end + lmax = max(length(lc), lmax) + w_max[c] = max(maximum(length.(lu)), w_max[c]) + end end end - println(io) + l_max[r] = lmax + end + empty = String[' '^w for w in w_max] + for r in 1:nr + for n in 1:l_max[r] + for c in 1:nc + pre = c == 1 ? '\0' : ' ' + lc = lines_colored[r, c] + if lc === nothing || length(lc) < n + print(io, pre, empty[c]) + else + lu = lines_uncolored[r, c] + print(io, pre, lc[n], ' '^(w_max[c] - length(lu[n]))) + end + end + n < l_max[r] && println(io) + end + r < nr && println(io) end - r < nr && println(io) end nothing end -function _display(plt::Plot{UnicodePlotsBackend}) - unicodeplots_rebuild(plt) - map(display, plt.o) - nothing -end +# we only support MIME"text/plain", hence display(...) falls back to plain-text on stdout +_display(plt::Plot{UnicodePlotsBackend}) = (show(stdout, plt); println(stdout)) diff --git a/src/init.jl b/src/init.jl index b1da67f2..4e7189ee 100644 --- a/src/init.jl +++ b/src/init.jl @@ -89,7 +89,6 @@ function __init__() @require IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" begin if IJulia.inited _init_ijulia_plotting() - IJulia.display_dict(plt::Plot) = _ijulia_display_dict(plt) end end diff --git a/src/output.jl b/src/output.jl index dd028837..89cc29ae 100644 --- a/src/output.jl +++ b/src/output.jl @@ -217,6 +217,8 @@ for mime in ( end end +Base.showable(::MIME"text/html", plt::Plot{UnicodePlotsBackend}) = false # Pluto + Base.show(io::IO, m::MIME"application/prs.juno.plotpane+html", plt::Plot) = showjuno(io, MIME("text/html"), plt)