Backend refactor (#2965)

* isolate :path

* factor out legend addition

* ported series coordinates code

* fix 3d-like seriestypes

* common add_series

* fix bar

* fix contour

* fix scatter

* Update precompile_*.jl file (#2966)

Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>
This commit is contained in:
Simon Christ 2020-09-13 19:29:49 +02:00 committed by GitHub
parent 52cb6fbd3a
commit 9c4890d794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1597 additions and 1564 deletions

View File

@ -59,6 +59,7 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.Type)),NamedTuple{(:parent,),Tuple{Plots.Subplot{Plots.PlotlyBackend}}},Type{Plots.Subplot},Plots.PlotlyBackend})
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},Array{Float64,1}},Tuple{Int64,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})
@ -92,15 +93,19 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.mesh3d)),NamedTuple{(:connections,),Tuple{Tuple{Array{Int64,1},Array{Int64,1},Array{Int64,1}}}},typeof(mesh3d),Array{Int64,1},Vararg{Array{Int64,1},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.pie)),NamedTuple{(:title, :l),Tuple{String,Float64}},typeof(pie),Array{String,1},Vararg{Any,N} where N})
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{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},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{(: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}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:markersize, :c, :seriestype),Tuple{Int64,Symbol,Symbol}},typeof(plot!),Array{Float64,1}})
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!),Array{Int64,1},Array{Float64,1}})
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.GRBackend},Array{Int64,1},Vararg{Any,N} where N})
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{(:seriestype,),Tuple{Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Int64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Int64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!),Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend}})
@ -131,7 +136,7 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:layout, :palette, :bg_inside),Tuple{Int64,Array{PlotUtils.ContinuousColorGradient,2},Array{Symbol,2}}},typeof(plot),Array{Float64,2}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border),Tuple{Plots.GridLayout,Array{Symbol,2},Bool,Nothing,Symbol}},typeof(plot),Array{Float64,2}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation),Tuple{Plots.GridLayout,Array{String,2},Symbol,Array{Measures.Length{:mm,Float64},2},Measures.Length{:mm,Float64},Int64}},typeof(plot),Array{Float64,2}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:layout,),Tuple{Plots.GridLayout}},typeof(plot),Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend},Vararg{Plots.Plot{Plots.GRBackend},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:layout, :xlims),Tuple{Plots.GridLayout,Tuple{Int64,Float64}}},typeof(plot),Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend},Vararg{Plots.Plot{Plots.GRBackend},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:legend,),Tuple{Bool}},typeof(plot),Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend},Vararg{Plots.Plot{Plots.GRBackend},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:legend,),Tuple{Bool}},typeof(plot),Plots.Plot{Plots.PlotlyBackend},Plots.Plot{Plots.PlotlyBackend},Vararg{Plots.Plot{Plots.PlotlyBackend},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:legend,),Tuple{Symbol}},typeof(plot),Array{Tuple{Int64,Real},1}})
@ -171,8 +176,9 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.scatter)),NamedTuple{(:marker_z, :color, :legend),Tuple{typeof(+),Symbol,Bool}},typeof(scatter),Array{Float64,1},Vararg{Array{Float64,1},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.test_examples)),NamedTuple{(:skip,),Tuple{Array{Int64,1}}},typeof(test_examples),Symbol})
Base.precompile(Tuple{Type{Shape},Array{Tuple{Float64,Float64},1}})
Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{Int64,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linewidth),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{Nothing,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_fillalpha),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{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{PlotUtils.ContinuousColorGradient,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linecolor),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.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}}}}})
@ -194,14 +200,25 @@ function _precompile_()
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._heatmap_edges),Array{Float64,1},Bool})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Array{Float64,1},1},Array{Array{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{AbstractArray{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Array{T,1} where T,1},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Array{T,1} where T,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Complex{Float64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Dates.DateTime,1},UnitRange{Int64},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Float64,1},Array{Float64,1},UnitRange{Int64}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Function,1},Float64,Float64}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Int64,1},Array{Float64,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{OHLC,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{String,1},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Union{Missing, Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Plots.PortfolioComposition}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{StepRange{Int64,Int64},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{UnitRange{Int64}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{typeof(log),Int64}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{AbstractArray{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Array{Float64,1},1},Array{Array{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Array{T,1} where T,1},Array{Float64,2}}})
@ -216,6 +233,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{OHLC,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{Float64,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{String,1},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Real},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Union{Missing, Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Plots.PortfolioComposition}})
@ -229,6 +247,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots._update_min_padding!),Plots.GridLayout})
Base.precompile(Tuple{typeof(Plots._update_plot_args),Plots.Plot{Plots.PlotlyBackend},RecipesPipeline.DefaultsDict})
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.GRBackend},Array{Any,1}})
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})
@ -246,6 +265,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.get_xy),OHLC{Float64},Int64,Float64})
Base.precompile(Tuple{typeof(Plots.gr_display),Plots.Subplot{Plots.GRBackend},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.gr_draw_colorbar),Plots.GRColorbar,Plots.Subplot{Plots.GRBackend},Tuple{Float64,Float64},Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Float64,1},Array{Float64,1},Tuple{Float64,Float64},Int64,Int64})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Float64,1},Array{Float64,1},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,Array{Int64,1},Array{Int64,1},Tuple{Float64,Float64}})
@ -257,7 +277,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.gr_legend_pos),Plots.Subplot{Plots.GRBackend},Array{Float64,1},Array{Float64,1},Array{Float64,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.gr_text),Float64,Float64,String})
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}})
@ -269,9 +289,9 @@ function _precompile_()
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.processFontArg!),Dict{Symbol,Any},Symbol,Int64})
Base.precompile(Tuple{typeof(Plots.processFontArg!),Dict{Symbol,Any},Symbol,String})
Base.precompile(Tuple{typeof(Plots.processFontArg!),Dict{Symbol,Any},Symbol,Symbol})
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}})
@ -301,6 +321,9 @@ function _precompile_()
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{OHLC,1}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Plots.PortfolioComposition})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:heatmap}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:spy}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:xerror}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:barbins}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:barhist}},Base.OneTo{Int64},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:bar}},Array{Float64,1},Array{Float64,1},Nothing})
@ -318,7 +341,6 @@ function _precompile_()
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:vline}},Base.OneTo{Int64},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:xerror}},Array{Float64,1},Array{Float64,1},Array{Float64,1}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:xerror}},Array{Float64,1},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:zerror}},Array{Float64,1},Array{Float64,1},Array{Float64,1}})
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}})
@ -452,11 +474,18 @@ function _precompile_()
Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.gr_color),Tuple{Array{RGBA{Float64},1}}}})
Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(deepcopy),Plots.Plot{Plots.PlotlyBackend}})
Base.precompile(Tuple{typeof(enumerate),Tuple{Plots.Plot{Plots.PlotlyBackend},Plots.Plot{Plots.PlotlyBackend}}})
Base.precompile(Tuple{typeof(font),String,Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(heatmap),Array{Dates.DateTime,1},Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1},Array{Float64,1}})
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),Array{Int64,1},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},UnitRange{Int64}})
Base.precompile(Tuple{typeof(iter_segments),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),StepRange{Int64,Int64},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),UnitRange{Int64},Array{Float64,1}})
Base.precompile(Tuple{typeof(ohlc),Array{OHLC,1}})
Base.precompile(Tuple{typeof(plot!),Array{Float64,2}})
Base.precompile(Tuple{typeof(plot!),Array{Tuple{Int64,Real},1}})
@ -578,7 +607,7 @@ function _precompile_()
end
let fbody = try __lookup_kwbody__(which(RecipesBase.plot, (Array{Function,1},Vararg{Any,N} where N,))) catch missing end
if !ismissing(fbody)
precompile(fbody, (Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:leg,),Tuple{Bool}}},typeof(plot),Array{Function,1},Vararg{Any,N} where N,))
precompile(fbody, (Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:leg, :xlims, :ylims),Tuple{Bool,Tuple{Int64,Float64},Tuple{Int64,Int64}}}},typeof(plot),Array{Function,1},Vararg{Any,N} where N,))
end
end
let fbody = try __lookup_kwbody__(which(RecipesBase.plot, (Function,Vararg{Any,N} where N,))) catch missing end

View File

@ -287,129 +287,11 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
!isfilledcontour(series) && series[:ribbon] === nothing
push!(series_opt, "area legend" => nothing)
end
if st in (:heatmap, :contour)
push!(axis.options, "view" => "{0}{90}")
end
# treat segments
segments =
if st in (:wireframe, :heatmap, :contour, :surface, :contour3d)
iter_segments(surface_to_vecs(
series[:x],
series[:y],
series[:z],
)...)
else
iter_segments(series, st)
end
for (i, rng) in enumerate(segments)
segment_opt = PGFPlotsX.Options()
segment_opt = merge(segment_opt, pgfx_linestyle(opt, i))
if opt[:markershape] != :none
marker = _cycle(opt[:markershape], i)
if marker isa Shape
x = marker.x
y = marker.y
scale_factor = 0.00125
mark_size = opt[:markersize] * scale_factor
path = join(
[
"($(x[i] * mark_size), $(y[i] * mark_size))"
for i in eachindex(x)
],
" -- ",
)
c = get_markercolor(series, i)
a = get_markeralpha(series, i)
PGFPlotsX.push_preamble!(
pgfx_plot.the_plot,
"""
\\pgfdeclareplotmark{PlotsShape$(series_index)}{
\\filldraw
$path;
}
""",
)
end
segment_opt = merge(segment_opt, pgfx_marker(opt, i))
end
if st == :shape
segment_opt = merge(segment_opt, pgfx_fillstyle(opt, i))
end
# add fillrange
if sf !== nothing &&
!isfilledcontour(series)
if sf isa Number || sf isa AVec
pgfx_fillrange_series!(
axis,
series,
series_func,
i,
_cycle(sf, rng),
rng,
)
elseif sf isa Tuple && series[:ribbon] !== nothing
for sfi in sf
pgfx_fillrange_series!(
axis,
series,
series_func,
i,
_cycle(sfi, rng),
rng,
)
end
end
if i == 1 &&
sp[:legend] != :none && pgfx_should_add_to_legend(series)
pgfx_filllegend!(series_opt, opt)
end
end
coordinates =
pgfx_series_coordinates!(sp, series, segment_opt, opt, rng)
segment_plot =
series_func(merge(series_opt, segment_opt), coordinates)
pgfx_add_series!(Val(st), axis, series_opt, series, series_func, opt)
if extra_series !== nothing
extra_series = wraptuple(extra_series)
push!(segment_plot, extra_series...)
push!(axis.contents[end], extra_series...)
end
push!(axis, segment_plot)
# fill between functions
if sf isa Tuple && series[:ribbon] === nothing
sf1, sf2 = sf
@assert sf1 == series_index "First index of the tuple has to match the current series index."
push!(
axis,
series_func(
merge(
pgfx_fillstyle(opt, series_index),
PGFPlotsX.Options("forget plot" => nothing),
),
"fill between [of=$series_id and $(_pgfplotsx_series_ids[Symbol(string(sf2))])]",
),
)
end
# add to legend?
if sp[:legend] != :none
leg_entry = if opt[:label] isa AVec
get(opt[:label], i, "")
elseif opt[:label] isa AbstractString
if i == 1
get(opt, :label, "")
else
""
end
else
throw(ArgumentError("Malformed label. label = $(opt[:label])"))
end
if leg_entry == "" || !pgfx_should_add_to_legend(series)
push!(axis.contents[end].options, "forget plot" => nothing)
else
leg_opt = PGFPlotsX.Options()
legend = PGFPlotsX.LegendEntry(leg_opt, leg_entry, false)
push!(axis, legend)
end
end
end # for segments
# add series annotations
anns = series[:series_annotations]
for (xi, yi, str, fnt) in EachAnn(anns, series[:x], series[:y])
@ -443,10 +325,266 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
return pgfx_plot
end
## seriestype specifics
@inline function pgfx_series_coordinates!(sp, series, segment_opt, opt, rng)
function pgfx_add_series!(axis, series_opt, series, series_func, opt)
args = pgfx_series_arguments(series, opt)
series_plot = series_func(series_opt, PGFPlotsX.Coordinates(args...))
push!(axis, series_plot)
pgfx_add_legend!(axis, series, opt)
end
function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, opt)
# treat segments
segments = iter_segments(series, series[:seriestype])
sf = opt[:fillrange]
for (i, rng) in enumerate(segments)
segment_opt = PGFPlotsX.Options()
segment_opt = merge(segment_opt, pgfx_linestyle(opt, i))
if opt[:markershape] != :none
marker = opt[:markershape]
if marker isa Shape
x = marker.x
y = marker.y
scale_factor = 0.00125
mark_size = opt[:markersize] * scale_factor
path = join(
[
"($(x[i] * mark_size), $(y[i] * mark_size))"
for i in eachindex(x)
],
" -- ",
)
c = get_markercolor(series, i)
a = get_markeralpha(series, i)
PGFPlotsX.push_preamble!(
series[:plot_object].o.the_plot,
"""
\\pgfdeclareplotmark{PlotsShape$(series[:series_plotindex])}{
\\filldraw
$path;
}
""",
)
end
segment_opt = merge(segment_opt, pgfx_marker(opt, i))
end
# add fillrange
if sf !== nothing &&
!isfilledcontour(series)
if sf isa Number || sf isa AVec
pgfx_fillrange_series!(
axis,
series,
series_func,
i,
_cycle(sf, rng),
rng,
)
elseif sf isa Tuple && series[:ribbon] !== nothing
for sfi in sf
pgfx_fillrange_series!(
axis,
series,
series_func,
i,
_cycle(sfi, rng),
rng,
)
end
end
if i == 1 &&
series[:subplot][:legend] != :none && pgfx_should_add_to_legend(series)
pgfx_filllegend!(series_opt, opt)
end
end
coordinates = PGFPlotsX.Table(pgfx_series_arguments(series, opt, rng)...)
segment_plot =
series_func(merge(series_opt, segment_opt), coordinates)
push!(axis, segment_plot)
# fill between functions
if sf isa Tuple && series[:ribbon] === nothing
sf1, sf2 = sf
@assert sf1 == series_index "First index of the tuple has to match the current series index."
push!(
axis,
series_func(
merge(
pgfx_fillstyle(opt, series_index),
PGFPlotsX.Options("forget plot" => nothing),
),
"fill between [of=$series_id and $(_pgfplotsx_series_ids[Symbol(string(sf2))])]",
),
)
end
pgfx_add_legend!(axis, series, opt, i)
end # for segments
end
function pgfx_add_series!(::Val{:scatter}, axis, series_opt, series, series_func, opt)
push!(series_opt, "only marks" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:straightline}, axis, series_opt, series, series_func, opt)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:path3d}, axis, series_opt, series, series_func, opt)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:scatter3d}, axis, series_opt, series, series_func, opt)
push!(series_opt, "only marks" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:surface}, axis, series_opt, series, series_func, opt)
push!(
series_opt,
"surf" => nothing,
"mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]),
"z buffer" => "sort",
)
pgfx_add_series!(axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:wireframe}, axis, series_opt, series, series_func, opt)
push!(series_opt, "mesh" => nothing,
"mesh/rows" => length(opt[:x])
)
pgfx_add_series!(axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:heatmap}, axis, series_opt, series, series_func, opt)
push!(axis.options, "view" => "{0}{90}")
push!(
series_opt,
"matrix plot*" => nothing,
"mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]),
)
pgfx_add_series!(axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:contour}, axis, series_opt, series, series_func, opt)
push!(axis.options, "view" => "{0}{90}")
if isfilledcontour(series)
pgfx_add_series!(Val(:filledcontour), axis, series_opt, series, series_func, opt)
return nothing
end
pgfx_add_series!(Val(:contour3d), axis, series_opt, series, series_func, opt)
return nothing
end
function pgfx_add_series!(::Val{:filledcontour}, axis, series_opt, series, series_func, opt)
push!(
series_opt,
"contour filled" => PGFPlotsX.Options(), # labels not supported
"patch type" => "bilinear",
"shader" => "flat",
)
if opt[:levels] isa Number
push!(series_opt["contour filled"], "number" => opt[:levels])
elseif opt[:levels] isa AVec
push!(series_opt["contour filled"], "levels" => opt[:levels])
end
pgfx_add_series!(axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:contour3d}, axis, series_opt, series, series_func, opt)
push!(
series_opt,
"contour prepared" => PGFPlotsX.Options("labels" => opt[:contour_labels]),
)
args = pgfx_series_arguments(series, opt)
series_plot = series_func(series_opt, PGFPlotsX.Table(Contour.contours(args..., opt[:levels])))
push!(axis, series_plot)
pgfx_add_legend!(axis, series, opt)
end
function pgfx_add_series!(::Val{:quiver}, axis, series_opt, series, series_func, opt)
if opt[:quiver] !== nothing
push!(
series_opt,
"quiver" => PGFPlotsX.Options(
"u" => "\\thisrow{u}",
"v" => "\\thisrow{v}",
pgfx_arrow(opt[:arrow]) => nothing,
),
)
x = opt[:x]
y = opt[:y]
table = PGFPlotsX.Table([
:x => x,
:y => y,
:u => opt[:quiver][1],
:v => opt[:quiver][2],
])
end
series_plot = series_func(series_opt, table)
push!(axis, series_plot)
pgfx_add_legend!(axis, series, opt)
end
function pgfx_add_series!(::Val{:shape}, axis, series_opt, series, series_func, opt)
push!(series_opt, "area legend" => nothing)
series_opt = merge(series_opt, pgfx_fillstyle(opt))
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:steppre}, axis, series_opt, series, series_func, opt)
push!(series_opt, "const plot mark right" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:stepmid}, axis, series_opt, series, series_func, opt)
push!(series_opt, "const plot mark mid" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:steppost}, axis, series_opt, series, series_func, opt)
push!(series_opt, "const plot" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:ysticks}, axis, series_opt, series, series_func, opt)
push!(series_opt, "ycomb" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_series!(::Val{:xsticks}, axis, series_opt, series, series_func, opt)
push!(series_opt, "xcomb" => nothing)
pgfx_add_series!(Val(:path), axis, series_opt, series, series_func, opt)
end
function pgfx_add_legend!(axis, series, opt, i = 1)
if series[:subplot][:legend] != :none
leg_entry = if opt[:label] isa AVec
get(opt[:label], i, "")
elseif opt[:label] isa AbstractString
if i == 1
get(opt, :label, "")
else
""
end
else
throw(ArgumentError("Malformed label. label = $(opt[:label])"))
end
if leg_entry == "" || !pgfx_should_add_to_legend(series)
push!(axis.contents[end].options, "forget plot" => nothing)
else
leg_opt = PGFPlotsX.Options()
legend = PGFPlotsX.LegendEntry(leg_opt, leg_entry, false)
push!(axis, legend)
end
end
return nothing
end
pgfx_series_arguments(series, opt, range) = (arg[range] for arg in pgfx_series_arguments(series, opt))
function pgfx_series_arguments(series, opt)
st = series[:seriestype]
# function args
args = if st in (:contour, :contour3d)
return if st in (:contour, :contour3d)
opt[:x], opt[:y], Array(opt[:z])'
elseif st in (:heatmap, :surface, :wireframe)
surface_to_vecs(opt[:x], opt[:y], opt[:z])
@ -456,146 +594,12 @@ end
straightline_data(series)
elseif st == :shape
shape_data(series)
elseif ispolar(sp)
elseif ispolar(series)
theta, r = opt[:x], opt[:y]
rad2deg.(theta), r
else
opt[:x], opt[:y]
end
seg_args = if st in (:contour, :contour3d)
args
else
(arg[rng] for arg in args)
end
if opt[:quiver] !== nothing
push!(
segment_opt,
"quiver" => PGFPlotsX.Options(
"u" => "\\thisrow{u}",
"v" => "\\thisrow{v}",
pgfx_arrow(opt[:arrow]) => nothing,
),
)
x, y = collect(seg_args)
return PGFPlotsX.Table([
:x => x,
:y => y,
:u => opt[:quiver][1],
:v => opt[:quiver][2],
])
else
if isfilledcontour(series)
st = :filledcontour
end
pgfx_series_coordinates!(Val(st), segment_opt, opt, seg_args)
end
end
function pgfx_series_coordinates!(
st_val::Union{Val{:path},Val{:path3d},Val{:straightline}},
segment_opt,
opt,
args,
)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(
st_val::Union{Val{:scatter},Val{:scatter3d}},
segment_opt,
opt,
args,
)
push!(segment_opt, "only marks" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:heatmap}, segment_opt, opt, args)
push!(
segment_opt,
"matrix plot*" => nothing,
"mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]),
)
return PGFPlotsX.Table(args...)
end
function pgfx_series_coordinates!(st_val::Val{:steppre}, segment_opt, opt, args)
push!(segment_opt, "const plot mark right" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:stepmid}, segment_opt, opt, args)
push!(segment_opt, "const plot mark mid" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:steppost}, segment_opt, opt, args)
push!(segment_opt, "const plot" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(
st_val::Union{Val{:ysticks},Val{:sticks}},
segment_opt,
opt,
args,
)
push!(segment_opt, "ycomb" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:xsticks}, segment_opt, opt, args)
push!(segment_opt, "xcomb" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:surface}, segment_opt, opt, args)
push!(
segment_opt,
"surf" => nothing,
"mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]),
"z buffer" => "sort",
)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:volume}, segment_opt, opt, args)
push!(segment_opt, "patch" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:wireframe}, segment_opt, opt, args)
push!(segment_opt, "mesh" => nothing, "mesh/rows" => length(opt[:x]))
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(st_val::Val{:shape}, segment_opt, opt, args)
push!(segment_opt, "area legend" => nothing)
return PGFPlotsX.Coordinates(args...)
end
function pgfx_series_coordinates!(
st_val::Union{Val{:contour},Val{:contour3d}},
segment_opt,
opt,
args,
)
push!(
segment_opt,
"contour prepared" => PGFPlotsX.Options("labels" => opt[:contour_labels]),
)
return PGFPlotsX.Table(Contour.contours(args..., opt[:levels]))
end
function pgfx_series_coordinates!(
st_val::Val{:filledcontour},
segment_opt,
opt,
args,
)
xs, ys, zs = collect(args)
push!(
segment_opt,
"contour filled" => PGFPlotsX.Options(), # labels not supported
"patch type" => "bilinear",
"shader" => "flat",
)
if opt[:levels] isa Number
push!(segment_opt["contour filled"], "number" => opt[:levels])
elseif opt[:levels] isa AVec
push!(segment_opt["contour filled"], "levels" => opt[:levels])
end
PGFPlotsX.Coordinates(args...)
end
##
pgfx_get_linestyle(k) = get(
@ -960,7 +964,7 @@ function pgfx_fillrange_args(fillrange, x, y, z)
x_fill = [x; x[n:-1:1]; x[1]]
y_fill = [y; y[n:-1:1]; x[1]]
z_fill = [z; _cycle(fillrange, n:-1:1); z[1]]
return PGFPlotsX.Coordiantes(x_fill, y_fill, z_fill)
return PGFPlotsX.Coordinates(x_fill, y_fill, z_fill)
end
function pgfx_sanitize_string(p::PlotText)