From d3f2a55b595a8005b49c138ebc73ed397ee63178 Mon Sep 17 00:00:00 2001 From: Ronny Bergmann Date: Tue, 10 Nov 2020 11:24:24 +0100 Subject: [PATCH 01/10] adds 3d quiver if z component is present. --- src/recipes.jl | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 80ccc86f9..15d413366 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1197,35 +1197,51 @@ function quiver_using_arrows(plotattributes::AKW) if !isa(plotattributes[:arrow], Arrow) plotattributes[:arrow] = arrow() end - + is_3d = haskey(plotattributes,:z) velocity = error_zipit(plotattributes[:quiver]) xorig, yorig = plotattributes[:x], plotattributes[:y] + zorig = is_3d ? plotattributes[:z] : [] # for each point, we create an arrow of velocity vi, translated to the x/y coordinates x, y = zeros(0), zeros(0) - for i = 1:max(length(xorig), length(yorig)) + is_3d && ( z = zeros(0)) + for i = 1:max(length(xorig), length(yorig), length(zorig)) # get the starting position xi = _cycle(xorig, i) yi = _cycle(yorig, i) - + zi = is_3d ? _cycle(zorig, i) : 0 # get the velocity vi = _cycle(velocity, i) - vx, vy = if istuple(vi) - first(vi), last(vi) - elseif isscalar(vi) - vi, vi - elseif isa(vi, Function) - vi(xi, yi) - else - error("unexpected vi type $(typeof(vi)) for quiver: $vi") + if is_3d + vx, vy, vz = if istuple(vi) + vi[1], vi[2], vi[3] + elseif isscalar(vi) + vi, vi, vi + elseif isa(vi, Function) + vi(xi, yi, zi) + else + error("unexpected vi type $(typeof(vi)) for quiver: $vi") + end + else # 2D quiver + vx, vy = if istuple(vi) + first(vi), last(vi) + elseif isscalar(vi) + vi, vi + elseif isa(vi, Function) + vi(xi, yi) + else + error("unexpected vi type $(typeof(vi)) for quiver: $vi") + end end - # add the points nanappend!(x, [xi, xi + vx, NaN]) nanappend!(y, [yi, yi + vy, NaN]) + is_3d && nanappend!(z, [zi, zi + vz, NaN]) end - plotattributes[:x], plotattributes[:y] = x, y + if is_3d + plotattributes[:z] = z + end # KW[plotattributes] end From 501f33f5c1e92b306a5935367412f767c3db6240 Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Tue, 10 Nov 2020 18:34:14 +0100 Subject: [PATCH 02/10] Fix SVG scaling problem --- src/backends/gr.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 372c2baa7..2e95d4c43 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -593,9 +593,6 @@ function gr_display(plt::Plot, fmt="") GR.clearws() dpi_factor = plt[:dpi] / Plots.DPI - if fmt == "svg" - dpi_factor *= 4 - end # collect some monitor/display sizes in meters and pixels display_width_meters, display_height_meters, display_width_px, display_height_px = GR.inqdspsize() From f3b6221daa3c05383b19742fa652a8375a44e020 Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Tue, 10 Nov 2020 18:37:41 +0100 Subject: [PATCH 03/10] Update Project.toml Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index c28563c6e..e4fa84337 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.8.0" +version = "1.8.1" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" From ac8e1d7f213d6359b0458f7ad9344cec00202a68 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 12 Nov 2020 13:53:42 +0100 Subject: [PATCH 04/10] add linestyle to contour plots (#3139) * add linestyle to contour plots * Update precompile_*.jl file (#3140) Co-authored-by: BeastyBlacksmith Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: BeastyBlacksmith --- .../precompile/linux/1.5/precompile_Plots.jl | 39 ++++++++++++++++--- src/backends/pgfplotsx.jl | 1 + 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl index ffd35ca0f..4a9134de4 100644 --- a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl +++ b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl @@ -61,9 +61,11 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1},Array{Float64,1}},Int64}) Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1}},Symbol}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:flip,),Tuple{Bool}},typeof(attr!),Plots.Axis}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{Symbol}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{typeof(RecipesPipeline.datetimeformatter)}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims),Tuple{Bool,Tuple{Int64,Int64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims, :flip),Tuple{Bool,Tuple{Int64,Int64},Bool}},typeof(attr!),Plots.Axis}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid,),Tuple{Bool}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:gridlinewidth, :grid, :gridalpha, :gridstyle, :foreground_color_grid),Tuple{Int64,Bool,Float64,Symbol,RGBA{Float64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:guide,),Tuple{String}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims, :flip, :ticks, :guide),Tuple{Tuple{Int64,Int64},Bool,StepRange{Int64,Int64},String}},typeof(attr!),Plots.Axis}) @@ -72,6 +74,7 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims,),Tuple{Tuple{Int64,Int64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:rotation,),Tuple{Int64}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:scale, :guide),Tuple{Symbol,String}},typeof(attr!),Plots.Axis}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:ticks,),Tuple{Nothing}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:ticks,),Tuple{UnitRange{Int64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.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)}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.gr_polyline)),NamedTuple{(:arrowside, :arrowstyle),Tuple{Symbol,Symbol}},typeof(Plots.gr_polyline),Array{Int64,1},Array{Float64,1}}) @@ -140,6 +143,8 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:proj, :m),Tuple{Symbol,Int64}},typeof(plot),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:projection, :seriestype),Tuple{Symbol,Symbol}},typeof(plot),Array{Int64,2}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:reg, :fill),Tuple{Bool,Tuple{Int64,Symbol}}},typeof(plot),Array{Float64,1}}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{Int64}},typeof(plot),UnitRange{Int64}}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{Tuple{LinRange{Float64},LinRange{Float64}}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color),Tuple{Array{Symbol,2},Array{Symbol,1},Int64,Array{Symbol,1}}},typeof(plot),Array{Float64,2}}) @@ -160,10 +165,16 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.test_examples)),NamedTuple{(:skip,),Tuple{Array{Int64,1}}},typeof(test_examples),Symbol}) Base.precompile(Tuple{Type{Plots.GridLayout},Int64,Vararg{Int64,N} where N}) Base.precompile(Tuple{Type{Shape},Array{Tuple{Float64,Float64},1}}) + Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{PlotUtils.ContinuousColorGradient,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}}}},Base.OneTo{Int64},Int64,Int64}) Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.contour_levels),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}},Base.RefValue{Tuple{Float64,Float64}}}},Base.OneTo{Int64},Int64,Int64}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.contour_levels),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_linecolor),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) + Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.bottompad)}}) + Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.leftpad)}}) + Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.rightpad)}}) + Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.toppad)}}) Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,2},Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}}) + Base.precompile(Tuple{typeof(Base.deepcopy_internal),Array{Plots.Series,1},IdDict{Any,Any}}) Base.precompile(Tuple{typeof(Base.vect),Tuple{Int64,Float64,Plots.PlotText},Vararg{Tuple{Int64,Float64,Plots.PlotText},N} where N}) Base.precompile(Tuple{typeof(Plots._bin_centers),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{Int64,1},String}) @@ -174,6 +185,7 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},StepRange{Int64,Int64}}) Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},UnitRange{Int64}}) + Base.precompile(Tuple{typeof(Plots._cycle),Array{RGBA{Float64},1},Int64}) Base.precompile(Tuple{typeof(Plots._cycle),Base.OneTo{Int64},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._cycle),StepRange{Int64,Int64},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._do_plot_show),Plots.Plot{Plots.GRBackend},Bool}) @@ -186,11 +198,12 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots._update_min_padding!),Plots.GridLayout}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.GRBackend},Plots.Subplot{Plots.GRBackend},Dict{Symbol,Any},Int64,Bool}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.PlotlyBackend},Plots.Subplot{Plots.PlotlyBackend},Dict{Symbol,Any},Int64,Bool}) + Base.precompile(Tuple{typeof(Plots._update_subplot_periphery),Plots.Subplot{Plots.PlotlyBackend},Array{Any,1}}) Base.precompile(Tuple{typeof(Plots.build_layout),Plots.GridLayout,Int64}) Base.precompile(Tuple{typeof(Plots.convert_to_polar),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Int64,Float64}}) Base.precompile(Tuple{typeof(Plots.create_grid),Expr}) - Base.precompile(Tuple{typeof(Plots.discrete_value!),Plots.Axis,Array{String,1}}) Base.precompile(Tuple{typeof(Plots.error_coords),Array{Float64,1},Array{Float64,1},Array{Float64,1}}) + Base.precompile(Tuple{typeof(Plots.error_style!),RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(Plots.fakedata),Int64,Vararg{Int64,N} where N}) Base.precompile(Tuple{typeof(Plots.get_clims),Plots.Subplot{Plots.GRBackend},Plots.Series,Function}) Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Float64,1},Array{String,1}}}) @@ -198,6 +211,7 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.get_series_color),Array{Symbol,1},Plots.Subplot{Plots.GRBackend},Int64,Symbol}) Base.precompile(Tuple{typeof(Plots.get_series_color),Array{Symbol,1},Plots.Subplot{Plots.PlotlyBackend},Int64,Symbol}) Base.precompile(Tuple{typeof(Plots.get_xy),Array{OHLC,1}}) + Base.precompile(Tuple{typeof(Plots.get_xy),OHLC{Float64},Int64,Float64}) Base.precompile(Tuple{typeof(Plots.gr_add_legend),Plots.Subplot{Plots.GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor),NTuple{9,Float64}},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.gr_add_legend),Plots.Subplot{Plots.GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor),Tuple{Int64,Float64,Float64,Float64,Int64,Float64,Float64,Float64,Float64}},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.gr_display),Plots.Subplot{Plots.GRBackend},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}}) @@ -207,18 +221,21 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Array{Float64,1},Array{Float64,1},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Base.OneTo{Int64},Base.OneTo{Int64},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Float64,1},Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64},Int64,Int64}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Float64,1},Array{Float64,1},Int64,Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Array{Float64,1},Array{Float64,1}},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,StepRange{Int64,Int64},Array{Float64,1},Int64,Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_segments_3d),Plots.Series,Array{Float64,1},Array{Float64,1},UnitRange{Int64},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{Any,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{String,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Int64,1},Array{String,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_label_ticks),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Float64,1},Array{String,1}}}) Base.precompile(Tuple{typeof(Plots.gr_label_ticks_3d),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Float64,1},Array{String,1}}}) Base.precompile(Tuple{typeof(Plots.gr_polaraxes),Int64,Float64,Plots.Subplot{Plots.GRBackend}}) + Base.precompile(Tuple{typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},Function}) Base.precompile(Tuple{typeof(Plots.gr_set_gradient),PlotUtils.ContinuousColorGradient}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),Array{Float64,1},Symbol}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),Base.OneTo{Int64},Symbol,Base.OneTo{Int64},Symbol,Tuple{Int64,Int64}}) @@ -227,14 +244,16 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.ignorenan_minimum),Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots.layout_args),Int64}) Base.precompile(Tuple{typeof(Plots.make_fillrange_side),UnitRange{Int64},LinRange{Float64}}) - Base.precompile(Tuple{typeof(Plots.make_steps),Base.OneTo{Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,StepRange{Int64,Int64}}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,UnitRange{Int64}}) + Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),RecipesPipeline.DefaultsDict,Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Array{Symbol,2}}) + Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Int64}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Symbol}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Array{Symbol,2}}) + Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Float64}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Plots.Stroke}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},RGBA{Float64}}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Shape}) @@ -242,6 +261,7 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.GRBackend},Int64,Float64,Plots.PlotText}) Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.PlotlyBackend},Int64,Float64,Plots.PlotText}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},StepRange{Int64,Int64},Symbol}) + Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},String,Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Tuple{Int64,Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.reset_axis_defaults_byletter!)}) @@ -269,7 +289,6 @@ function _precompile_() Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plots.Plot{Plots.PlotlyBackend},RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Array{Dict{Symbol,Any},1}}) Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Array{Dict{Symbol,Any},1}}) - Base.precompile(Tuple{typeof(RecipesPipeline.postprocess_axis_args!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Symbol}) Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plots.Plot{Plots.GRBackend},RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.GRBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.PlotlyBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) @@ -286,32 +305,40 @@ function _precompile_() Base.precompile(Tuple{typeof(contour),Any,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_fillalpha),Tuple{Array{Any,1}}}}) + Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linealpha),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linestyle),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linewidth),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2},Tuple{Base.OneTo{Int64},Base.OneTo{Int64}},typeof(Plots.gr_color),Tuple{Array{RGBA{Float64},2}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(string),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(typeof),Tuple{Tuple{Plots.PortfolioComposition}}}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(string),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(typeof),Tuple{Tuple{Plots.Spy}}}}}}) + Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.GRBackend}}) + Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.PlotlyBackend}}) + Base.precompile(Tuple{typeof(default),Symbol,Int64}) Base.precompile(Tuple{typeof(font),String,Vararg{Any,N} where N}) - Base.precompile(Tuple{typeof(frame),Animation,Plots.Plot{Plots.GRBackend}}) Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1},UnitRange{Int64}}) + Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1}}) + Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1}}) Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}}) Base.precompile(Tuple{typeof(merge),NamedTuple{(:annotation,),Tuple{Array{Tuple{Int64,Float64,Plots.PlotText},1}}},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}) Base.precompile(Tuple{typeof(merge),NamedTuple{(:zcolor, :m, :ms, :lab),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String}},NamedTuple{(:seriestype,),Tuple{Symbol}}}) + Base.precompile(Tuple{typeof(pairs),NamedTuple{(:zcolor, :m, :ms, :lab),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String}}}) Base.precompile(Tuple{typeof(plot!),Any}) Base.precompile(Tuple{typeof(plot),Any,Any}) Base.precompile(Tuple{typeof(plot),Any}) Base.precompile(Tuple{typeof(push!),Plots.Plot{Plots.GRBackend},Float64,Array{Float64,1}}) - Base.precompile(Tuple{typeof(setindex!),Dict{Any,Any},Plots.Plot{Plots.PlotlyBackend},Int64}) Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.GRBackend}}) + Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.PlotlyBackend}}) Base.precompile(Tuple{typeof(spy),Any}) Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(text),String,Int64,Symbol,Vararg{Symbol,N} where N}) Base.precompile(Tuple{typeof(text),String,Symbol,Int64,Vararg{Any,N} where N}) + Base.precompile(Tuple{typeof(text),String,Symbol}) Base.precompile(Tuple{typeof(title!),AbstractString}) Base.precompile(Tuple{typeof(vcat),Array{Any,1},Array{Tuple{Int64,Float64,Plots.PlotText},1}}) Base.precompile(Tuple{typeof(vcat),Array{Any,1},Tuple{Int64,Float64,Plots.PlotText}}) Base.precompile(Tuple{typeof(vline!),Any}) Base.precompile(Tuple{typeof(xgrid!),Plots.Plot{Plots.GRBackend},Symbol,Vararg{Any,N} where N}) + Base.precompile(Tuple{typeof(xlims),Plots.Subplot{Plots.PlotlyBackend}}) Base.precompile(Tuple{typeof(yaxis!),Any,Any}) let fbody = try __lookup_kwbody__(which(Plots.gr_polyline, (Array{Float64,1},Array{Float64,1},typeof(GR.fillarea),))) catch missing end if !ismissing(fbody) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index bd2bbf3c7..6ea2de726 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -568,6 +568,7 @@ function pgfx_add_series!(::Val{:contour3d}, axis, series_opt, series, series_fu series_opt, "contour prepared" => PGFPlotsX.Options("labels" => opt[:contour_labels]), ) + series_opt = merge( series_opt, pgfx_linestyle(opt) ) args = pgfx_series_arguments(series, opt) series_plot = series_func(series_opt, PGFPlotsX.Table(Contour.contours(args..., opt[:levels]))) push!(axis, series_plot) From 5d26068eaec64b71795122775a75dfb226649039 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 12 Nov 2020 12:48:49 +0100 Subject: [PATCH 05/10] fix limits in GR image --- src/backends/gr.jl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 2e95d4c43..eff65950d 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1578,16 +1578,14 @@ function gr_add_series(sp, series) sp[:legend] = :none GR.gr3.clear() dmin, dmax = GR.gr3.volume(y.v, 0) - elseif st in (:heatmap, :image) + elseif st === :heatmap if !ispolar(series) # `z` is already transposed, so we need to reverse before passing its size. x, y = heatmap_edges(x, xscale, y, yscale, reverse(size(z))) end - if st === :heatmap - gr_draw_heatmap(series, x, y, z, clims) - else - gr_draw_image(series, x, y, z, clims) - end + gr_draw_heatmap(series, x, y, z, clims) + elseif st === :image + gr_draw_image(series, x, y, z, clims) end # this is all we need to add the series_annotations text From 40e13793e812a9037b0cc5e7b3a66291b1326dce Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 12 Nov 2020 14:34:18 +0100 Subject: [PATCH 06/10] add new test example --- Project.toml | 3 ++- src/examples.jl | 19 +++++++++++++++++-- test/runtests.jl | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index e4fa84337..623d7c43e 100644 --- a/Project.toml +++ b/Project.toml @@ -68,8 +68,9 @@ StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990" UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92" [targets] -test = ["Distributions", "FileIO", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "UnicodePlots", "VisualRegressionTests"] +test = ["Distributions", "FileIO", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "RDatasets", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "VisualRegressionTests"] diff --git a/src/examples.jl b/src/examples.jl index c5efc2fc0..d5bf01f35 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1067,6 +1067,20 @@ const _examples = PlotExample[ ) end] ), + PlotExample( # 51 + "Images with custom axes", + "", + [quote + using Plots + using TestImages + img = testimage("lighthouse") + + # plot the image reversing the first dimension and setting yflip = false + plot([-π, π], [-1, 1], reverse(img, dims=1), yflip=false, aspect_ratio=:none) + # plot other data + plot!(sin, -π, π, lw=3, color=:red) + end] + ), ] # Some constants for PlotDocs and PlotReferenceImages @@ -1074,8 +1088,8 @@ _animation_examples = [2, 31] _backend_skips = Dict( :gr => [25, 30, 47], :pyplot => [2, 25, 30, 31, 47, 49], - :plotlyjs => [2, 21, 24, 25, 30, 31, 49], - :plotly => [2, 21, 24, 25, 30, 31, 49], + :plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51], + :plotly => [2, 21, 24, 25, 30, 31, 49, 51], :pgfplotsx => [ 2, # animation 6, # images @@ -1084,6 +1098,7 @@ _backend_skips = Dict( 31, # animation 32, # spy 49, # polar heatmap + 51, # image with custom axes ], ) diff --git a/test/runtests.jl b/test/runtests.jl index 5cd843ecc..18ac4366f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,6 +4,7 @@ using Plots using Random using StableRNGs using Test +using TestImages using FileIO using Gtk using LibGit2 From a38e4734accab4ec1ef0fe5a7861ac624a0e5762 Mon Sep 17 00:00:00 2001 From: daschw Date: Thu, 12 Nov 2020 14:24:11 +0000 Subject: [PATCH 07/10] Update precompile_*.jl file --- .../precompile/linux/1.5/precompile_Plots.jl | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl index 4a9134de4..15db53b66 100644 --- a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl +++ b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl @@ -88,6 +88,8 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Array{GeometryBasics.Point{2,Float64},1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:annotation,),Tuple{Array{Tuple{Int64,Float64,Plots.PlotText},1}}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:line, :seriestype),Tuple{Tuple{Int64,Symbol,Float64,Array{Symbol,2}},Symbol}},typeof(plot!),Array{Float64,2}}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:lw, :color),Tuple{Int64,Symbol}},typeof(plot!),Function,Float64,Vararg{Any,N} where N}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:lw, :color),Tuple{Int64,Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Function,Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}) @@ -97,7 +99,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype, :inset),Tuple{Symbol,Tuple{Int64,Measures.BoundingBox{Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}},Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}}}}}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Int64,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot!),Array{Int64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!)}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot!),Array{Float64,1},Array{Float64,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Float64,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:xgrid,),Tuple{Tuple{Symbol,Symbol,Int64,Symbol,Float64}}},typeof(plot!),Plots.Plot{Plots.GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:yaxis,),Tuple{Tuple{String,Symbol}}},typeof(plot!)}) @@ -158,6 +159,7 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:title,),Tuple{String}},typeof(plot),Plots.Plot{Plots.PlotlyBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot),Array{Float64,2}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:xaxis, :background_color, :leg),Tuple{Tuple{String,Tuple{Int64,Int64},StepRange{Int64,Int64},Symbol},RGB{Float64},Bool}},typeof(plot),Array{Float64,2}}) + Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:yflip, :aspect_ratio),Tuple{Bool,Symbol}},typeof(plot),Array{Float64,1},Array{Int64,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:zcolor, :m, :leg, :cbar, :w),Tuple{StepRange{Int64,Int64},Tuple{Int64,Float64,Symbol,Plots.Stroke},Bool,Bool,Int64}},typeof(plot),Array{Float64,1},Array{Float64,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.portfoliocomposition)),Any,typeof(portfoliocomposition),Any,Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.scatter!)),Any,typeof(scatter!),Any,Vararg{Any,N} where N}) @@ -169,9 +171,6 @@ function _precompile_() Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.contour_levels),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}},Base.RefValue{Tuple{Float64,Float64}}}},Base.OneTo{Int64},Int64,Int64}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.contour_levels),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_linecolor),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) - Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.bottompad)}}) - Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.leftpad)}}) - Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.rightpad)}}) Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.toppad)}}) Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,2},Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}}) Base.precompile(Tuple{typeof(Base.deepcopy_internal),Array{Plots.Series,1},IdDict{Any,Any}}) @@ -185,8 +184,8 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},StepRange{Int64,Int64}}) Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(Plots._cycle),Array{RGBA{Float64},1},Int64}) Base.precompile(Tuple{typeof(Plots._cycle),Base.OneTo{Int64},Array{Int64,1}}) + Base.precompile(Tuple{typeof(Plots._cycle),ColorPalette,Int64}) Base.precompile(Tuple{typeof(Plots._cycle),StepRange{Int64,Int64},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._do_plot_show),Plots.Plot{Plots.GRBackend},Bool}) Base.precompile(Tuple{typeof(Plots._do_plot_show),Plots.Plot{Plots.PlotlyBackend},Bool}) @@ -198,12 +197,10 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots._update_min_padding!),Plots.GridLayout}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.GRBackend},Plots.Subplot{Plots.GRBackend},Dict{Symbol,Any},Int64,Bool}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.PlotlyBackend},Plots.Subplot{Plots.PlotlyBackend},Dict{Symbol,Any},Int64,Bool}) - Base.precompile(Tuple{typeof(Plots._update_subplot_periphery),Plots.Subplot{Plots.PlotlyBackend},Array{Any,1}}) Base.precompile(Tuple{typeof(Plots.build_layout),Plots.GridLayout,Int64}) Base.precompile(Tuple{typeof(Plots.convert_to_polar),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Int64,Float64}}) Base.precompile(Tuple{typeof(Plots.create_grid),Expr}) Base.precompile(Tuple{typeof(Plots.error_coords),Array{Float64,1},Array{Float64,1},Array{Float64,1}}) - Base.precompile(Tuple{typeof(Plots.error_style!),RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(Plots.fakedata),Int64,Vararg{Int64,N} where N}) Base.precompile(Tuple{typeof(Plots.get_clims),Plots.Subplot{Plots.GRBackend},Plots.Series,Function}) Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Float64,1},Array{String,1}}}) @@ -221,14 +218,14 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Array{Float64,1},Array{Float64,1},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Base.OneTo{Int64},Base.OneTo{Int64},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Float64,1},Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64},Int64,Int64}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Float64,1},Array{Float64,1},Int64,Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Int64,Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Array{Float64,1},Array{Float64,1}},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,StepRange{Int64,Int64},Array{Float64,1},Int64,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments_3d),Plots.Series,Array{Float64,1},Array{Float64,1},UnitRange{Int64},Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,UnitRange{Int64},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{Any,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{String,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Int64,1},Array{String,1}},Int64}) @@ -237,23 +234,23 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.gr_polaraxes),Int64,Float64,Plots.Subplot{Plots.GRBackend}}) Base.precompile(Tuple{typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},Function}) Base.precompile(Tuple{typeof(Plots.gr_set_gradient),PlotUtils.ContinuousColorGradient}) + Base.precompile(Tuple{typeof(Plots.gr_viewport_from_bbox),Plots.Subplot{Plots.GRBackend},Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),Array{Float64,1},Symbol}) - Base.precompile(Tuple{typeof(Plots.heatmap_edges),Base.OneTo{Int64},Symbol,Base.OneTo{Int64},Symbol,Tuple{Int64,Int64}}) + Base.precompile(Tuple{typeof(Plots.heatmap_edges),Base.OneTo{Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Symbol}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),UnitRange{Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.ignorenan_minimum),Array{Int64,1}}) + Base.precompile(Tuple{typeof(Plots.is_2tuple),Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.layout_args),Int64}) Base.precompile(Tuple{typeof(Plots.make_fillrange_side),UnitRange{Int64},LinRange{Float64}}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,StepRange{Int64,Int64}}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,UnitRange{Int64}}) - Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),RecipesPipeline.DefaultsDict,Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Array{Symbol,2}}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Int64}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Symbol}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Array{Symbol,2}}) - Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Float64}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Plots.Stroke}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},RGBA{Float64}}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Shape}) @@ -261,7 +258,6 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.GRBackend},Int64,Float64,Plots.PlotText}) Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.PlotlyBackend},Int64,Float64,Plots.PlotText}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},StepRange{Int64,Int64},Symbol}) - Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},String,Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Tuple{Int64,Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.reset_axis_defaults_byletter!)}) @@ -292,6 +288,7 @@ function _precompile_() Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plots.Plot{Plots.GRBackend},RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.GRBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.PlotlyBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) + Base.precompile(Tuple{typeof(RecipesPipeline.slice_series_attributes!),Plots.Plot{Plots.GRBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Array{GeometryBasics.Point{2,Float64},1}}) Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,String}) Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,String}) @@ -313,21 +310,19 @@ function _precompile_() Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(string),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(typeof),Tuple{Tuple{Plots.Spy}}}}}}) Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.GRBackend}}) Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.PlotlyBackend}}) - Base.precompile(Tuple{typeof(default),Symbol,Int64}) Base.precompile(Tuple{typeof(font),String,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1}}) Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1}}) Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}}) Base.precompile(Tuple{typeof(merge),NamedTuple{(:annotation,),Tuple{Array{Tuple{Int64,Float64,Plots.PlotText},1}}},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}) Base.precompile(Tuple{typeof(merge),NamedTuple{(:zcolor, :m, :ms, :lab),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String}},NamedTuple{(:seriestype,),Tuple{Symbol}}}) - Base.precompile(Tuple{typeof(pairs),NamedTuple{(:zcolor, :m, :ms, :lab),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String}}}) Base.precompile(Tuple{typeof(plot!),Any}) Base.precompile(Tuple{typeof(plot),Any,Any}) Base.precompile(Tuple{typeof(plot),Any}) Base.precompile(Tuple{typeof(push!),Plots.Plot{Plots.GRBackend},Float64,Array{Float64,1}}) Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.GRBackend}}) Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.PlotlyBackend}}) + Base.precompile(Tuple{typeof(setindex!),Dict{Symbol,Any},Tuple{Array{Symbol,2},Int64,Float64,Plots.Stroke},Symbol}) Base.precompile(Tuple{typeof(spy),Any}) Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(text),String,Int64,Symbol,Vararg{Symbol,N} where N}) From 60a7e414424351f0e5d6fbd0d30b8cf039ff9a86 Mon Sep 17 00:00:00 2001 From: daschw Date: Thu, 12 Nov 2020 14:40:16 +0000 Subject: [PATCH 08/10] Update precompile_*.jl file --- .../precompile/linux/1.5/precompile_Plots.jl | 59 ++----------------- 1 file changed, 5 insertions(+), 54 deletions(-) diff --git a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl index 15db53b66..12e0edc0e 100644 --- a/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl +++ b/deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl @@ -60,21 +60,14 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Array{Int64,1}}},typeof(Plots._make_hist),Tuple{Array{Float64,1}},Symbol}) Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1},Array{Float64,1}},Int64}) Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1}},Symbol}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:flip,),Tuple{Bool}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{Symbol}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{typeof(RecipesPipeline.datetimeformatter)}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims),Tuple{Bool,Tuple{Int64,Int64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims, :flip),Tuple{Bool,Tuple{Int64,Int64},Bool}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid,),Tuple{Bool}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:gridlinewidth, :grid, :gridalpha, :gridstyle, :foreground_color_grid),Tuple{Int64,Bool,Float64,Symbol,RGBA{Float64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:guide,),Tuple{String}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims, :flip, :ticks, :guide),Tuple{Tuple{Int64,Int64},Bool,StepRange{Int64,Int64},String}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims,),Tuple{Tuple{Float64,Float64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims,),Tuple{Tuple{Int64,Float64}}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:lims,),Tuple{Tuple{Int64,Int64}}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:rotation,),Tuple{Int64}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:scale, :guide),Tuple{Symbol,String}},typeof(attr!),Plots.Axis}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:ticks,),Tuple{Nothing}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:ticks,),Tuple{UnitRange{Int64}}},typeof(attr!),Plots.Axis}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.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)}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.gr_polyline)),NamedTuple{(:arrowside, :arrowstyle),Tuple{Symbol,Symbol}},typeof(Plots.gr_polyline),Array{Int64,1},Array{Float64,1}}) @@ -100,13 +93,11 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot!),Array{Int64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Float64,1},Vararg{Any,N} where N}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:xgrid,),Tuple{Tuple{Symbol,Symbol,Int64,Symbol,Float64}}},typeof(plot!),Plots.Plot{Plots.GRBackend}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:yaxis,),Tuple{Tuple{String,Symbol}}},typeof(plot!)}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:annotations, :leg),Tuple{Tuple{Int64,Float64,Plots.PlotText},Bool}},typeof(plot),Array{Float64,1}}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:arrow,),Tuple{Int64}},typeof(plot),Array{Float64,1},Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:aspect_ratio, :seriestype),Tuple{Int64,Symbol}},typeof(plot),Array{String,1},Array{String,1},Vararg{Any,N} where N}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:bins, :weights, :seriestype),Tuple{Symbol,Array{Int64,1},Symbol}},typeof(plot),Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:color, :line, :marker),Tuple{Array{Symbol,2},Tuple{Symbol,Int64},Tuple{Array{Symbol,2},Int64,Float64,Plots.Stroke}}},typeof(plot),Array{Array{T,1} where T,1}}) @@ -144,8 +135,6 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:proj, :m),Tuple{Symbol,Int64}},typeof(plot),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:projection, :seriestype),Tuple{Symbol,Symbol}},typeof(plot),Array{Int64,2}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:reg, :fill),Tuple{Bool,Tuple{Int64,Symbol}}},typeof(plot),Array{Float64,1}}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{Int64}},typeof(plot),UnitRange{Int64}}) - Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{Tuple{LinRange{Float64},LinRange{Float64}}}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:ribbon,),Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color),Tuple{Array{Symbol,2},Array{Symbol,1},Int64,Array{Symbol,1}}},typeof(plot),Array{Float64,2}}) @@ -167,25 +156,15 @@ function _precompile_() Base.precompile(Tuple{Core.kwftype(typeof(Plots.test_examples)),NamedTuple{(:skip,),Tuple{Array{Int64,1}}},typeof(test_examples),Symbol}) Base.precompile(Tuple{Type{Plots.GridLayout},Int64,Vararg{Int64,N} where N}) Base.precompile(Tuple{Type{Shape},Array{Tuple{Float64,Float64},1}}) - Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{PlotUtils.ContinuousColorGradient,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}}}},Base.OneTo{Int64},Int64,Int64}) Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.contour_levels),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}},Base.RefValue{Tuple{Float64,Float64}}}},Base.OneTo{Int64},Int64,Int64}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.contour_levels),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_linecolor),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}}) - Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.toppad)}}) - Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,2},Base.Generator{Array{AbstractLayout,2},typeof(Plots._update_min_padding!)}}) - Base.precompile(Tuple{typeof(Base.deepcopy_internal),Array{Plots.Series,1},IdDict{Any,Any}}) - Base.precompile(Tuple{typeof(Base.vect),Tuple{Int64,Float64,Plots.PlotText},Vararg{Tuple{Int64,Float64,Plots.PlotText},N} where N}) Base.precompile(Tuple{typeof(Plots._bin_centers),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{Int64,1},String}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{Nothing,1},String}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{PlotUtils.ContinuousColorGradient,1},String}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1},String}) Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{Symbol,1},String}) - Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},Array{Int64,1}}) - Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},StepRange{Int64,Int64}}) - Base.precompile(Tuple{typeof(Plots._cycle),Array{Float64,1},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(Plots._cycle),Base.OneTo{Int64},Array{Int64,1}}) - Base.precompile(Tuple{typeof(Plots._cycle),ColorPalette,Int64}) Base.precompile(Tuple{typeof(Plots._cycle),StepRange{Int64,Int64},Array{Int64,1}}) Base.precompile(Tuple{typeof(Plots._do_plot_show),Plots.Plot{Plots.GRBackend},Bool}) Base.precompile(Tuple{typeof(Plots._do_plot_show),Plots.Plot{Plots.PlotlyBackend},Bool}) @@ -193,13 +172,13 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot,Any,Any}) Base.precompile(Tuple{typeof(Plots._preprocess_barlike),RecipesPipeline.DefaultsDict,Base.OneTo{Int64},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots._preprocess_binlike),RecipesPipeline.DefaultsDict,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}) - Base.precompile(Tuple{typeof(Plots._replace_markershape),Array{Symbol,1}}) Base.precompile(Tuple{typeof(Plots._update_min_padding!),Plots.GridLayout}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.GRBackend},Plots.Subplot{Plots.GRBackend},Dict{Symbol,Any},Int64,Bool}) Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.PlotlyBackend},Plots.Subplot{Plots.PlotlyBackend},Dict{Symbol,Any},Int64,Bool}) Base.precompile(Tuple{typeof(Plots.build_layout),Plots.GridLayout,Int64}) Base.precompile(Tuple{typeof(Plots.convert_to_polar),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Int64,Float64}}) Base.precompile(Tuple{typeof(Plots.create_grid),Expr}) + Base.precompile(Tuple{typeof(Plots.error_coords),Array{Float64,1},Array{Float64,1},Array{Float64,1},Vararg{Array{Float64,1},N} where N}) Base.precompile(Tuple{typeof(Plots.error_coords),Array{Float64,1},Array{Float64,1},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.fakedata),Int64,Vararg{Int64,N} where N}) Base.precompile(Tuple{typeof(Plots.get_clims),Plots.Subplot{Plots.GRBackend},Plots.Series,Function}) @@ -218,37 +197,30 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Array{Float64,1},Array{Float64,1},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_heatmap),Plots.Series,Base.OneTo{Int64},Base.OneTo{Int64},Array{Float64,2},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Float64,1},Tuple{Float64,Float64}}) + Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64},Int64,Int64}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Float64,1},Array{Float64,1},Int64,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Int64,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Array{Float64,1},Array{Float64,1}},Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,StepRange{Int64,Int64},Array{Float64,1},Int64,Tuple{Float64,Float64}}) - Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,UnitRange{Int64},Array{Float64,1},Nothing,Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{Any,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{String,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Int64,1},Array{String,1}},Int64}) Base.precompile(Tuple{typeof(Plots.gr_label_ticks),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Float64,1},Array{String,1}}}) Base.precompile(Tuple{typeof(Plots.gr_label_ticks_3d),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Float64,1},Array{String,1}}}) Base.precompile(Tuple{typeof(Plots.gr_polaraxes),Int64,Float64,Plots.Subplot{Plots.GRBackend}}) - Base.precompile(Tuple{typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},Function}) + Base.precompile(Tuple{typeof(Plots.gr_polyline3d),Array{Float64,1},Array{Float64,1},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.gr_set_gradient),PlotUtils.ContinuousColorGradient}) - Base.precompile(Tuple{typeof(Plots.gr_viewport_from_bbox),Plots.Subplot{Plots.GRBackend},Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),Array{Float64,1},Symbol}) - Base.precompile(Tuple{typeof(Plots.heatmap_edges),Base.OneTo{Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.heatmap_edges),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Symbol}) - Base.precompile(Tuple{typeof(Plots.heatmap_edges),UnitRange{Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.ignorenan_minimum),Array{Int64,1}}) - Base.precompile(Tuple{typeof(Plots.is_2tuple),Tuple{Float64,Float64}}) Base.precompile(Tuple{typeof(Plots.layout_args),Int64}) Base.precompile(Tuple{typeof(Plots.make_fillrange_side),UnitRange{Int64},LinRange{Float64}}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,StepRange{Int64,Int64}}) Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,UnitRange{Int64}}) + Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.processGridArg!),RecipesPipeline.DefaultsDict,Bool,Symbol}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Array{Symbol,2}}) - Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Int64}) Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Symbol}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Array{Symbol,2}}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Plots.Stroke}) @@ -256,7 +228,6 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Shape}) Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Symbol}) Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.GRBackend},Int64,Float64,Plots.PlotText}) - Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.PlotlyBackend},Int64,Float64,Plots.PlotText}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},StepRange{Int64,Int64},Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Symbol,Symbol}) Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Tuple{Int64,Int64},Symbol}) @@ -265,7 +236,6 @@ function _precompile_() Base.precompile(Tuple{typeof(Plots.slice_arg),Array{PlotUtils.ContinuousColorGradient,2},Int64}) Base.precompile(Tuple{typeof(Plots.slice_arg),Array{RGBA{Float64},2},Int64}) Base.precompile(Tuple{typeof(Plots.slice_arg),Array{String,2},Int64}) - Base.precompile(Tuple{typeof(Plots.slice_arg),Array{Symbol,2},Int64}) Base.precompile(Tuple{typeof(Plots.slice_arg),Base.ReshapedArray{Int64,2,UnitRange{Int64},Tuple{}},Int64}) Base.precompile(Tuple{typeof(Plots.straightline_data),Tuple{Float64,Float64},Tuple{Float64,Float64},Array{Float64,1},Array{Float64,1},Int64}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol,Any},AbstractArray{OHLC,1}}) @@ -274,7 +244,6 @@ function _precompile_() 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{:histogram2d}},Any,Any,Any}) - Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol,Any},Type{Val{:hline}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol,Any},Type{Val{:pie}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol,Any},Type{Val{:spy}},Any,Any,Any}) Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol,Any},Type{Val{:sticks}},Any,Any,Any}) @@ -288,7 +257,6 @@ function _precompile_() Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plots.Plot{Plots.GRBackend},RecipesPipeline.DefaultsDict}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.GRBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.process_userrecipe!),Plots.Plot{Plots.PlotlyBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) - Base.precompile(Tuple{typeof(RecipesPipeline.slice_series_attributes!),Plots.Plot{Plots.GRBackend},Array{Dict{Symbol,Any},1},Dict{Symbol,Any}}) Base.precompile(Tuple{typeof(RecipesPipeline.unzip),Array{GeometryBasics.Point{2,Float64},1}}) Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,String}) Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,String}) @@ -300,46 +268,29 @@ function _precompile_() Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64}) Base.precompile(Tuple{typeof(bbox),Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}) Base.precompile(Tuple{typeof(contour),Any,Vararg{Any,N} where N}) - Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Array{Any,1}}}}) - Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_fillalpha),Tuple{Array{Any,1}}}}) - Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linealpha),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linestyle),Tuple{Array{Any,1}}}}) - Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linewidth),Tuple{Array{Any,1}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2},Tuple{Base.OneTo{Int64},Base.OneTo{Int64}},typeof(Plots.gr_color),Tuple{Array{RGBA{Float64},2}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(string),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(typeof),Tuple{Tuple{Plots.PortfolioComposition}}}}}}) Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(string),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple},Nothing,typeof(typeof),Tuple{Tuple{Plots.Spy}}}}}}) - Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.GRBackend}}) - Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.PlotlyBackend}}) Base.precompile(Tuple{typeof(font),String,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1},UnitRange{Int64}}) - Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1}}) - Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}}) - Base.precompile(Tuple{typeof(merge),NamedTuple{(:annotation,),Tuple{Array{Tuple{Int64,Float64,Plots.PlotText},1}}},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}) + Base.precompile(Tuple{typeof(iterate),Base.Iterators.Enumerate{Plots.SegmentsIterator},Tuple{Int64}}) Base.precompile(Tuple{typeof(merge),NamedTuple{(:zcolor, :m, :ms, :lab),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String}},NamedTuple{(:seriestype,),Tuple{Symbol}}}) Base.precompile(Tuple{typeof(plot!),Any}) Base.precompile(Tuple{typeof(plot),Any,Any}) Base.precompile(Tuple{typeof(plot),Any}) Base.precompile(Tuple{typeof(push!),Plots.Plot{Plots.GRBackend},Float64,Array{Float64,1}}) - Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.GRBackend}}) Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.PlotlyBackend}}) - Base.precompile(Tuple{typeof(setindex!),Dict{Symbol,Any},Tuple{Array{Symbol,2},Int64,Float64,Plots.Stroke},Symbol}) Base.precompile(Tuple{typeof(spy),Any}) Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any,N} where N}) Base.precompile(Tuple{typeof(text),String,Int64,Symbol,Vararg{Symbol,N} where N}) Base.precompile(Tuple{typeof(text),String,Symbol,Int64,Vararg{Any,N} where N}) - Base.precompile(Tuple{typeof(text),String,Symbol}) Base.precompile(Tuple{typeof(title!),AbstractString}) Base.precompile(Tuple{typeof(vcat),Array{Any,1},Array{Tuple{Int64,Float64,Plots.PlotText},1}}) Base.precompile(Tuple{typeof(vcat),Array{Any,1},Tuple{Int64,Float64,Plots.PlotText}}) Base.precompile(Tuple{typeof(vline!),Any}) Base.precompile(Tuple{typeof(xgrid!),Plots.Plot{Plots.GRBackend},Symbol,Vararg{Any,N} where N}) - Base.precompile(Tuple{typeof(xlims),Plots.Subplot{Plots.PlotlyBackend}}) Base.precompile(Tuple{typeof(yaxis!),Any,Any}) - let fbody = try __lookup_kwbody__(which(Plots.gr_polyline, (Array{Float64,1},Array{Float64,1},typeof(GR.fillarea),))) catch missing end - if !ismissing(fbody) - precompile(fbody, (Symbol,Symbol,typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},typeof(GR.fillarea),)) - end - end let fbody = try __lookup_kwbody__(which(Plots.text, (String,Int64,Vararg{Any,N} where N,))) catch missing end if !ismissing(fbody) precompile(fbody, (Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},typeof(text),String,Int64,Vararg{Any,N} where N,)) From 9c0b2ea090acc54f006a0c35b2424d83e3d690b2 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Fri, 13 Nov 2020 07:57:10 +0100 Subject: [PATCH 09/10] add 3d quiver test example --- src/examples.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/examples.jl b/src/examples.jl index d5bf01f35..911457f1c 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1081,6 +1081,27 @@ const _examples = PlotExample[ plot!(sin, -π, π, lw=3, color=:red) end] ), + PlotExample( + "3d quiver", + "", + [quote + using Plots + + ϕs = range(-π, π, length=50) + θs = range(0, π, length=25) + θqs = range(1, π-1, length=25) + + x = vec([sin(θ) * cos(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θs)]) + y = vec([sin(θ) * sin(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θs)]) + z = vec([cos(θ) for (ϕ, θ) in Iterators.product(ϕs, θs)]) + + u = 0.1 * vec([sin(θ) * cos(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θqs)]) + v = 0.1 * vec([sin(θ) * sin(ϕ) for (ϕ, θ) in Iterators.product(ϕs, θqs)]) + w = 0.1 * vec([cos(θ) for (ϕ, θ) in Iterators.product(ϕs, θqs)]) + + quiver(x,y,z, quiver=(u,v,w)) + end] + ) ] # Some constants for PlotDocs and PlotReferenceImages @@ -1099,6 +1120,7 @@ _backend_skips = Dict( 32, # spy 49, # polar heatmap 51, # image with custom axes + 52, # 3d quiver ], ) From abebbdd54aab9ec673a7557e7379010ad2307804 Mon Sep 17 00:00:00 2001 From: Ronny Bergmann Date: Fri, 13 Nov 2020 09:29:43 +0100 Subject: [PATCH 10/10] fixes two checks for 3D to work properly. --- src/recipes.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 15d413366..41d36714a 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1197,7 +1197,7 @@ function quiver_using_arrows(plotattributes::AKW) if !isa(plotattributes[:arrow], Arrow) plotattributes[:arrow] = arrow() end - is_3d = haskey(plotattributes,:z) + is_3d = haskey(plotattributes,:z) && !isnothing(plotattributes[:z]) velocity = error_zipit(plotattributes[:quiver]) xorig, yorig = plotattributes[:x], plotattributes[:y] zorig = is_3d ? plotattributes[:z] : [] @@ -1205,7 +1205,7 @@ function quiver_using_arrows(plotattributes::AKW) # for each point, we create an arrow of velocity vi, translated to the x/y coordinates x, y = zeros(0), zeros(0) is_3d && ( z = zeros(0)) - for i = 1:max(length(xorig), length(yorig), length(zorig)) + for i = 1:max(length(xorig), length(yorig), is_3d ? 0 : length(zorig)) # get the starting position xi = _cycle(xorig, i) yi = _cycle(yorig, i)