Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d34b33b4ae | |||
| fdbeace33a | |||
| 8dc3d9805a | |||
| 08932633d0 | |||
| 959fee92a6 | |||
| 70c4954e16 | |||
| dffb699fca | |||
| 08f993a67f | |||
| c4ee343ef2 | |||
| 17acb45653 | |||
| 842b8fa70d | |||
| e236005d72 | |||
| c7955420e3 | |||
| c9b186c6ac | |||
| 072b6f42f6 | |||
| 86bec68b42 | |||
| 2a09bd8266 | |||
| 2be5756cb8 | |||
| 015b48eede |
@@ -21,8 +21,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: # NOTE: the versions below should match those in your botconfig
|
||||
- '1.3'
|
||||
- '1.4'
|
||||
- '1.5'
|
||||
os: # NOTE: should match the os setting of your botconfig
|
||||
- ubuntu-latest
|
||||
@@ -40,7 +38,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
julia --project -e 'using Pkg; Pkg.instantiate();'
|
||||
julia -e 'using Pkg; Pkg.add( PackageSpec(url="https://github.com/aminya/CompileBot.jl", rev = "master") ); Pkg.develop(PackageSpec(; path=pwd())); using CompileBot; CompileBot.addtestdep();'
|
||||
julia -e 'using Pkg; Pkg.add( PackageSpec(name = "CompileBot", version = "1") ); Pkg.develop(PackageSpec(; path=pwd())); using CompileBot; CompileBot.addtestdep();'
|
||||
|
||||
|
||||
# TESTCMD
|
||||
@@ -73,7 +71,7 @@ jobs:
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: CompileBot postprocess
|
||||
run: julia -e 'using Pkg; Pkg.add( PackageSpec(url="https://github.com/aminya/CompileBot.jl", rev = "master") ); using CompileBot; CompileBot.postprocess();'
|
||||
run: julia -e 'using Pkg; Pkg.add( PackageSpec(name = "CompileBot", version = "1") ); using CompileBot; CompileBot.postprocess();'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
|
||||
@@ -21,7 +21,6 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- '1.3'
|
||||
- '1'
|
||||
- 'nightly'
|
||||
os:
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
[plotly]
|
||||
git-tree-sha1 = "f03dd0451a05a5fdbbcb3e548998a9d7a1ab6368"
|
||||
lazy = true
|
||||
|
||||
[[plotly.download]]
|
||||
url = "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
||||
sha256 = "487f1da6b7a1f127de59af8a65bb3fe2c63d709f011afea82896bdce28ecc0f8"
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.6.12"
|
||||
version = "1.7.2"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
@@ -17,7 +17,6 @@ Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
|
||||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
|
||||
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
|
||||
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
|
||||
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
|
||||
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
|
||||
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
|
||||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
|
||||
@@ -27,6 +26,7 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
|
||||
RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
|
||||
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
|
||||
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
|
||||
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
|
||||
Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
|
||||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
|
||||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
|
||||
@@ -51,10 +51,10 @@ RecipesBase = "1"
|
||||
RecipesPipeline = "0.1.13"
|
||||
Reexport = "0.2"
|
||||
Requires = "1"
|
||||
Scratch = "1"
|
||||
Showoff = "0.3.1"
|
||||
StableRNGs = "0.1.1"
|
||||
StatsBase = "0.32, 0.33"
|
||||
julia = "1.3"
|
||||
julia = "1.5"
|
||||
|
||||
[extras]
|
||||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
|
||||
|
||||
+17
-15
@@ -84,6 +84,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.gr_polyline)),NamedTuple{(:arrowside, :arrowstyle),Tuple{Symbol,Symbol}},typeof(Plots.gr_polyline),UnitRange{Int64},Array{Float64,1}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.gr_polyline)),NamedTuple{(:arrowside, :arrowstyle),Tuple{Symbol,Symbol}},typeof(Plots.gr_polyline),UnitRange{Int64},UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.heatmap)),NamedTuple{(:aspect_ratio,),Tuple{Int64}},typeof(heatmap),Array{String,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.heatmap)),NamedTuple{(:projection,),Tuple{Symbol}},typeof(heatmap),Array{Int64,2}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.histogram)),NamedTuple{(:bins, :weights),Tuple{Symbol,Array{Int64,1}}},typeof(histogram),Array{Float64,1}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.histogram2d)),NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio),Tuple{Tuple{Int64,Int64},Bool,Bool,Int64}},typeof(histogram2d),Array{Complex{Float64},1}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.histogram2d)),NamedTuple{(:nbins,),Tuple{Int64}},typeof(histogram2d),Array{Float64,1},Vararg{Array{Float64,1},N} where N})
|
||||
@@ -103,13 +104,11 @@ function _precompile_()
|
||||
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.PlotlyBackend}})
|
||||
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{(: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.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{(: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}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:connections, :seriestype),Tuple{Tuple{Array{Int64,1},Array{Int64,1},Array{Int64,1}},Symbol}},typeof(plot),Array{Int64,1},Array{Int64,1},Vararg{Array{Int64,1},N} where N})
|
||||
@@ -143,12 +142,12 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:nbins, :seriestype),Tuple{Int64,Symbol}},typeof(plot),Array{Float64,1},Array{Float64,1}})
|
||||
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{(: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}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot),Array{Dates.DateTime,1},UnitRange{Int64},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:st, :xlabel, :ylabel, :zlabel),Tuple{Symbol,String,String,String}},typeof(plot),Array{Float64,1},Array{Float64,1},Vararg{Array{Float64,1},N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:title, :l, :seriestype),Tuple{String,Float64,Symbol}},typeof(plot),Array{String,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:title,),Tuple{Array{String,2}}},typeof(plot),Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:title,),Tuple{Array{String,2}}},typeof(plot),Plots.Plot{Plots.PlotlyBackend},Plots.Plot{Plots.PlotlyBackend}})
|
||||
@@ -166,15 +165,11 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Plots.scatter)),NamedTuple{(:m, :lab, :bg, :xlim, :ylim),Tuple{Tuple{Int64,Symbol},Array{String,2},Symbol,Tuple{Int64,Int64},Tuple{Int64,Int64}}},typeof(scatter),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N})
|
||||
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{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(Plots.label_to_string),Tuple{Base.RefValue{Symbol},Int64}})
|
||||
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{Nothing,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linealpha),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.leftpad)}})
|
||||
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})
|
||||
@@ -189,7 +184,9 @@ 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{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},Array{Float64,1}}})
|
||||
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}})
|
||||
@@ -227,7 +224,6 @@ function _precompile_()
|
||||
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})
|
||||
Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Float64,1},Array{String,1}}})
|
||||
@@ -240,21 +236,21 @@ function _precompile_()
|
||||
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_contour),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,2},Tuple{Float64,Float64}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_grid),Plots.Subplot{Plots.GRBackend},Plots.Axis,Segments{Tuple{Float64,Float64}},Function})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_grid),Plots.Subplot{Plots.GRBackend},Plots.Axis,Segments{Tuple{Float64,Float64}}})
|
||||
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},Int64,Int64})
|
||||
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}})
|
||||
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_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),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Int64,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})
|
||||
@@ -295,7 +291,8 @@ 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{:xerror}},Plots.Plot{Plots.GRBackend}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:yerror}},Plots.Plot{Plots.GRBackend}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:zerror}},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})
|
||||
@@ -314,9 +311,8 @@ 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{:yerror}},Array{Float64,1},Array{Float64,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:yerror}},Array{Float64,1},Array{Float64,1},Nothing})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_attributes!),Plots.Plot{Plots.GRBackend},RecipesPipeline.DefaultsDict})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.preprocess_axis_args!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol})
|
||||
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.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{AbstractArray{Float64,1},1}})
|
||||
@@ -325,6 +321,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Float64,2}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{GeometryBasics.Point{2,Float64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Int64,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Int64,2}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{OHLC,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Tuple{Int64,Int64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Tuple{Int64,Real},1}})
|
||||
@@ -345,11 +342,13 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{GeometryBasics.Point{2,Float64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Int64,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Int64,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Int64,2}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{OHLC,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{String,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Tuple{Int64,Int64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Tuple{Int64,Real},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Array{Union{Missing, Int64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Base.OneTo{Int64},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Formatted{Array{Int64,1}},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Function,Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol,Int64,Vararg{Any,N} where N})
|
||||
@@ -369,6 +368,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Array{Function,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Array{Int64,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Array{String,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Base.OneTo{Int64},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Formatted{Array{Int64,1}},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Function,Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},RecipeData,Symbol,Int64,Vararg{Any,N} where N})
|
||||
@@ -454,6 +454,7 @@ function _precompile_()
|
||||
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(iter_segments),Base.OneTo{Int64},UnitRange{Int64}})
|
||||
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}})
|
||||
@@ -465,9 +466,10 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(plot),Plots.Plot{Plots.PlotlyBackend},Plots.Plot{Plots.PlotlyBackend}})
|
||||
Base.precompile(Tuple{typeof(plot),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Function})
|
||||
Base.precompile(Tuple{typeof(push!),Plots.Plot{Plots.GRBackend},Float64,Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(push!),Segments{Float64},Float64,Int64,Int64,Float64,Vararg{Float64,N} where N})
|
||||
Base.precompile(Tuple{typeof(setindex!),Dict{Any,Any},Plots.Plot{Plots.GRBackend},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(similar),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}}}},Type{Nothing}})
|
||||
Base.precompile(Tuple{typeof(spy),SparseArrays.SparseMatrixCSC{Float64,Int64}})
|
||||
Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(text),String,Int64,Symbol,Vararg{Symbol,N} where N})
|
||||
|
||||
+1
-1
@@ -189,9 +189,9 @@ import RecipesPipeline: SliceIt,
|
||||
|
||||
include("types.jl")
|
||||
include("utils.jl")
|
||||
include("components.jl")
|
||||
include("axes.jl")
|
||||
include("args.jl")
|
||||
include("components.jl")
|
||||
include("themes.jl")
|
||||
include("plot.jl")
|
||||
include("pipeline.jl")
|
||||
|
||||
+123
-11
@@ -1,21 +1,34 @@
|
||||
function makeplural(s::Symbol)
|
||||
str = string(s)
|
||||
if last(str) != 's'
|
||||
return Symbol(string(s,"s"))
|
||||
end
|
||||
return s
|
||||
end
|
||||
|
||||
function make_non_underscore(s::Symbol)
|
||||
str = string(s)
|
||||
str = replace(str, "_" => "")
|
||||
return Symbol(str)
|
||||
end
|
||||
|
||||
const _keyAliases = Dict{Symbol,Symbol}()
|
||||
|
||||
function add_aliases(sym::Symbol, aliases::Symbol...)
|
||||
for alias in aliases
|
||||
if haskey(_keyAliases, alias)
|
||||
error("Already an alias $alias => $(_keyAliases[alias])... can't also alias $sym")
|
||||
if haskey(_keyAliases, alias) || alias === sym
|
||||
return nothing
|
||||
end
|
||||
_keyAliases[alias] = sym
|
||||
end
|
||||
return nothing
|
||||
end
|
||||
|
||||
function add_non_underscore_aliases!(aliases::Dict{Symbol,Symbol})
|
||||
for (k,v) in aliases
|
||||
s = string(k)
|
||||
if '_' in s
|
||||
aliases[Symbol(replace(s, "_" => ""))] = v
|
||||
aliases[make_non_underscore(k)] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -24,7 +37,7 @@ function add_non_underscore_aliases!(aliases::Dict{Symbol,Symbol}, args::Vector{
|
||||
for arg in args
|
||||
s = string(arg)
|
||||
if '_' in s
|
||||
aliases[Symbol(replace(s, "_" => ""))] = arg
|
||||
aliases[make_non_underscore(arg)] = arg
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -111,6 +124,31 @@ const _styleAliases = Dict{Symbol,Symbol}(
|
||||
:ddd => :dashdotdot,
|
||||
)
|
||||
|
||||
const _shape_keys = Symbol[
|
||||
:circle,
|
||||
:rect,
|
||||
:star5,
|
||||
:diamond,
|
||||
:hexagon,
|
||||
:cross,
|
||||
:xcross,
|
||||
:utriangle,
|
||||
:dtriangle,
|
||||
:rtriangle,
|
||||
:ltriangle,
|
||||
:pentagon,
|
||||
:heptagon,
|
||||
:octagon,
|
||||
:star4,
|
||||
:star6,
|
||||
:star7,
|
||||
:star8,
|
||||
:vline,
|
||||
:hline,
|
||||
:+,
|
||||
:x,
|
||||
]
|
||||
|
||||
const _allMarkers = vcat(:none, :auto, _shape_keys) #sort(collect(keys(_shapes))))
|
||||
const _markerAliases = Dict{Symbol,Symbol}(
|
||||
:n => :none,
|
||||
@@ -491,7 +529,7 @@ const _all_series_args = sort(union([_series_args; _magic_series_args]))
|
||||
const _all_plot_args = _plot_args
|
||||
|
||||
const _all_args =
|
||||
sort([_all_axis_args; _all_subplot_args; _all_series_args; _all_plot_args])
|
||||
sort(union([_all_axis_args; _all_subplot_args; _all_series_args; _all_plot_args]))
|
||||
|
||||
is_subplot_attr(k) = k in _all_subplot_args
|
||||
is_series_attr(k) = k in _all_series_args
|
||||
@@ -502,9 +540,6 @@ RecipesBase.is_key_supported(k::Symbol) = is_attr_supported(k)
|
||||
is_default_attribute(k) = k in _internal_args || k in _all_args || is_axis_attr_noletter(k)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
makeplural(s::Symbol) = Symbol(string(s,"s"))
|
||||
|
||||
autopick_ignore_none_auto(arr::AVec, idx::Integer) = _cycle(setdiff(arr, [:none, :auto]), idx)
|
||||
autopick_ignore_none_auto(notarr, idx::Integer) = notarr
|
||||
|
||||
@@ -646,10 +681,10 @@ add_aliases(:contour_labels, :contourlabels, :clabels, :clabs)
|
||||
add_aliases(:warn_on_unsupported, :warn)
|
||||
|
||||
# add all pluralized forms to the _keyAliases dict
|
||||
for arg in keys(_series_defaults)
|
||||
_keyAliases[makeplural(arg)] = arg
|
||||
for arg in _all_args
|
||||
add_aliases(arg, makeplural(arg))
|
||||
end
|
||||
|
||||
# add all non_underscored forms to the _keyAliases
|
||||
add_non_underscore_aliases!(_keyAliases)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -1697,3 +1732,80 @@ function _series_index(plotattributes, sp)
|
||||
end
|
||||
return idx
|
||||
end
|
||||
|
||||
#--------------------------------------------------
|
||||
## inspired by Base.@kwdef
|
||||
macro add_attributes( level, expr )
|
||||
expr = macroexpand(__module__, expr) # to expand @static
|
||||
expr isa Expr && expr.head === :struct || error("Invalid usage of @add_attributes")
|
||||
T = expr.args[2]
|
||||
if T isa Expr && T.head === :<:
|
||||
T = T.args[1]
|
||||
end
|
||||
|
||||
key_args = Any[]
|
||||
value_args = Any[]
|
||||
|
||||
_splitdef!(expr.args[3], value_args, key_args)
|
||||
|
||||
insert_block = Expr(:block)
|
||||
for (key, value) in zip(key_args, value_args)
|
||||
# e.g. _series_defualts[key] = value
|
||||
exp_key = Symbol(lowercase(string(T)), "_", key)
|
||||
pl_key = makeplural(exp_key)
|
||||
push!(insert_block.args, Expr(
|
||||
:(=), Expr(:ref, Symbol("_", level, "_defaults"), QuoteNode(exp_key)), value
|
||||
))
|
||||
push!(insert_block.args, :(
|
||||
add_aliases($(QuoteNode(exp_key)), $(QuoteNode(pl_key)))
|
||||
))
|
||||
push!(insert_block.args, :(
|
||||
add_aliases($(QuoteNode(exp_key)), $(QuoteNode(make_non_underscore(exp_key))))
|
||||
))
|
||||
push!(insert_block.args, :(
|
||||
add_aliases($(QuoteNode(exp_key)), $(QuoteNode(make_non_underscore(pl_key))))
|
||||
))
|
||||
end
|
||||
return quote
|
||||
$expr
|
||||
$insert_block
|
||||
end |> esc
|
||||
end
|
||||
|
||||
function _splitdef!(blk, value_args, key_args)
|
||||
for i in eachindex(blk.args)
|
||||
ei = blk.args[i]
|
||||
if ei isa Symbol
|
||||
# var
|
||||
continue
|
||||
elseif ei isa Expr
|
||||
if ei.head === :(=)
|
||||
lhs = ei.args[1]
|
||||
if lhs isa Symbol
|
||||
# var = defexpr
|
||||
var = lhs
|
||||
elseif lhs isa Expr && lhs.head === :(::) && lhs.args[1] isa Symbol
|
||||
# var::T = defexpr
|
||||
var = lhs.args[1]
|
||||
else
|
||||
# something else, e.g. inline inner constructor
|
||||
# F(...) = ...
|
||||
continue
|
||||
end
|
||||
defexpr = ei.args[2] # defexpr
|
||||
push!(value_args, defexpr)
|
||||
push!(key_args, var)
|
||||
blk.args[i] = lhs
|
||||
elseif ei.head === :(::) && ei.args[1] isa Symbol
|
||||
# var::Typ
|
||||
var = ei.args[1]
|
||||
push!(value_args, var)
|
||||
push!(key_args, var)
|
||||
elseif ei.head === :block
|
||||
# can arise with use of @static inside type decl
|
||||
_kwdef!(ei, value_args, key_args)
|
||||
end
|
||||
end
|
||||
end
|
||||
blk
|
||||
end
|
||||
|
||||
@@ -818,6 +818,7 @@ const _pgfplotsx_seriestype = [
|
||||
:surface,
|
||||
:wireframe,
|
||||
:heatmap,
|
||||
:mesh3d,
|
||||
:contour,
|
||||
:contour3d,
|
||||
:quiver,
|
||||
|
||||
+2
-1
@@ -1451,7 +1451,8 @@ function gr_label_axis_3d(sp, letter)
|
||||
x_offset = -gr_axis_width(sp, ax)
|
||||
y_offset = 0
|
||||
end
|
||||
gr_text(x + x_offset, y - y_offset, ax[:guide])
|
||||
letter === :z && GR.setcharup(-1, 0)
|
||||
gr_text(x + x_offset, y + y_offset, ax[:guide])
|
||||
GR.restorestate()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -527,6 +527,17 @@ function pgfx_add_series!(::Val{:heatmap}, axis, series_opt, series, series_func
|
||||
pgfx_add_legend!(axis, series, opt)
|
||||
end
|
||||
|
||||
function pgfx_add_series!(::Val{:mesh3d}, axis, series_opt, series, series_func, opt)
|
||||
ptable = join([ string(i, " ", j, " ", k, "\\\\") for (i, j, k) in zip(opt[:connections]...) ], "\n ")
|
||||
push!(
|
||||
series_opt,
|
||||
"patch" => nothing,
|
||||
"table/row sep" => "\\\\",
|
||||
"patch table" => ptable
|
||||
)
|
||||
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)
|
||||
|
||||
@@ -882,9 +882,8 @@ html_body(plt::Plot{PlotlyBackend}) = plotly_html_body(plt)
|
||||
const ijulia_initialized = Ref(false)
|
||||
|
||||
function plotly_html_head(plt::Plot)
|
||||
local_file = ("file:///" * plotly_local_file_path[])
|
||||
plotly =
|
||||
use_local_dependencies[] ? local_file : "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
||||
use_local_dependencies[] ? ("file:///" * plotly_local_file_path[]) : "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
||||
|
||||
include_mathjax = get(plt[:extra_plot_kwargs], :include_mathjax, "")
|
||||
mathjax_file = include_mathjax != "cdn" ? ("file://" * include_mathjax) : "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"
|
||||
|
||||
@@ -911,7 +911,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
|
||||
fig = plt.o
|
||||
|
||||
if RecipesPipeline.is3d(sp)
|
||||
if RecipesPipeline.is3d(sp) || ispolar(sp)
|
||||
cbax = fig."add_axes"([0.9, 0.1, 0.03, 0.8])
|
||||
cb = fig."colorbar"(handle; cax=cbax, kw...)
|
||||
else
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
const P2 = GeometryTypes.Point2{Float64}
|
||||
const P3 = GeometryTypes.Point3{Float64}
|
||||
|
||||
@@ -77,7 +75,6 @@ function weave(x,y; ordering = Vector[x,y])
|
||||
ret
|
||||
end
|
||||
|
||||
|
||||
"create a star by weaving together points from an outer and inner circle. `n` is the number of arms"
|
||||
function makestar(n; offset = -0.5, radius = 1.0)
|
||||
z1 = offset * π
|
||||
@@ -93,7 +90,6 @@ function makeshape(n; offset = -0.5, radius = 1.0)
|
||||
Shape(partialcircle(z, z + 2π, n+1, radius))
|
||||
end
|
||||
|
||||
|
||||
function makecross(; offset = -0.5, radius = 1.0)
|
||||
z2 = offset * π
|
||||
z1 = z2 - π/8
|
||||
@@ -103,7 +99,6 @@ function makecross(; offset = -0.5, radius = 1.0)
|
||||
ordering=Vector[outercircle,innercircle,outercircle]))
|
||||
end
|
||||
|
||||
|
||||
from_polar(angle, dist) = P2(dist*cos(angle), dist*sin(angle))
|
||||
|
||||
function makearrowhead(angle; h = 2.0, w = 0.4)
|
||||
@@ -112,31 +107,6 @@ function makearrowhead(angle; h = 2.0, w = 0.4)
|
||||
from_polar(angle + 0.5π, w) - tip, (0,0)])
|
||||
end
|
||||
|
||||
const _shape_keys = Symbol[
|
||||
:circle,
|
||||
:rect,
|
||||
:star5,
|
||||
:diamond,
|
||||
:hexagon,
|
||||
:cross,
|
||||
:xcross,
|
||||
:utriangle,
|
||||
:dtriangle,
|
||||
:rtriangle,
|
||||
:ltriangle,
|
||||
:pentagon,
|
||||
:heptagon,
|
||||
:octagon,
|
||||
:star4,
|
||||
:star6,
|
||||
:star7,
|
||||
:star8,
|
||||
:vline,
|
||||
:hline,
|
||||
:+,
|
||||
:x,
|
||||
]
|
||||
|
||||
const _shapes = KW(
|
||||
:circle => makeshape(20),
|
||||
:rect => makeshape(4, offset=-0.25),
|
||||
|
||||
+21
-5
@@ -1000,8 +1000,8 @@ const _examples = PlotExample[
|
||||
"Mesh3d",
|
||||
"""
|
||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||
You can also specify the connections using the connections keyword. This is only supported on the Plotly backend.
|
||||
The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle,
|
||||
You can also specify the connections using the connections keyword.
|
||||
The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle,
|
||||
such that elements at the same position of these vectors form a triangle.
|
||||
""",
|
||||
[
|
||||
@@ -1048,6 +1048,25 @@ const _examples = PlotExample[
|
||||
heatmap(z, projection = :polar)
|
||||
end]
|
||||
),
|
||||
PlotExample( # 50
|
||||
"3D surface with axis guides",
|
||||
"",
|
||||
[quote
|
||||
f(x,a) = 1/x + a*x^2
|
||||
xs = collect(0.1:0.05:2.0);
|
||||
as = collect(0.2:0.1:2.0);
|
||||
|
||||
x_grid = [x for x in xs for y in as];
|
||||
a_grid = [y for x in xs for y in as];
|
||||
|
||||
plot(x_grid, a_grid, f.(x_grid,a_grid),
|
||||
st = :surface,
|
||||
xlabel = "longer xlabel",
|
||||
ylabel = "longer ylabel",
|
||||
zlabel = "longer zlabel",
|
||||
)
|
||||
end]
|
||||
),
|
||||
]
|
||||
|
||||
# Some constants for PlotDocs and PlotReferenceImages
|
||||
@@ -1057,16 +1076,13 @@ _backend_skips = Dict(
|
||||
:pyplot => [2, 25, 30, 31, 47, 49],
|
||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49],
|
||||
:plotly => [2, 21, 24, 25, 30, 31, 49],
|
||||
:pgfplots => [2, 5, 6, 10, 16, 20, 22, 23, 25, 28, 30, 31, 34, 37, 38, 39, 47],
|
||||
:pgfplotsx => [
|
||||
2, # animation
|
||||
6, # images
|
||||
16, # pgfplots thinks the upper panel is too small
|
||||
25, # @df
|
||||
30, # @df
|
||||
31, # animation
|
||||
32, # spy
|
||||
47, # mesh3
|
||||
49, # polar heatmap
|
||||
],
|
||||
)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ const use_local_plotlyjs = Ref(false)
|
||||
|
||||
function _init_ijulia_plotting()
|
||||
# IJulia is more stable with local file
|
||||
use_local_plotlyjs[] = isfile(plotly_local_file_path[])
|
||||
use_local_plotlyjs[] = plotly_local_file_path[] === nothing ? false : isfile(plotly_local_file_path[])
|
||||
|
||||
ENV["MPLBACKEND"] = "Agg"
|
||||
end
|
||||
|
||||
+7
-11
@@ -1,7 +1,8 @@
|
||||
using REPL
|
||||
using Pkg.Artifacts
|
||||
using Scratch
|
||||
|
||||
const plotly_local_file_path = Ref{Union{Nothing, String}}(nothing)
|
||||
|
||||
const plotly_local_file_path = Ref("")
|
||||
|
||||
function _plots_defaults()
|
||||
if isdefined(Main, :PLOTS_DEFAULTS)
|
||||
@@ -77,17 +78,12 @@ function __init__()
|
||||
end
|
||||
end
|
||||
|
||||
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == true
|
||||
artifact_toml = joinpath(@__DIR__, "Artifacts.toml")
|
||||
|
||||
plotly_sha = artifact_hash("plotly", artifact_toml)
|
||||
if plotly_sha === nothing || !artifact_exists(plotly_sha)
|
||||
plotly_sha = create_artifact() do artifact_dir
|
||||
download("https://cdn.plot.ly/plotly-1.54.2.min.js", joinpath(artifact_dir, "plotly-1.54.2.min.js"))
|
||||
end
|
||||
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
|
||||
global plotly_local_file_path[] = joinpath(@get_scratch!("plotly"), "plotly-1.54.2.min.js")
|
||||
if !isfile(plotly_local_file_path[])
|
||||
download("https://cdn.plot.ly/plotly-1.54.2.min.js", plotly_local_file_path[])
|
||||
end
|
||||
|
||||
plotly_local_file_path[] = joinpath(artifact_path(plotly_sha), "plotly-1.54.2.min.js")
|
||||
use_local_plotlyjs[] = true
|
||||
end
|
||||
|
||||
|
||||
@@ -12,13 +12,7 @@ elseif !ismultios && !ismultiversion
|
||||
_precompile_()
|
||||
else
|
||||
@static if Sys.islinux()
|
||||
@static if v"1.3.0-DEV" <= VERSION <= v"1.3.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.3/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.4.0-DEV" <= VERSION <= v"1.4.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.4/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
@static if v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
else
|
||||
@@ -27,13 +21,7 @@ else
|
||||
end
|
||||
|
||||
elseif Sys.iswindows()
|
||||
@static if v"1.3.0-DEV" <= VERSION <= v"1.3.9"
|
||||
include("../deps/SnoopCompile/precompile/windows/1.3/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.4.0-DEV" <= VERSION <= v"1.4.9"
|
||||
include("../deps/SnoopCompile/precompile/windows/1.4/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
@static if v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
include("../deps/SnoopCompile/precompile/windows/1.5/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
else
|
||||
@@ -42,13 +30,7 @@ else
|
||||
end
|
||||
|
||||
elseif Sys.isapple()
|
||||
@static if v"1.3.0-DEV" <= VERSION <= v"1.3.9"
|
||||
include("../deps/SnoopCompile/precompile/apple/1.3/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.4.0-DEV" <= VERSION <= v"1.4.9"
|
||||
include("../deps/SnoopCompile/precompile/apple/1.4/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
@static if v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
include("../deps/SnoopCompile/precompile/apple/1.5/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
else
|
||||
@@ -57,13 +39,7 @@ else
|
||||
end
|
||||
|
||||
else
|
||||
@static if v"1.3.0-DEV" <= VERSION <= v"1.3.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.3/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.4.0-DEV" <= VERSION <= v"1.4.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.4/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
elseif v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
@static if v"1.5.0-DEV" <= VERSION <= v"1.5.9"
|
||||
include("../deps/SnoopCompile/precompile/linux/1.5/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
else
|
||||
|
||||
+1
-1
@@ -1007,7 +1007,7 @@ export lens!
|
||||
# add subplot
|
||||
for series in sp.series_list
|
||||
@series begin
|
||||
plotattributes = merge(plotattributes, copy(series.plotattributes))
|
||||
plotattributes = merge(backup, copy(series.plotattributes))
|
||||
subplot := lens_index
|
||||
primary := false
|
||||
xlims := (x1, x2)
|
||||
|
||||
@@ -11,6 +11,22 @@ import GeometryTypes, GeometryBasics
|
||||
using Dates
|
||||
using RecipesBase
|
||||
|
||||
|
||||
@testset "Plotly standalone" begin
|
||||
@test_nowarn Plots._init_ijulia_plotting()
|
||||
@test Plots.plotly_local_file_path[] === nothing
|
||||
temp = Plots.use_local_dependencies[]
|
||||
withenv("PLOTS_HOST_DEPENDENCY_LOCAL" => true) do
|
||||
Plots.__init__()
|
||||
@test Plots.plotly_local_file_path[] isa String
|
||||
@test isfile(Plots.plotly_local_file_path[])
|
||||
@test Plots.use_local_dependencies[] = true
|
||||
@test_nowarn Plots._init_ijulia_plotting()
|
||||
end
|
||||
Plots.plotly_local_file_path[] = nothing
|
||||
Plots.use_local_dependencies[] = temp
|
||||
end # testset
|
||||
|
||||
include("test_defaults.jl")
|
||||
include("test_axes.jl")
|
||||
include("test_axis_letter.jl")
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using Plots, Test
|
||||
@testset "lens!" begin
|
||||
pl = plot(1:5)
|
||||
lens!(pl, [1,2], [1,2], inset = (1, bbox(0.0,0.0,0.2,0.2)))
|
||||
lens!(pl, [1,2], [1,2], inset = (1, bbox(0.0,0.0,0.2,0.2)), colorbar = false)
|
||||
@test length(pl.series_list) == 4
|
||||
@test pl[2][:colorbar] == :none
|
||||
end # testset
|
||||
|
||||
@testset "vline, vspan" begin
|
||||
|
||||
Reference in New Issue
Block a user