Compare commits
92 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fe6a69a21 | |||
| 60dcfa9a90 | |||
| 3d2f7571a0 | |||
| 86c26085b3 | |||
| 2d5ad2828b | |||
| bae04d05a3 | |||
| bd287f4656 | |||
| 638fe6d245 | |||
| 3f05dc3570 | |||
| 44150ccbe4 | |||
| c15483d593 | |||
| 363f401474 | |||
| a532c97ce2 | |||
| df07dc9377 | |||
| 9cf9edffe0 | |||
| 2ef13c19ea | |||
| 103f0b28ac | |||
| f157c8dc3f | |||
| ade0a2dfdc | |||
| 71189e113e | |||
| 9fe1f55410 | |||
| 827dba1991 | |||
| 6ac7b41eb0 | |||
| 4c7156ca5e | |||
| 9dfc33dc12 | |||
| 317069e2a8 | |||
| cb54dc071f | |||
| b413f0d44e | |||
| 1784d6179a | |||
| 954f002dfe | |||
| 083fe89905 | |||
| 5906d1c8a5 | |||
| bd46b51b94 | |||
| 63e73bc9f0 | |||
| 915eafcea0 | |||
| 63d9363505 | |||
| 721b4b1312 | |||
| f96e239bc0 | |||
| a13e137770 | |||
| 6a1af1c888 | |||
| 729219f5a0 | |||
| bdcc8cdb8d | |||
| 23b852da8f | |||
| 8255096bce | |||
| abde25efe0 | |||
| efb5816bc1 | |||
| 994b543add | |||
| bb11c62413 | |||
| b8222b46fe | |||
| 1f6244195a | |||
| f4fe4b8a05 | |||
| 514a7c4fff | |||
| 75e65bff8c | |||
| f03e8bbc83 | |||
| fc54177029 | |||
| 5a932146cf | |||
| ba09334845 | |||
| 5ccf1e965e | |||
| e932c76d93 | |||
| 078a675d1a | |||
| 408aad6e35 | |||
| f4c15b4b5b | |||
| d0c709a014 | |||
| bf8b828957 | |||
| 3964cc19a6 | |||
| 3e14a0db95 | |||
| 11f3715453 | |||
| e7ab664120 | |||
| 2aa3e1a5fc | |||
| f58100b400 | |||
| b918c509ac | |||
| 08a4b34c22 | |||
| becd95b9b5 | |||
| f0612ad1b3 | |||
| 46fbff72db | |||
| 0536be3bf7 | |||
| 86561b0af0 | |||
| 747181c370 | |||
| c3f8710175 | |||
| 4cfcef1066 | |||
| ab0cfd09a4 | |||
| cef5b0293e | |||
| 363c842ab4 | |||
| 33832fef70 | |||
| 51527705de | |||
| 44bd1812e0 | |||
| 1e536dda4b | |||
| 6a03da5837 | |||
| 9df962fcce | |||
| b46e460d12 | |||
| e1755dcee7 | |||
| 87c44e231b |
@@ -40,7 +40,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/SnoopCompileBot.jl", rev = "master") ); Pkg.develop(PackageSpec(; path=pwd())); using SnoopCompileBot; SnoopCompileBot.addtestdep();'
|
||||
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();'
|
||||
|
||||
|
||||
# TESTCMD
|
||||
@@ -72,8 +72,8 @@ jobs:
|
||||
- name: Download all
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: SnoopCompileBot postprocess
|
||||
run: julia -e 'using Pkg; Pkg.add( PackageSpec(url="https://github.com/aminya/SnoopCompileBot.jl", rev = "master") ); using SnoopCompileBot; SnoopCompileBot.postprocess();'
|
||||
- name: CompileBot postprocess
|
||||
run: julia -e 'using Pkg; Pkg.add( PackageSpec(url="https://github.com/aminya/CompileBot.jl", rev = "master") ); using CompileBot; CompileBot.postprocess();'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[plotly]
|
||||
git-tree-sha1 = "f03dd0451a05a5fdbbcb3e548998a9d7a1ab6368"
|
||||
lazy = true
|
||||
|
||||
[[plotly.download]]
|
||||
url = "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
||||
sha256 = "487f1da6b7a1f127de59af8a65bb3fe2c63d709f011afea82896bdce28ecc0f8"
|
||||
+4
-1
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.6.4"
|
||||
version = "1.6.12"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
@@ -13,9 +13,11 @@ GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
|
||||
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
|
||||
GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb"
|
||||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
|
||||
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"
|
||||
@@ -39,6 +41,7 @@ GR = "0.46, 0.47, 0.48, 0.49, 0.50, 0.51, 0.52"
|
||||
GeometryBasics = "0.2, 0.3.1"
|
||||
GeometryTypes = "0.7, 0.8"
|
||||
JSON = "0.21, 1"
|
||||
Latexify = "0.14"
|
||||
Measures = "0.3"
|
||||
NaNMath = "0.3"
|
||||
PGFPlotsX = "1.2.0"
|
||||
|
||||
@@ -226,7 +226,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
+45
-11
@@ -92,6 +92,7 @@ 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}})
|
||||
@@ -99,13 +100,14 @@ function _precompile_()
|
||||
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.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}})
|
||||
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!)})
|
||||
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}})
|
||||
@@ -170,15 +172,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{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{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.copyto_nonleaf!),Array{Symbol,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linestyle),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}}}},Base.OneTo{Int64},Int64,Int64})
|
||||
Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(Plots.label_to_string),Tuple{Base.RefValue{Symbol},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.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_z_normalized),Tuple{Array{Float64,1},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._cbar_unique),Array{Int64,1},String})
|
||||
@@ -195,9 +198,12 @@ function _precompile_()
|
||||
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},Array{Float64,1}}})
|
||||
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{String,1},Array{Float64,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{Plots.Spy}})
|
||||
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.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}}})
|
||||
@@ -213,6 +219,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}})
|
||||
@@ -224,6 +231,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{UnitRange{Int64}}})
|
||||
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_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})
|
||||
@@ -239,27 +247,44 @@ 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),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}})
|
||||
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_marker),Plots.Series,Float64,Float64,Tuple{Float64,Float64},Int64,Int64,Int64,Symbol})
|
||||
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}}})
|
||||
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_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}})
|
||||
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,Array{Float64,1},Array{Float64,1},Nothing,Tuple{Float64,Float64}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Int64,1},Array{Float64,1},Nothing,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,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,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_legend_pos),Plots.Subplot{Plots.GRBackend},Array{Float64,1},Array{Float64,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_label_ticks),Plots.Subplot{Plots.GRBackend},Symbol,Tuple{Array{Float64,1},Array{Any,1}}})
|
||||
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})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_text),Float64,Float64,String})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_polyline3d),Array{Float64,1},Array{Float64,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_update_viewport_legend!),Array{Float64,1},Plots.Subplot{Plots.GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor),NTuple{9,Float64}}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_update_viewport_legend!),Array{Float64,1},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}}})
|
||||
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),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_uniformly_spaced),Array{Float64,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.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,StepRange{Int64,Int64}})
|
||||
@@ -290,7 +315,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
@@ -312,11 +336,12 @@ 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(RecipesPipeline.postprocess_axis_args!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Symbol})
|
||||
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}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Array{T,1} where T,1},Vararg{Any,N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Array{T,1} where T,1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Complex{Float64},1}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.GRBackend},Array{RecipeData,1},Symbol,Array{Float64,2}})
|
||||
@@ -436,6 +461,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.PlotlyBackend},RecipesPipeline.DefaultsDict,Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(annotate!),Array{Tuple{Int64,Float64,Plots.PlotText},1}})
|
||||
Base.precompile(Tuple{typeof(backend),Plots.PlotlyBackend})
|
||||
Base.precompile(Tuple{typeof(bar),Array{Float64,1}})
|
||||
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(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Array{Any,1}}}})
|
||||
@@ -443,15 +469,17 @@ function _precompile_()
|
||||
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{1},Tuple{Base.OneTo{Int64}},typeof(Plots.gr_color),Tuple{Array{RGBA{Float64},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(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(frame),Animation,Plots.Plot{Plots.GRBackend}})
|
||||
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},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),Array{Int64,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(iterate),Base.Iterators.Enumerate{Tuple{Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend},Plots.Plot{Plots.GRBackend}}},Tuple{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}})
|
||||
@@ -463,6 +491,7 @@ 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{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(stroke),Int64,Vararg{Any,N} where N})
|
||||
@@ -580,6 +609,11 @@ function _precompile_()
|
||||
precompile(fbody, (Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:line, :leg, :fill),Tuple{Int64,Bool,Tuple{Int64,Symbol}}}},typeof(plot),Function,Vararg{Any,N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(RecipesBase.plot, (Function,Vararg{Any,N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:ylims, :leg),Tuple{Tuple{Int64,Int64},Bool}}},typeof(plot),Function,Vararg{Any,N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(RecipesBase.plot, (StepRange{Int64,Int64},Vararg{Any,N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Base.Iterators.Pairs{Symbol,Any,NTuple{5,Symbol},NamedTuple{(:lab, :w, :palette, :fill, :α),Tuple{String,Int64,PlotUtils.ContinuousColorGradient,Int64,Float64}}},typeof(plot),StepRange{Int64,Int64},Vararg{Any,N} where N,))
|
||||
|
||||
+588
-607
File diff suppressed because it is too large
Load Diff
@@ -227,7 +227,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
@@ -285,7 +285,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
@@ -285,7 +285,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
@@ -226,7 +226,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
+44
-13
@@ -103,12 +103,15 @@ 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{(: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}})
|
||||
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!)})
|
||||
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}})
|
||||
@@ -168,17 +171,19 @@ 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{Plots.Plot},Plots.GRBackend,Int64,RecipesPipeline.DefaultsDict,Array{Plots.Series,1},Nothing,Array{Plots.Subplot,1},Dict{Any,Plots.Subplot},Plots.EmptyLayout,Array{Plots.Subplot,1},Bool})
|
||||
Base.precompile(Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(Plots.get_linealpha),Tuple{Array{Any,1}}})
|
||||
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_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}}}}})
|
||||
Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_z_normalized),Tuple{Array{Float64,1},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._cbar_unique),Array{Int64,1},String})
|
||||
@@ -196,8 +201,12 @@ function _precompile_()
|
||||
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{Function,1},Int64}})
|
||||
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{Float64,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{Plots.Spy}})
|
||||
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.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}}})
|
||||
@@ -213,6 +222,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}})
|
||||
@@ -239,35 +249,50 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Int64,1},Array{String,1}}})
|
||||
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),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}})
|
||||
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_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}}})
|
||||
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_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},Int64,Int64})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Int64,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,Float64,Float64,Tuple{Float64,Float64},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,Array{Float64,1},Array{Float64,1},Nothing,Tuple{Float64,Float64}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Int64,1},Array{Float64,1},Nothing,Tuple{Float64,Float64}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_draw_segments),Plots.Series,Array{Int64,1},Array{Int64,1},Nothing,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,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,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_legend_pos),Plots.Subplot{Plots.GRBackend},Array{Float64,1},Array{Float64,1},Array{Float64,1}})
|
||||
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_text),Float64,Float64,String})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_polyline3d),Array{Float64,1},Array{Float64,1},Array{Float64,1}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_update_viewport_legend!),Array{Float64,1},Plots.Subplot{Plots.GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor),NTuple{9,Float64}}})
|
||||
Base.precompile(Tuple{typeof(Plots.gr_update_viewport_legend!),Array{Float64,1},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}}})
|
||||
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),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.intersection_point),Float64,Float64,Float64,Float64,Float64,Float64})
|
||||
Base.precompile(Tuple{typeof(Plots.is_uniformly_spaced),Array{Float64,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.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,Symbol})
|
||||
Base.precompile(Tuple{typeof(Plots.processFontArg!),Dict{Symbol,Any},Symbol,String})
|
||||
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}})
|
||||
@@ -292,8 +317,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(Plots.treats_y_as_x),Array{Symbol,2}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
@@ -316,7 +339,9 @@ 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},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.PlotlyBackend},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}})
|
||||
@@ -446,14 +471,19 @@ function _precompile_()
|
||||
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{1},Tuple{Base.OneTo{Int64}},typeof(Plots.gr_color),Tuple{Array{RGBA{Float64},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(Plots.axis_limits),Tuple{Base.RefValue{Plots.Subplot{Plots.GRBackend}},Tuple{Symbol,Symbol}}}})
|
||||
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(heatmap),Array{Dates.DateTime,1},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),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(ohlc),Array{OHLC,1}})
|
||||
Base.precompile(Tuple{typeof(plot!),Array{Float64,2}})
|
||||
Base.precompile(Tuple{typeof(plot!),Array{Tuple{Int64,Real},1}})
|
||||
@@ -465,6 +495,7 @@ 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(setindex!),Dict{Any,Plots.Subplot},Plots.Subplot{Plots.GRBackend},Symbol})
|
||||
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(stroke),Int64,Vararg{Any,N} where N})
|
||||
|
||||
@@ -286,7 +286,6 @@ function _precompile_()
|
||||
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(Plots.transpose_z),Plots.Series,Array{Float64,2},Bool})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{Complex{Float64},1}})
|
||||
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}})
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
using SnoopCompileBot
|
||||
using CompileBot
|
||||
|
||||
snoop_bench(
|
||||
BotConfig(
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
using SnoopCompileBot
|
||||
using CompileBot
|
||||
|
||||
snoop_bot(
|
||||
BotConfig(
|
||||
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
|
||||
#TODO: download https://cdn.plot.ly/plotly-1.54.2.min.js to deps/ if it doesn't exist
|
||||
file_path = ""
|
||||
if get(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL", "false") == "true"
|
||||
global file_path
|
||||
local_fn = joinpath(dirname(@__FILE__), "plotly-1.54.2.min.js")
|
||||
if !isfile(local_fn)
|
||||
@info("Cannot find deps/plotly-1.54.2.min.js... downloading latest version.")
|
||||
download("https://cdn.plot.ly/plotly-1.54.2.min.js", local_fn)
|
||||
isfile(local_fn) && (file_path = local_fn)
|
||||
else
|
||||
file_path = local_fn
|
||||
end
|
||||
end
|
||||
|
||||
open("deps.jl", "w") do io
|
||||
println(io, "const plotly_local_file_path = $(repr(file_path))")
|
||||
end
|
||||
+9
-14
@@ -10,7 +10,7 @@ using Reexport
|
||||
|
||||
import GeometryTypes, GeometryBasics
|
||||
using Dates, Printf, Statistics, Base64, LinearAlgebra, Random
|
||||
import SparseArrays: AbstractSparseMatrix, findnz
|
||||
using SparseArrays
|
||||
|
||||
using FFMPEG
|
||||
|
||||
@@ -25,17 +25,6 @@ import JSON
|
||||
|
||||
using Requires
|
||||
|
||||
if isfile(joinpath(@__DIR__, "..", "deps", "deps.jl"))
|
||||
include(joinpath(@__DIR__, "..", "deps", "deps.jl"))
|
||||
else
|
||||
# This is a bit dirty, but I don't really see why anyone should be forced
|
||||
# to build Plots, while it will just include exactly the below line
|
||||
# as long as `ENV["PLOTS_HOST_DEPENDENCY_LOCAL"] = "true"` is not set.
|
||||
# If the above env is set + `plotly_local_file_path == ""``,
|
||||
# it will warn in the __init__ function to run build
|
||||
const plotly_local_file_path = ""
|
||||
end
|
||||
|
||||
export
|
||||
grid,
|
||||
bbox,
|
||||
@@ -165,6 +154,12 @@ const BBox = Measures.Absolute2DBox
|
||||
# allow pixels and percentages
|
||||
const px = AbsoluteLength(0.254)
|
||||
const pct = Length{:pct, Float64}(1.0)
|
||||
|
||||
Base.:*(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * m2.value)
|
||||
Base.:*(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * m1.value)
|
||||
Base.:/(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value / m2.value)
|
||||
Base.:/(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value / m1.value)
|
||||
|
||||
export BBox, BoundingBox, mm, cm, inch, px, pct, pt, w, h
|
||||
end
|
||||
|
||||
@@ -229,8 +224,8 @@ let PlotOrSubplot = Union{Plot, Subplot}
|
||||
global xlims!(plt::PlotOrSubplot, xmin::Real, xmax::Real; kw...) = plot!(plt; xlims = (xmin,xmax), kw...)
|
||||
global ylims!(plt::PlotOrSubplot, ymin::Real, ymax::Real; kw...) = plot!(plt; ylims = (ymin,ymax), kw...)
|
||||
global zlims!(plt::PlotOrSubplot, zmin::Real, zmax::Real; kw...) = plot!(plt; zlims = (zmin,zmax), kw...)
|
||||
global xticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) where {T<:Real} = plot!(plt; xticks = ticks, kw...)
|
||||
global yticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) where {T<:Real} = plot!(plt; yticks = ticks, kw...)
|
||||
global xticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; xticks = ticks, kw...)
|
||||
global yticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; yticks = ticks, kw...)
|
||||
global xticks!(plt::PlotOrSubplot,
|
||||
ticks::AVec{T}, labels::AVec{S}; kw...) where {T<:Real,S<:AbstractString} = plot!(plt; xticks = (ticks,labels), kw...)
|
||||
global yticks!(plt::PlotOrSubplot,
|
||||
|
||||
+8
-3
@@ -280,8 +280,6 @@ const _series_defaults = KW(
|
||||
:show_empty_bins => false, # should empty bins in 2D histogram be colored as zero (otherwise they are transparent)
|
||||
:contours => false, # add contours to 3d surface and wireframe plots
|
||||
:contour_labels => false,
|
||||
:match_dimensions => false, # do rows match x (true) or y (false) for heatmap/image/spy? see issue 196
|
||||
# this ONLY effects whether or not the z-matrix is transposed for a heatmap display!
|
||||
:subplot => :auto, # which subplot(s) does this series belong to?
|
||||
:series_annotations => nothing, # a list of annotations which apply to the coordinates of this series
|
||||
:primary => true, # when true, this "counts" as a series for color selection, etc. the main use is to allow
|
||||
@@ -629,7 +627,6 @@ add_aliases(:quiver, :velocity, :quiver2d, :gradient, :vectorfield)
|
||||
add_aliases(:normalize, :norm, :normed, :normalized)
|
||||
add_aliases(:show_empty_bins, :showemptybins, :showempty, :show_empty)
|
||||
add_aliases(:aspect_ratio, :aspectratio, :axis_ratio, :axisratio, :ratio)
|
||||
add_aliases(:match_dimensions, :transpose, :transpose_z)
|
||||
add_aliases(:subplot, :sp, :subplt, :splt)
|
||||
add_aliases(:projection, :proj)
|
||||
add_aliases(:titlelocation, :title_location, :title_loc, :titleloc, :title_position, :title_pos, :titlepos, :titleposition, :title_align, :title_alignment)
|
||||
@@ -1535,8 +1532,16 @@ function _update_subplot_args(plt::Plot, sp::Subplot, plotattributes_in, subplot
|
||||
_update_subplot_periphery(sp, anns)
|
||||
_update_subplot_colors(sp)
|
||||
|
||||
lims_warned = false
|
||||
for letter in (:x, :y, :z)
|
||||
_update_axis(plt, sp, plotattributes_in, letter, subplot_index)
|
||||
lk = Symbol(letter, :lims)
|
||||
|
||||
# warn against using `Range` in x,y,z lims
|
||||
if !lims_warned && haskey(plotattributes_in, lk) && plotattributes_in[lk] isa AbstractRange
|
||||
@warn("lims should be a Tuple, not $(typeof(plotattributes_in[lk])).")
|
||||
lims_warned = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+277
-396
@@ -213,48 +213,51 @@ function optimal_ticks_and_labels(sp::Subplot, axis::Axis, ticks = nothing)
|
||||
end
|
||||
|
||||
# return (continuous_values, discrete_values) for the ticks on this axis
|
||||
function get_ticks(sp::Subplot, axis::Axis)
|
||||
ticks = _transform_ticks(axis[:ticks])
|
||||
ticks in (:none, nothing, false) && return nothing
|
||||
function get_ticks(sp::Subplot, axis::Axis; update = true)
|
||||
if update || !haskey(axis.plotattributes, :optimized_ticks)
|
||||
ticks = _transform_ticks(axis[:ticks])
|
||||
if ticks in (:none, nothing, false)
|
||||
axis.plotattributes[:optimized_ticks] = nothing
|
||||
else
|
||||
# treat :native ticks as :auto
|
||||
ticks = ticks == :native ? :auto : ticks
|
||||
|
||||
# treat :native ticks as :auto
|
||||
ticks = ticks == :native ? :auto : ticks
|
||||
|
||||
dvals = axis[:discrete_values]
|
||||
cv, dv = if typeof(ticks) <: Symbol
|
||||
if !isempty(dvals)
|
||||
# discrete ticks...
|
||||
n = length(dvals)
|
||||
rng = if ticks == :auto
|
||||
Int[round(Int,i) for i in range(1, stop=n, length=min(n,15))]
|
||||
else # if ticks == :all
|
||||
1:n
|
||||
dvals = axis[:discrete_values]
|
||||
cv, dv = if typeof(ticks) <: Symbol
|
||||
if !isempty(dvals)
|
||||
# discrete ticks...
|
||||
n = length(dvals)
|
||||
rng = if ticks == :auto
|
||||
Int[round(Int,i) for i in range(1, stop=n, length=min(n,15))]
|
||||
else # if ticks == :all
|
||||
1:n
|
||||
end
|
||||
axis[:continuous_values][rng], dvals[rng]
|
||||
elseif ispolar(axis.sps[1]) && axis[:letter] == :x
|
||||
#force theta axis to be full circle
|
||||
(collect(0:pi/4:7pi/4), string.(0:45:315))
|
||||
else
|
||||
# compute optimal ticks and labels
|
||||
optimal_ticks_and_labels(sp, axis)
|
||||
end
|
||||
elseif typeof(ticks) <: Union{AVec, Int}
|
||||
if !isempty(dvals) && typeof(ticks) <: Int
|
||||
rng = Int[round(Int,i) for i in range(1, stop=length(dvals), length=ticks)]
|
||||
axis[:continuous_values][rng], dvals[rng]
|
||||
else
|
||||
# override ticks, but get the labels
|
||||
optimal_ticks_and_labels(sp, axis, ticks)
|
||||
end
|
||||
elseif typeof(ticks) <: NTuple{2, Any}
|
||||
# assuming we're passed (ticks, labels)
|
||||
ticks
|
||||
else
|
||||
error("Unknown ticks type in get_ticks: $(typeof(ticks))")
|
||||
end
|
||||
axis[:continuous_values][rng], dvals[rng]
|
||||
elseif ispolar(axis.sps[1]) && axis[:letter] == :x
|
||||
#force theta axis to be full circle
|
||||
(collect(0:pi/4:7pi/4), string.(0:45:315))
|
||||
else
|
||||
# compute optimal ticks and labels
|
||||
optimal_ticks_and_labels(sp, axis)
|
||||
axis.plotattributes[:optimized_ticks] = (cv, dv)
|
||||
end
|
||||
elseif typeof(ticks) <: Union{AVec, Int}
|
||||
if !isempty(dvals) && typeof(ticks) <: Int
|
||||
rng = Int[round(Int,i) for i in range(1, stop=length(dvals), length=ticks)]
|
||||
axis[:continuous_values][rng], dvals[rng]
|
||||
else
|
||||
# override ticks, but get the labels
|
||||
optimal_ticks_and_labels(sp, axis, ticks)
|
||||
end
|
||||
elseif typeof(ticks) <: NTuple{2, Any}
|
||||
# assuming we're passed (ticks, labels)
|
||||
ticks
|
||||
else
|
||||
error("Unknown ticks type in get_ticks: $(typeof(ticks))")
|
||||
end
|
||||
# @show ticks dvals cv dv
|
||||
|
||||
return cv, dv
|
||||
axis.plotattributes[:optimized_ticks]
|
||||
end
|
||||
|
||||
_transform_ticks(ticks) = ticks
|
||||
@@ -578,391 +581,269 @@ end
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# compute the line segments which should be drawn for this axis
|
||||
function axis_drawing_info(sp::Subplot)
|
||||
xaxis, yaxis = sp[:xaxis], sp[:yaxis]
|
||||
xmin, xmax = axis_limits(sp, :x)
|
||||
ymin, ymax = axis_limits(sp, :y)
|
||||
xticks = get_ticks(sp, xaxis)
|
||||
yticks = get_ticks(sp, yaxis)
|
||||
xminorticks = get_minor_ticks(sp, xaxis, xticks)
|
||||
yminorticks = get_minor_ticks(sp, yaxis, yticks)
|
||||
xaxis_segs = Segments(2)
|
||||
yaxis_segs = Segments(2)
|
||||
xtick_segs = Segments(2)
|
||||
ytick_segs = Segments(2)
|
||||
xgrid_segs = Segments(2)
|
||||
ygrid_segs = Segments(2)
|
||||
xminorgrid_segs = Segments(2)
|
||||
yminorgrid_segs = Segments(2)
|
||||
xborder_segs = Segments(2)
|
||||
yborder_segs = Segments(2)
|
||||
function axis_drawing_info(sp, letter)
|
||||
# find out which axis we are dealing with
|
||||
asym = Symbol(letter, :axis)
|
||||
isy = letter === :y
|
||||
oletter = isy ? :x : :y
|
||||
oasym = Symbol(oletter, :axis)
|
||||
|
||||
# get axis objects, ticks and minor ticks
|
||||
ax, oax = sp[asym], sp[oasym]
|
||||
amin, amax = axis_limits(sp, letter)
|
||||
oamin, oamax = axis_limits(sp, oletter)
|
||||
ticks = get_ticks(sp, ax, update = false)
|
||||
minor_ticks = get_minor_ticks(sp, ax, ticks)
|
||||
|
||||
# initialize the segments
|
||||
segments = Segments(2)
|
||||
tick_segments = Segments(2)
|
||||
grid_segments = Segments(2)
|
||||
minorgrid_segments = Segments(2)
|
||||
border_segments = Segments(2)
|
||||
|
||||
if sp[:framestyle] != :none
|
||||
# xaxis
|
||||
y1, y2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
oa1, oa2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(xaxis[:mirror], yaxis[:flip]) ? (ymax, ymin) : (ymin, ymax)
|
||||
xor(ax[:mirror], oax[:flip]) ? (oamax, oamin) : (oamin, oamax)
|
||||
end
|
||||
if xaxis[:showaxis]
|
||||
if ax[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(xaxis_segs, (xmin, y1), (xmax, y1))
|
||||
push!(segments, reverse_if((amin, oa1), isy), reverse_if((amax, oa1), isy))
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(xticks in (:none, nothing, false)) && length(xticks) > 1
|
||||
showticks = xticks[1] .!= 0
|
||||
xticks = (xticks[1][showticks], xticks[2][showticks])
|
||||
if sp[:framestyle] == :origin && !(ticks in (:none, nothing, false)) && length(ticks) > 1
|
||||
i = findfirst(==(0), ticks[1])
|
||||
if i !== nothing
|
||||
deleteat!(ticks[1], i)
|
||||
deleteat!(ticks[2], i)
|
||||
end
|
||||
end
|
||||
end
|
||||
sp[:framestyle] in (:semi, :box) && push!(xborder_segs, (xmin, y2), (xmax, y2)) # top spine
|
||||
if sp[:framestyle] in (:semi, :box) # top spine
|
||||
push!(
|
||||
border_segments,
|
||||
reverse_if((amin, oa2), isy),
|
||||
reverse_if((amax, oa2), isy),
|
||||
)
|
||||
end
|
||||
end
|
||||
if !(xaxis[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(yaxis[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(yaxis[:scale])
|
||||
if !(ax[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(oax[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(oax[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(ymax) - f(ymin)))
|
||||
t = invf(f(0) + 0.012 * (f(oamax) - f(oamin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = xaxis[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(y1) + 0.012 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
ticks_in = ax[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(oa1) + 0.012 * (f(oa2) - f(oa1)) * ticks_in)
|
||||
(oa1, t)
|
||||
end
|
||||
|
||||
for xtick in xticks[1]
|
||||
if xaxis[:showaxis]
|
||||
push!(xtick_segs, (xtick, tick_start), (xtick, tick_stop)) # bottom tick
|
||||
for tick in ticks[1]
|
||||
if ax[:showaxis]
|
||||
push!(
|
||||
tick_segments,
|
||||
reverse_if((tick, tick_start), isy),
|
||||
reverse_if((tick, tick_stop), isy),
|
||||
)
|
||||
end
|
||||
if ax[:grid]
|
||||
push!(
|
||||
grid_segments,
|
||||
reverse_if((tick, oamin), isy),
|
||||
reverse_if((tick, oamax), isy),
|
||||
)
|
||||
end
|
||||
xaxis[:grid] && push!(xgrid_segs, (xtick, ymin), (xtick, ymax)) # vertical grid
|
||||
end
|
||||
|
||||
if !(xaxis[:minorticks] in (:none, nothing, false)) || xaxis[:minorgrid]
|
||||
if !(ax[:minorticks] in (:none, nothing, false)) || ax[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(ymax) - f(ymin)))
|
||||
t = invf(f(0) + 0.006 * (f(oamax) - f(oamin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(y1) + 0.006 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
t = invf(f(oa1) + 0.006 * (f(oa2) - f(oa1)) * ticks_in)
|
||||
(oa1, t)
|
||||
end
|
||||
for xtick in xminorticks
|
||||
if xaxis[:showaxis]
|
||||
push!(xtick_segs, (xtick, tick_start), (xtick, tick_stop)) # bottom tick
|
||||
for tick in minor_ticks
|
||||
if ax[:showaxis]
|
||||
push!(
|
||||
tick_segments,
|
||||
reverse_if((tick, tick_start), isy),
|
||||
reverse_if((tick, tick_stop), isy),
|
||||
)
|
||||
end
|
||||
xaxis[:minorgrid] && push!(xminorgrid_segs, (xtick, ymin), (xtick, ymax)) # vertical grid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# yaxis
|
||||
x1, x2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(yaxis[:mirror], xaxis[:flip]) ? (xmax, xmin) : (xmin, xmax)
|
||||
end
|
||||
if yaxis[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(yaxis_segs, (x1, ymin), (x1, ymax))
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(yticks in (:none, nothing,false)) && length(yticks) > 1
|
||||
showticks = yticks[1] .!= 0
|
||||
yticks = (yticks[1][showticks], yticks[2][showticks])
|
||||
end
|
||||
end
|
||||
sp[:framestyle] in (:semi, :box) && push!(yborder_segs, (x2, ymin), (x2, ymax)) # right spine
|
||||
end
|
||||
if !(yaxis[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(xaxis[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(xaxis[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(xmax) - f(xmin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = yaxis[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(x1) + 0.012 * (f(x2) - f(x1)) * ticks_in)
|
||||
(x1, t)
|
||||
end
|
||||
|
||||
for ytick in yticks[1]
|
||||
if yaxis[:showaxis]
|
||||
push!(ytick_segs, (tick_start, ytick), (tick_stop, ytick)) # left tick
|
||||
end
|
||||
yaxis[:grid] && push!(ygrid_segs, (xmin, ytick), (xmax, ytick)) # horizontal grid
|
||||
end
|
||||
|
||||
if !(yaxis[:minorticks] in (:none, nothing, false)) || yaxis[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(xmax) - f(xmin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(x1) + 0.006 * (f(x2) - f(x1)) * ticks_in)
|
||||
(x1, t)
|
||||
end
|
||||
for ytick in yminorticks
|
||||
if yaxis[:showaxis]
|
||||
push!(ytick_segs, (tick_start, ytick), (tick_stop, ytick)) # left tick
|
||||
end
|
||||
yaxis[:minorgrid] && push!(yminorgrid_segs, (xmin, ytick), (xmax, ytick)) # horizontal grid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
xticks, yticks, xaxis_segs, yaxis_segs, xtick_segs, ytick_segs, xgrid_segs, ygrid_segs, xminorgrid_segs, yminorgrid_segs, xborder_segs, yborder_segs
|
||||
end
|
||||
|
||||
|
||||
function axis_drawing_info_3d(sp::Subplot)
|
||||
xaxis, yaxis, zaxis = sp[:xaxis], sp[:yaxis], sp[:zaxis]
|
||||
xmin, xmax = axis_limits(sp, :x)
|
||||
ymin, ymax = axis_limits(sp, :y)
|
||||
zmin, zmax = axis_limits(sp, :z)
|
||||
xticks = get_ticks(sp, xaxis)
|
||||
yticks = get_ticks(sp, yaxis)
|
||||
zticks = get_ticks(sp, zaxis)
|
||||
xminorticks = get_minor_ticks(sp, xaxis, xticks)
|
||||
yminorticks = get_minor_ticks(sp, yaxis, yticks)
|
||||
zminorticks = get_minor_ticks(sp, zaxis, zticks)
|
||||
xaxis_segs = Segments(3)
|
||||
yaxis_segs = Segments(3)
|
||||
zaxis_segs = Segments(3)
|
||||
xtick_segs = Segments(3)
|
||||
ytick_segs = Segments(3)
|
||||
ztick_segs = Segments(3)
|
||||
xgrid_segs = Segments(3)
|
||||
ygrid_segs = Segments(3)
|
||||
zgrid_segs = Segments(3)
|
||||
xminorgrid_segs = Segments(3)
|
||||
yminorgrid_segs = Segments(3)
|
||||
zminorgrid_segs = Segments(3)
|
||||
xborder_segs = Segments(3)
|
||||
yborder_segs = Segments(3)
|
||||
zborder_segs = Segments(3)
|
||||
|
||||
if sp[:framestyle] != :none
|
||||
|
||||
# xaxis
|
||||
y1, y2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(xaxis[:mirror], yaxis[:flip]) ? (ymax, ymin) : (ymin, ymax)
|
||||
end
|
||||
z1, z2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(xaxis[:mirror], zaxis[:flip]) ? (zmax, zmin) : (zmin, zmax)
|
||||
end
|
||||
if xaxis[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(xaxis_segs, (xmin, y1, z1), (xmax, y1, z1))
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(xticks in (:none, nothing, false)) && length(xticks) > 1
|
||||
showticks = xticks[1] .!= 0
|
||||
xticks = (xticks[1][showticks], xticks[2][showticks])
|
||||
end
|
||||
end
|
||||
sp[:framestyle] in (:semi, :box) && push!(xborder_segs, (xmin, y2, z2), (xmax, y2, z2)) # top spine
|
||||
end
|
||||
if !(xaxis[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(yaxis[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(yaxis[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(ymax) - f(ymin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = xaxis[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(y1) + 0.012 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
end
|
||||
|
||||
for xtick in xticks[1]
|
||||
if xaxis[:showaxis]
|
||||
push!(xtick_segs, (xtick, tick_start, z1), (xtick, tick_stop, z1)) # bottom tick
|
||||
end
|
||||
if xaxis[:grid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(xgrid_segs, (xtick, ymin, 0.0), (xtick, ymax, 0.0))
|
||||
push!(xgrid_segs, (xtick, 0.0, zmin), (xtick, 0.0, zmax))
|
||||
else
|
||||
push!(xgrid_segs, (xtick, y1, z1), (xtick, y2, z1))
|
||||
push!(xgrid_segs, (xtick, y2, z1), (xtick, y2, z2))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if !(xaxis[:minorticks] in (:none, nothing, false)) || xaxis[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(ymax) - f(ymin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(y1) + 0.006 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
end
|
||||
for xtick in xminorticks
|
||||
if xaxis[:showaxis]
|
||||
push!(xtick_segs, (xtick, tick_start, z1), (xtick, tick_stop, z1)) # bottom tick
|
||||
end
|
||||
if xaxis[:minorgrid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(xminorgrid_segs, (xtick, ymin, 0.0), (xtick, ymax, 0.0))
|
||||
push!(xminorgrid_segs, (xtick, 0.0, zmin), (xtick, 0.0, zmax))
|
||||
else
|
||||
push!(xminorgrid_segs, (xtick, y1, z1), (xtick, y2, z1))
|
||||
push!(xminorgrid_segs, (xtick, y2, z1), (xtick, y2, z2))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# yaxis
|
||||
x1, x2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(yaxis[:mirror], xaxis[:flip]) ? (xmin, xmax) : (xmax, xmin)
|
||||
end
|
||||
z1, z2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(yaxis[:mirror], zaxis[:flip]) ? (zmax, zmin) : (zmin, zmax)
|
||||
end
|
||||
if yaxis[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(yaxis_segs, (x1, ymin, z1), (x1, ymax, z1))
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(yticks in (:none, nothing,false)) && length(yticks) > 1
|
||||
showticks = yticks[1] .!= 0
|
||||
yticks = (yticks[1][showticks], yticks[2][showticks])
|
||||
end
|
||||
end
|
||||
sp[:framestyle] in (:semi, :box) && push!(yborder_segs, (x2, ymin, z2), (x2, ymax, z2)) # right spine
|
||||
end
|
||||
if !(yaxis[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(xaxis[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(xaxis[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(xmax) - f(xmin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = yaxis[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(x1) + 0.012 * (f(x2) - f(x1)) * ticks_in)
|
||||
(x1, t)
|
||||
end
|
||||
|
||||
for ytick in yticks[1]
|
||||
if yaxis[:showaxis]
|
||||
push!(ytick_segs, (tick_start, ytick, z1), (tick_stop, ytick, z1)) # left tick
|
||||
end
|
||||
if yaxis[:grid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(ygrid_segs, (xmin, ytick, 0.0), (xmax, ytick, 0.0))
|
||||
push!(ygrid_segs, (0.0, ytick, zmin), (0.0, ytick, zmax))
|
||||
else
|
||||
push!(ygrid_segs, (x1, ytick, z1), (x2, ytick, z1))
|
||||
push!(ygrid_segs, (x2, ytick, z1), (x2, ytick, z2))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if !(yaxis[:minorticks] in (:none, nothing, false)) || yaxis[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(xmax) - f(xmin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(x1) + 0.006 * (f(x2) - f(x1)) * ticks_in)
|
||||
(x1, t)
|
||||
end
|
||||
for ytick in yminorticks
|
||||
if yaxis[:showaxis]
|
||||
push!(ytick_segs, (tick_start, ytick, z1), (tick_stop, ytick, z1)) # left tick
|
||||
end
|
||||
if yaxis[:minorgrid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(yminorgrid_segs, (xmin, ytick, 0.0), (xmax, ytick, 0.0))
|
||||
push!(yminorgrid_segs, (0.0, ytick, zmin), (0.0, ytick, zmax))
|
||||
else
|
||||
push!(yminorgrid_segs, (x1, ytick, z1), (x2, ytick, z1))
|
||||
push!(yminorgrid_segs, (x2, ytick, z1), (x2, ytick, z2))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# zaxis
|
||||
x1, x2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(zaxis[:mirror], xaxis[:flip]) ? (xmax, xmin) : (xmin, xmax)
|
||||
end
|
||||
y1, y2 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0.0, 0.0
|
||||
else
|
||||
xor(zaxis[:mirror], yaxis[:flip]) ? (ymax, ymin) : (ymin, ymax)
|
||||
end
|
||||
if zaxis[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(zaxis_segs, (x1, y1, zmin), (x1, y1, zmax))
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(zticks in (:none, nothing,false)) && length(zticks) > 1
|
||||
showticks = zticks[1] .!= 0
|
||||
zticks = (zticks[1][showticks], zticks[2][showticks])
|
||||
end
|
||||
end
|
||||
sp[:framestyle] in (:semi, :box) && push!(zborder_segs, (x2, y2, zmin), (x2, y2, zmax))
|
||||
end
|
||||
if !(zaxis[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(xaxis[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(xaxis[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(ymax) - f(ymin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = zaxis[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(y1) + 0.012 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
end
|
||||
|
||||
for ztick in zticks[1]
|
||||
if zaxis[:showaxis]
|
||||
push!(ztick_segs, (x1, tick_start, ztick), (x1, tick_stop, ztick)) # left tick
|
||||
end
|
||||
if zaxis[:grid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(zgrid_segs, (xmin, 0.0, ztick), (xmax, 0.0, ztick))
|
||||
push!(ygrid_segs, (0.0, ymin, ztick), (0.0, ymax, ztick))
|
||||
else
|
||||
push!(ygrid_segs, (x1, y1, ztick), (x1, y2, ztick))
|
||||
push!(ygrid_segs, (x1, y2, ztick), (x2, y2, ztick))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if !(zaxis[:minorticks] in (:none, nothing, false)) || zaxis[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(ymax) - f(ymin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(y1) + 0.006 * (f(y2) - f(y1)) * ticks_in)
|
||||
(y1, t)
|
||||
end
|
||||
for ztick in zminorticks
|
||||
if zaxis[:showaxis]
|
||||
push!(ztick_segs, (x1, tick_start, ztick), (x1, tick_stop, ztick)) # left tick
|
||||
end
|
||||
if zaxis[:minorgrid]
|
||||
if sp[:framestyle] in (:origin, :zerolines)
|
||||
push!(zminorgrid_segs, (xmin, 0.0, ztick), (xmax, 0.0, ztick))
|
||||
push!(zminorgrid_segs, (0.0, ymin, ztick), (0.0, ymax, ztick))
|
||||
else
|
||||
push!(zminorgrid_segs, (x1, y1, ztick), (x1, y2, ztick))
|
||||
push!(zminorgrid_segs, (x1, y2, ztick), (x2, y2, ztick))
|
||||
end
|
||||
if ax[:minorgrid]
|
||||
push!(
|
||||
minorgrid_segments,
|
||||
reverse_if((tick, oamin), isy),
|
||||
reverse_if((tick, oamax), isy),
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
xticks, yticks, zticks, xaxis_segs, yaxis_segs, zaxis_segs, xtick_segs, ytick_segs, ztick_segs, xgrid_segs, ygrid_segs, zgrid_segs, xminorgrid_segs, yminorgrid_segs, zminorgrid_segs, xborder_segs, yborder_segs, zborder_segs
|
||||
return (
|
||||
ticks = ticks,
|
||||
segments = segments,
|
||||
tick_segments = tick_segments,
|
||||
grid_segments = grid_segments,
|
||||
minorgrid_segments = minorgrid_segments,
|
||||
border_segments = border_segments
|
||||
)
|
||||
end
|
||||
|
||||
function sort_3d_axes(a, b, c, letter)
|
||||
if letter === :x
|
||||
a, b, c
|
||||
elseif letter === :y
|
||||
b, a, c
|
||||
else
|
||||
c, b, a
|
||||
end
|
||||
end
|
||||
|
||||
function axis_drawing_info_3d(sp, letter)
|
||||
near_letter = letter in (:x, :z) ? :y : :x
|
||||
far_letter = letter in (:x, :y) ? :z : :x
|
||||
|
||||
ax = sp[Symbol(letter, :axis)]
|
||||
nax = sp[Symbol(near_letter, :axis)]
|
||||
fax = sp[Symbol(far_letter, :axis)]
|
||||
|
||||
amin, amax = axis_limits(sp, letter)
|
||||
namin, namax = axis_limits(sp, near_letter)
|
||||
famin, famax = axis_limits(sp, far_letter)
|
||||
|
||||
ticks = get_ticks(sp, ax, update = false)
|
||||
minor_ticks = get_minor_ticks(sp, ax, ticks)
|
||||
|
||||
# initialize the segments
|
||||
segments = Segments(3)
|
||||
tick_segments = Segments(3)
|
||||
grid_segments = Segments(3)
|
||||
minorgrid_segments = Segments(3)
|
||||
border_segments = Segments(3)
|
||||
|
||||
|
||||
if sp[:framestyle] != :none# && letter === :x
|
||||
na0, na1 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0, 0
|
||||
else
|
||||
# reverse_if((namin, namax), xor(ax[:mirror], nax[:flip]))
|
||||
reverse_if(reverse_if((namin, namax), letter === :y), xor(ax[:mirror], nax[:flip]))
|
||||
end
|
||||
fa0, fa1 = if sp[:framestyle] in (:origin, :zerolines)
|
||||
0, 0
|
||||
else
|
||||
reverse_if((famin, famax), xor(ax[:mirror], fax[:flip]))
|
||||
end
|
||||
if ax[:showaxis]
|
||||
if sp[:framestyle] != :grid
|
||||
push!(
|
||||
segments,
|
||||
sort_3d_axes(amin, na0, fa0, letter),
|
||||
sort_3d_axes(amax, na0, fa0, letter),
|
||||
)
|
||||
# don't show the 0 tick label for the origin framestyle
|
||||
if sp[:framestyle] == :origin && !(ticks in (:none, nothing, false)) && length(ticks) > 1
|
||||
i0 = findfirst(==(0), ticks[1])
|
||||
if ind !== nothing
|
||||
deleteat!(ticks[1], i0)
|
||||
deleteat!(ticks[2], i0)
|
||||
end
|
||||
end
|
||||
end
|
||||
if sp[:framestyle] in (:semi, :box)
|
||||
push!(
|
||||
border_segments,
|
||||
sort_3d_axes(amin, na1, fa1, letter),
|
||||
sort_3d_axes(amax, na1, fa1, letter),
|
||||
)
|
||||
end
|
||||
end
|
||||
# TODO this can be simplified, we do almost the same thing twice for grid and minorgrid
|
||||
if !(ax[:ticks] in (:none, nothing, false))
|
||||
f = RecipesPipeline.scale_func(nax[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(nax[:scale])
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(namax) - f(namin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = ax[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(na0) + 0.012 * (f(na1) - f(na0)) * ticks_in)
|
||||
(na0, t)
|
||||
end
|
||||
|
||||
ga0, ga1 = sp[:framestyle] in (:origin, :zerolines) ? (namin, namax) : (na0, na1)
|
||||
for tick in ticks[1]
|
||||
if ax[:showaxis]
|
||||
push!(
|
||||
tick_segments,
|
||||
sort_3d_axes(tick, tick_start, fa0, letter),
|
||||
sort_3d_axes(tick, tick_stop, fa0, letter),
|
||||
)
|
||||
end
|
||||
if ax[:grid]
|
||||
push!(
|
||||
grid_segments,
|
||||
sort_3d_axes(tick, ga0, fa0, letter),
|
||||
sort_3d_axes(tick, ga1, fa0, letter),
|
||||
)
|
||||
push!(
|
||||
grid_segments,
|
||||
sort_3d_axes(tick, ga1, fa0, letter),
|
||||
sort_3d_axes(tick, ga1, fa1, letter),
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if !(ax[:minorticks] in (:none, nothing, false)) || ax[:minorgrid]
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.006 * (f(namax) - f(namin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(na0) + 0.006 * (f(na1) - f(na0)) * ticks_in)
|
||||
(na0, t)
|
||||
end
|
||||
for tick in minorticks
|
||||
if ax[:showaxis]
|
||||
push!(
|
||||
tick_segments,
|
||||
sort_3d_axes(tick, tick_start, fa0, letter),
|
||||
sort_3d_axes(tick, tick_stop, fa0, letter),
|
||||
)
|
||||
end
|
||||
if ax[:minorgrid]
|
||||
push!(
|
||||
minorgrid_segments,
|
||||
sort_3d_axes(tick, ga0, fa0, letter),
|
||||
sort_3d_axes(tick, ga1, fa0, letter),
|
||||
)
|
||||
push!(
|
||||
minorgrid_segments,
|
||||
sort_3d_axes(tick, ga1, fa0, letter),
|
||||
sort_3d_axes(tick, ga1, fa1, letter),
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return (
|
||||
ticks = ticks,
|
||||
segments = segments,
|
||||
tick_segments = tick_segments,
|
||||
grid_segments = grid_segments,
|
||||
minorgrid_segments = minorgrid_segments,
|
||||
border_segments = border_segments
|
||||
)
|
||||
end
|
||||
|
||||
reverse_if(x, cond) = cond ? reverse(x) : x
|
||||
axis_tuple(x, y, letter) = reverse_if((x, y), letter === :y)
|
||||
|
||||
axes_shift(t, i) = i % 3 == 0 ? t : i % 3 == 1 ? (t[3], t[1], t[2]) : (t[2], t[3], t[1])
|
||||
+3
-9
@@ -316,7 +316,6 @@ const _gr_attr = merge_with_base_supported([
|
||||
:layout,
|
||||
:title, :window_title,
|
||||
:guide, :lims, :ticks, :scale, :flip,
|
||||
:match_dimensions,
|
||||
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
||||
:titlefontrotation, :titlefontcolor,
|
||||
:legendfontfamily, :legendfontsize, :legendfonthalign, :legendfontvalign,
|
||||
@@ -367,10 +366,10 @@ is_marker_supported(::GRBackend, shape::Shape) = true
|
||||
function _initialize_backend(pkg::PlotlyBackend)
|
||||
try
|
||||
@eval Main begin
|
||||
import ORCA
|
||||
import PlotlyBase
|
||||
end
|
||||
catch
|
||||
@info "For saving to png with the Plotly backend ORCA has to be installed."
|
||||
@info "For saving to png with the Plotly backend PlotlyBase has to be installed."
|
||||
end
|
||||
end
|
||||
|
||||
@@ -472,7 +471,6 @@ const _pgfplots_attr = merge_with_base_supported([
|
||||
:polar,
|
||||
# :normalize, :weights, :contours,
|
||||
:aspect_ratio,
|
||||
# :match_dimensions,
|
||||
:tick_direction,
|
||||
:framestyle,
|
||||
:camera,
|
||||
@@ -488,7 +486,7 @@ const _pgfplots_scale = [:identity, :ln, :log2, :log10]
|
||||
|
||||
function _initialize_backend(pkg::PlotlyJSBackend)
|
||||
@eval Main begin
|
||||
import PlotlyJS, ORCA
|
||||
import PlotlyJS
|
||||
export PlotlyJS
|
||||
end
|
||||
end
|
||||
@@ -541,7 +539,6 @@ const _pyplot_attr = merge_with_base_supported([
|
||||
:polar,
|
||||
:normalize, :weights,
|
||||
:contours, :aspect_ratio,
|
||||
:match_dimensions,
|
||||
:clims,
|
||||
:inset_subplots,
|
||||
:dpi,
|
||||
@@ -627,7 +624,6 @@ const _hdf5_attr = merge_with_base_supported([
|
||||
:polar,
|
||||
:normalize, :weights,
|
||||
:contours, :aspect_ratio,
|
||||
:match_dimensions,
|
||||
:clims,
|
||||
:inset_subplots,
|
||||
:dpi,
|
||||
@@ -700,7 +696,6 @@ const _inspectdr_attr = merge_with_base_supported([
|
||||
:polar,
|
||||
# :normalize, :weights,
|
||||
# :contours, :aspect_ratio,
|
||||
:match_dimensions,
|
||||
# :clims,
|
||||
# :inset_subplots,
|
||||
:dpi,
|
||||
@@ -761,7 +756,6 @@ const _pgfplotsx_attr = merge_with_base_supported([
|
||||
:ticks,
|
||||
:scale,
|
||||
:flip,
|
||||
:match_dimensions,
|
||||
:titlefontfamily,
|
||||
:titlefontsize,
|
||||
:titlefonthalign,
|
||||
|
||||
+797
-987
File diff suppressed because it is too large
Load Diff
+69
-10
@@ -1,5 +1,6 @@
|
||||
using Contour: Contour
|
||||
using UUIDs
|
||||
using Latexify
|
||||
Base.@kwdef mutable struct PGFPlotsXPlot
|
||||
is_created::Bool = false
|
||||
was_shown::Bool = false
|
||||
@@ -72,6 +73,9 @@ function surface_to_vecs(x::AVec, y::AVec, s::Union{AMat,Surface})
|
||||
yn = Vector{eltype(y)}(undef, length(a))
|
||||
zn = Vector{eltype(s)}(undef, length(a))
|
||||
for (n, (i, j)) in enumerate(Tuple.(CartesianIndices(a)))
|
||||
if length(x) == size(s)[1]
|
||||
i, j = j, i
|
||||
end
|
||||
xn[n] = x[j]
|
||||
yn[n] = y[i]
|
||||
zn[n] = a[i, j]
|
||||
@@ -327,7 +331,7 @@ end
|
||||
## seriestype specifics
|
||||
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...))
|
||||
series_plot = series_func(series_opt, PGFPlotsX.Table(args...))
|
||||
push!(axis, series_plot)
|
||||
pgfx_add_legend!(axis, series, opt)
|
||||
end
|
||||
@@ -396,10 +400,53 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
|
||||
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)
|
||||
# handle arrows
|
||||
arrow = opt[:arrow]
|
||||
if arrow isa Arrow
|
||||
arrow_opt = merge(
|
||||
segment_opt,
|
||||
PGFPlotsX.Options("quiver" => PGFPlotsX.Options(
|
||||
"u" => "\\thisrow{u}",
|
||||
"v" => "\\thisrow{v}",
|
||||
pgfx_arrow(arrow, :head) => nothing,
|
||||
)
|
||||
)
|
||||
)
|
||||
if arrow.side == :head
|
||||
x_arrow = opt[:x][rng][end-1:end]
|
||||
y_arrow = opt[:y][rng][end-1:end]
|
||||
x_path = opt[:x][rng][1:end-1]
|
||||
y_path = opt[:y][rng][1:end-1]
|
||||
elseif arrow.side == :tail
|
||||
x_arrow = opt[:x][rng][2:-1:1]
|
||||
y_arrow = opt[:y][rng][2:-1:1]
|
||||
x_path = opt[:x][rng][2:end]
|
||||
y_path = opt[:y][rng][2:end]
|
||||
elseif arrow.side == :both
|
||||
x_arrow = opt[:x][rng][[2,1,end-1,end]]
|
||||
y_arrow = opt[:y][rng][[2,1,end-1,end]]
|
||||
x_path = opt[:x][rng][2:end-1]
|
||||
y_path = opt[:y][rng][2:end-1]
|
||||
end
|
||||
coordinates = PGFPlotsX.Table([
|
||||
:x => x_arrow[1:2:end-1],
|
||||
:y => y_arrow[1:2:end-1],
|
||||
:u => [x_arrow[i] - x_arrow[i-1] for i in 2:2:lastindex(x_arrow)],
|
||||
:v => [y_arrow[i] - y_arrow[i-1] for i in 2:2:lastindex(y_arrow)],
|
||||
])
|
||||
arrow_plot =
|
||||
series_func(merge(series_opt, arrow_opt), coordinates)
|
||||
push!(axis, arrow_plot)
|
||||
coordinates = PGFPlotsX.Table(x_path, y_path)
|
||||
segment_plot =
|
||||
series_func(merge(series_opt, segment_opt), coordinates)
|
||||
push!(axis, segment_plot)
|
||||
else
|
||||
coordinates = PGFPlotsX.Table(pgfx_series_arguments(series, opt, rng)...)
|
||||
segment_plot =
|
||||
series_func(merge(series_opt, segment_opt), coordinates)
|
||||
push!(axis, segment_plot)
|
||||
end
|
||||
# fill between functions
|
||||
if sf isa Tuple && series[:ribbon] === nothing
|
||||
sf1, sf2 = sf
|
||||
@@ -467,8 +514,17 @@ function pgfx_add_series!(::Val{:heatmap}, axis, series_opt, series, series_func
|
||||
"matrix plot*" => nothing,
|
||||
"mesh/rows" => length(opt[:x]),
|
||||
"mesh/cols" => length(opt[:y]),
|
||||
"point meta" => "\\thisrow{meta}",
|
||||
)
|
||||
pgfx_add_series!(axis, series_opt, series, series_func, opt)
|
||||
args = pgfx_series_arguments(series, opt)
|
||||
meta = [any(!isfinite, r) ? NaN : r[3] for r in zip(args...)]
|
||||
for arg in args
|
||||
arg[(!isfinite).(arg)] .= 0
|
||||
end
|
||||
t = PGFPlotsX.Table(["x" => args[1], "y" => args[2], "z" => args[3], "meta" => meta])
|
||||
series_plot = series_func(series_opt, t)
|
||||
push!(axis, series_plot)
|
||||
pgfx_add_legend!(axis, series, opt)
|
||||
end
|
||||
|
||||
function pgfx_add_series!(::Val{:contour}, axis, series_opt, series, series_func, opt)
|
||||
@@ -590,7 +646,7 @@ pgfx_series_arguments(series, opt, range) = (arg[range] for arg in pgfx_series_a
|
||||
function pgfx_series_arguments(series, opt)
|
||||
st = series[:seriestype]
|
||||
return if st in (:contour, :contour3d)
|
||||
opt[:x], opt[:y], Array(opt[:z])'
|
||||
opt[:x], opt[:y], handle_surface(opt[:z])
|
||||
elseif st in (:heatmap, :surface, :wireframe)
|
||||
surface_to_vecs(opt[:x], opt[:y], opt[:z])
|
||||
elseif RecipesPipeline.is3d(st)
|
||||
@@ -716,7 +772,7 @@ end
|
||||
## --------------------------------------------------------------------------------------
|
||||
# Generates a colormap for pgfplots based on a ColorGradient
|
||||
pgfx_arrow(::Nothing) = "every arrow/.append style={-}"
|
||||
function pgfx_arrow(arr::Arrow)
|
||||
function pgfx_arrow(arr::Arrow, side = arr.side)
|
||||
components = String[]
|
||||
head = String[]
|
||||
push!(head, "{stealth[length = $(arr.headlength)pt, width = $(arr.headwidth)pt")
|
||||
@@ -725,11 +781,11 @@ function pgfx_arrow(arr::Arrow)
|
||||
end
|
||||
push!(head, "]}")
|
||||
head = join(head, "")
|
||||
if arr.side == :both || arr.side == :tail
|
||||
if side == :both || side == :tail
|
||||
push!(components, head)
|
||||
end
|
||||
push!(components, "-")
|
||||
if arr.side == :both || arr.side == :head
|
||||
if side == :both || side == :head
|
||||
push!(components, head)
|
||||
end
|
||||
components = join(components, "")
|
||||
@@ -985,6 +1041,9 @@ function pgfx_sanitize_string(s::AbstractString)
|
||||
s = replace(s, r"\\?\&" => "\\&")
|
||||
s = replace(s, r"\\?\{" => "\\{")
|
||||
s = replace(s, r"\\?\}" => "\\}")
|
||||
s = map(split(s, "")) do s
|
||||
isascii(s) ? s : latexify(s)
|
||||
end |> join
|
||||
end
|
||||
@require LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" begin
|
||||
using .LaTeXStrings
|
||||
|
||||
+60
-54
@@ -120,16 +120,17 @@ end
|
||||
|
||||
|
||||
# this method gets the start/end in percentage of the canvas for this axis direction
|
||||
function plotly_domain(sp::Subplot, letter)
|
||||
function plotly_domain(sp::Subplot)
|
||||
figw, figh = sp.plt[:size]
|
||||
pcts = bbox_to_pcts(sp.plotarea, figw*px, figh*px)
|
||||
pcts = plotly_apply_aspect_ratio(sp, sp.plotarea, pcts)
|
||||
i1,i2 = (letter == :x ? (1,3) : (2,4))
|
||||
[pcts[i1], pcts[i1]+pcts[i2]]
|
||||
x_domain = [pcts[1], pcts[1] + pcts[3]]
|
||||
y_domain = [pcts[2], pcts[2] + pcts[4]]
|
||||
return x_domain, y_domain
|
||||
end
|
||||
|
||||
|
||||
function plotly_axis(plt::Plot, axis::Axis, sp::Subplot)
|
||||
function plotly_axis(axis, sp, anchor = nothing, domain = nothing)
|
||||
letter = axis[:letter]
|
||||
framestyle = sp[:framestyle]
|
||||
ax = KW(
|
||||
@@ -146,16 +147,11 @@ function plotly_axis(plt::Plot, axis::Axis, sp::Subplot)
|
||||
:mirror => framestyle == :box,
|
||||
:showticklabels => axis[:showaxis],
|
||||
)
|
||||
|
||||
if letter in (:x,:y)
|
||||
ax[:domain] = plotly_domain(sp, letter)
|
||||
if RecipesPipeline.is3d(sp)
|
||||
# don't link 3d axes for synchronized interactivity
|
||||
x_idx = y_idx = sp[:subplot_index]
|
||||
else
|
||||
x_idx, y_idx = plotly_link_indicies(plt, sp)
|
||||
end
|
||||
ax[:anchor] = "$(letter==:x ? "y$(y_idx)" : "x$(x_idx)")"
|
||||
if anchor !== nothing
|
||||
ax[:anchor] = anchor
|
||||
end
|
||||
if domain !== nothing
|
||||
ax[:domain] = domain
|
||||
end
|
||||
|
||||
ax[:tickangle] = -axis[:rotation]
|
||||
@@ -250,31 +246,38 @@ function plotly_layout(plt::Plot)
|
||||
# set to supported framestyle
|
||||
sp[:framestyle] = _plotly_framestyle(sp[:framestyle])
|
||||
|
||||
# if any(RecipesPipeline.is3d, seriesargs)
|
||||
if RecipesPipeline.is3d(sp)
|
||||
azim = sp[:camera][1] - 90 #convert azimuthal to match GR behaviour
|
||||
theta = 90 - sp[:camera][2] #spherical coordinate angle from z axis
|
||||
plotattributes_out[:scene] = KW(
|
||||
Symbol("xaxis$(spidx)") => plotly_axis(plt, sp[:xaxis], sp),
|
||||
Symbol("yaxis$(spidx)") => plotly_axis(plt, sp[:yaxis], sp),
|
||||
Symbol("zaxis$(spidx)") => plotly_axis(plt, sp[:zaxis], sp),
|
||||
|
||||
#2.6 multiplier set camera eye such that whole plot can be seen
|
||||
:camera => KW(
|
||||
:eye => KW(
|
||||
:x => cosd(azim)*sind(theta)*2.6,
|
||||
:y => sind(azim)*sind(theta)*2.6,
|
||||
:z => cosd(theta)*2.6,
|
||||
),
|
||||
),
|
||||
)
|
||||
elseif ispolar(sp)
|
||||
if ispolar(sp)
|
||||
plotattributes_out[Symbol("angularaxis$(spidx)")] = plotly_polaraxis(sp, sp[:xaxis])
|
||||
plotattributes_out[Symbol("radialaxis$(spidx)")] = plotly_polaraxis(sp, sp[:yaxis])
|
||||
else
|
||||
plotattributes_out[Symbol("xaxis$(x_idx)")] = plotly_axis(plt, sp[:xaxis], sp)
|
||||
# don't allow yaxis to be reupdated/reanchored in a linked subplot
|
||||
spidx == y_idx ? plotattributes_out[Symbol("yaxis$(y_idx)")] = plotly_axis(plt, sp[:yaxis], sp) : nothing
|
||||
x_domain, y_domain = plotly_domain(sp)
|
||||
if RecipesPipeline.is3d(sp)
|
||||
azim = sp[:camera][1] - 90 #convert azimuthal to match GR behaviour
|
||||
theta = 90 - sp[:camera][2] #spherical coordinate angle from z axis
|
||||
plotattributes_out[Symbol(:scene, spidx)] = KW(
|
||||
:domain => KW(:x => x_domain, :y => y_domain),
|
||||
Symbol("xaxis$(spidx)") => plotly_axis(sp[:xaxis], sp),
|
||||
Symbol("yaxis$(spidx)") => plotly_axis(sp[:yaxis], sp),
|
||||
Symbol("zaxis$(spidx)") => plotly_axis(sp[:zaxis], sp),
|
||||
|
||||
#2.6 multiplier set camera eye such that whole plot can be seen
|
||||
:camera => KW(
|
||||
:eye => KW(
|
||||
:x => cosd(azim)*sind(theta)*2.6,
|
||||
:y => sind(azim)*sind(theta)*2.6,
|
||||
:z => cosd(theta)*2.6,
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
plotattributes_out[Symbol("xaxis$(x_idx)")] =
|
||||
plotly_axis(sp[:xaxis], sp, string("y", y_idx) , x_domain)
|
||||
# don't allow yaxis to be reupdated/reanchored in a linked subplot
|
||||
if spidx == y_idx
|
||||
plotattributes_out[Symbol("yaxis$(y_idx)")] =
|
||||
plotly_axis(sp[:yaxis], sp, string("x", x_idx), y_domain)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# legend
|
||||
@@ -456,7 +459,7 @@ function plotly_data(series::Series, letter::Symbol, data)
|
||||
end
|
||||
|
||||
if series[:seriestype] in (:heatmap, :contour, :surface, :wireframe, :mesh3d)
|
||||
plotly_surface_data(series, data)
|
||||
handle_surface(data)
|
||||
else
|
||||
plotly_data(data)
|
||||
end
|
||||
@@ -466,10 +469,6 @@ plotly_data(v::AbstractArray) = v
|
||||
plotly_data(surf::Surface) = surf.surf
|
||||
plotly_data(v::AbstractArray{R}) where {R<:Rational} = float(v)
|
||||
|
||||
plotly_surface_data(series::Series, a::AbstractVector) = a
|
||||
plotly_surface_data(series::Series, a::AbstractMatrix) = transpose_z(series, a, false)
|
||||
plotly_surface_data(series::Series, a::Surface) = plotly_surface_data(series, a.surf)
|
||||
|
||||
function plotly_native_data(axis::Axis, data::AbstractArray)
|
||||
if !isempty(axis[:discrete_values])
|
||||
construct_categorical_data(data, axis)
|
||||
@@ -510,9 +509,17 @@ function plotly_series(plt::Plot, series::Series)
|
||||
plotattributes_out = KW()
|
||||
|
||||
# these are the axes that the series should be mapped to
|
||||
x_idx, y_idx = plotly_link_indicies(plt, sp)
|
||||
plotattributes_out[:xaxis] = "x$(x_idx)"
|
||||
plotattributes_out[:yaxis] = "y$(y_idx)"
|
||||
if RecipesPipeline.is3d(sp)
|
||||
spidx = length(plt.subplots) > 1 ? sp[:subplot_index] : ""
|
||||
plotattributes_out[:xaxis] = "x$spidx"
|
||||
plotattributes_out[:yaxis] = "y$spidx"
|
||||
plotattributes_out[:zaxis] = "z$spidx"
|
||||
plotattributes_out[:scene] = "scene$spidx"
|
||||
else
|
||||
x_idx, y_idx = length(plt.subplots) > 1 ? plotly_link_indicies(plt, sp) : ("", "")
|
||||
plotattributes_out[:xaxis] = "x$(x_idx)"
|
||||
plotattributes_out[:yaxis] = "y$(y_idx)"
|
||||
end
|
||||
plotattributes_out[:showlegend] = should_add_to_legend(series)
|
||||
|
||||
if st == :straightline
|
||||
@@ -577,7 +584,7 @@ function plotly_series(plt::Plot, series::Series)
|
||||
plotattributes_out[:colorscale] = plotly_colorscale(series[:fillcolor], series[:fillalpha])
|
||||
plotattributes_out[:opacity] = series[:fillalpha]
|
||||
if series[:fill_z] !== nothing
|
||||
plotattributes_out[:surfacecolor] = plotly_surface_data(series, series[:fill_z])
|
||||
plotattributes_out[:surfacecolor] = handle_surface(series[:fill_z])
|
||||
end
|
||||
plotattributes_out[:showscale] = hascolorbar(sp)
|
||||
end
|
||||
@@ -585,7 +592,7 @@ function plotly_series(plt::Plot, series::Series)
|
||||
plotattributes_out[:type] = "mesh3d"
|
||||
plotattributes_out[:x], plotattributes_out[:y], plotattributes_out[:z] = x, y, z
|
||||
|
||||
if series[:connections] != nothing
|
||||
if series[:connections] !== nothing
|
||||
if typeof(series[:connections]) <: Tuple{Array,Array,Array}
|
||||
i,j,k = series[:connections]
|
||||
if !(length(i) == length(j) == length(k))
|
||||
@@ -602,9 +609,9 @@ function plotly_series(plt::Plot, series::Series)
|
||||
plotattributes_out[:color] = rgba_string(plot_color(series[:fillcolor], series[:fillalpha]))
|
||||
plotattributes_out[:opacity] = series[:fillalpha]
|
||||
if series[:fill_z] !== nothing
|
||||
plotattributes_out[:surfacecolor] = plotly_surface_data(series, series[:fill_z])
|
||||
plotattributes_out[:surfacecolor] = handle_surface(series[:fill_z])
|
||||
end
|
||||
plotattributes_out[:showscale] = hascolorbar(sp)
|
||||
plotattributes_out[:showscale] = hascolorbar(sp)
|
||||
else
|
||||
@warn("Plotly: seriestype $st isn't supported.")
|
||||
return KW()
|
||||
@@ -697,7 +704,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
||||
segments = iter_segments(series, st)
|
||||
plotattributes_outs = fill(KW(), (hasfillrange ? 2 : 1 ) * length(segments))
|
||||
|
||||
needs_scatter_fix = !isscatter && hasmarker && !any(isnan,y)
|
||||
needs_scatter_fix = !isscatter && hasmarker && !any(isnan,y) && length(segments) > 1
|
||||
|
||||
for (i,rng) in enumerate(segments)
|
||||
plotattributes_out = deepcopy(plotattributes_base)
|
||||
@@ -788,8 +795,7 @@ function plotly_series_segments(series::Series, plotattributes_base::KW, x, y, z
|
||||
else
|
||||
# if fillrange is a tuple with upper and lower limit, plotattributes_out_fillrange
|
||||
# is the series that will do the filling
|
||||
fillrng = Tuple(series[:fillrange][i][rng] for i in 1:2)
|
||||
plotattributes_out_fillrange[:x], plotattributes_out_fillrange[:y] = concatenate_fillrange(x[rng], fillrng)
|
||||
plotattributes_out_fillrange[:x], plotattributes_out_fillrange[:y] = concatenate_fillrange(x[rng], series[:fillrange])
|
||||
plotattributes_out_fillrange[:line][:width] = 0
|
||||
delete!(plotattributes_out, :fill)
|
||||
delete!(plotattributes_out, :fillcolor)
|
||||
@@ -825,8 +831,8 @@ function plotly_colorbar_hack(series::Series, plotattributes_base::KW, sym::Symb
|
||||
end
|
||||
# zrange = zmax == zmin ? 1 : zmax - zmin # if all marker_z values are the same, plot all markers same color (avoids division by zero in next line)
|
||||
plotattributes_out[:marker] = KW(
|
||||
:size => 0,
|
||||
:opacity => 0,
|
||||
:size => 1e-10,
|
||||
:opacity => 1e-10,
|
||||
:color => [0.5],
|
||||
:cmin => cmin,
|
||||
:cmax => cmax,
|
||||
@@ -876,7 +882,7 @@ 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)
|
||||
local_file = ("file:///" * plotly_local_file_path[])
|
||||
plotly =
|
||||
use_local_dependencies[] ? local_file : "https://cdn.plot.ly/plotly-1.54.2.min.js"
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
function plotlybase_syncplot(plt::Plot)
|
||||
plt.o = ORCA.PlotlyBase.Plot()
|
||||
traces = ORCA.PlotlyBase.GenericTrace[]
|
||||
plt.o = PlotlyBase.Plot()
|
||||
traces = PlotlyBase.GenericTrace[]
|
||||
for series_dict in plotly_series(plt)
|
||||
plotly_type = pop!(series_dict, :type)
|
||||
push!(traces, ORCA.PlotlyBase.GenericTrace(plotly_type; series_dict...))
|
||||
push!(traces, PlotlyBase.GenericTrace(plotly_type; series_dict...))
|
||||
end
|
||||
ORCA.PlotlyBase.addtraces!(plt.o, traces...)
|
||||
PlotlyBase.addtraces!(plt.o, traces...)
|
||||
layout = plotly_layout(plt)
|
||||
w, h = plt[:size]
|
||||
ORCA.PlotlyBase.relayout!(plt.o, layout, width = w, height = h)
|
||||
PlotlyBase.relayout!(plt.o, layout, width = w, height = h)
|
||||
return plt.o
|
||||
end
|
||||
|
||||
@@ -19,5 +19,5 @@ for (mime, fmt) in (
|
||||
"image/eps" => "eps",
|
||||
)
|
||||
@eval _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) =
|
||||
ORCA.PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt)
|
||||
PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt)
|
||||
end
|
||||
+64
-32
@@ -25,6 +25,7 @@ pycollections = PyPlot.pyimport("matplotlib.collections")
|
||||
pyart3d = PyPlot.art3D
|
||||
pyrcparams = PyPlot.PyDict(PyPlot.matplotlib."rcParams")
|
||||
|
||||
|
||||
# "support" matplotlib v1.5
|
||||
set_facecolor_sym = if PyPlot.version < v"2"
|
||||
@warn("You are using Matplotlib $(PyPlot.version), which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0")
|
||||
@@ -60,6 +61,9 @@ end
|
||||
# # anything else just gets a bluesred gradient
|
||||
# py_colormap(c, α=nothing) = py_colormap(default_gradient(), α)
|
||||
|
||||
py_handle_surface(v) = v
|
||||
py_handle_surface(z::Surface) = z.surf
|
||||
|
||||
py_color(s) = py_color(parse(Colorant, string(s)))
|
||||
py_color(c::Colorant) = (red(c), green(c), blue(c), alpha(c))
|
||||
py_color(cs::AVec) = map(py_color, cs)
|
||||
@@ -343,7 +347,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
fix_xy_lengths!(plt, series)
|
||||
|
||||
# ax = getAxis(plt, series)
|
||||
x, y, z = series[:x], series[:y], series[:z]
|
||||
x, y, z = (py_handle_surface(series[letter]) for letter in (:x, :y, :z))
|
||||
if st == :straightline
|
||||
x, y = straightline_data(series)
|
||||
elseif st == :shape
|
||||
@@ -511,16 +515,11 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
end
|
||||
|
||||
if st in (:contour, :contour3d)
|
||||
z = transpose_z(series, z.surf)
|
||||
if typeof(x)<:Plots.Surface
|
||||
x = Plots.transpose_z(series, x.surf)
|
||||
end
|
||||
if typeof(y)<:Plots.Surface
|
||||
y = Plots.transpose_z(series, y.surf)
|
||||
end
|
||||
|
||||
if st == :contour3d
|
||||
extrakw[:extend3d] = true
|
||||
if !ismatrix(x) || !ismatrix(y)
|
||||
x, y = repeat(x', length(y), 1), repeat(y, 1, length(x))
|
||||
end
|
||||
end
|
||||
|
||||
if typeof(series[:linecolor]) <: AbstractArray
|
||||
@@ -555,17 +554,17 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
end
|
||||
|
||||
if st in (:surface, :wireframe)
|
||||
if typeof(z) <: AbstractMatrix || typeof(z) <: Surface
|
||||
x, y, z = map(Array, (x,y,z))
|
||||
if z isa AbstractMatrix
|
||||
if !ismatrix(x) || !ismatrix(y)
|
||||
x = repeat(x', length(y), 1)
|
||||
y = repeat(y, 1, length(series[:x]))
|
||||
x, y = repeat(x', length(y), 1), repeat(y, 1, length(x))
|
||||
end
|
||||
z = transpose_z(series, z)
|
||||
if st == :surface
|
||||
if series[:fill_z] !== nothing
|
||||
# the surface colors are different than z-value
|
||||
extrakw[:facecolors] = py_shading(series[:fillcolor], transpose_z(series, series[:fill_z].surf))
|
||||
extrakw[:facecolors] = py_shading(
|
||||
series[:fillcolor],
|
||||
py_handle_surface(series[:fill_z]),
|
||||
)
|
||||
extrakw[:shade] = false
|
||||
else
|
||||
extrakw[:cmap] = py_fillcolormap(series)
|
||||
@@ -617,15 +616,15 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
ymin, ymax = ignorenan_extrema(series[:y])
|
||||
dx = (xmax - xmin) / (length(series[:x]) - 1) / 2
|
||||
dy = (ymax - ymin) / (length(series[:y]) - 1) / 2
|
||||
img = Array(transpose_z(series, z.surf))
|
||||
z = if eltype(img) <: Colors.AbstractGray
|
||||
float(img)
|
||||
elseif eltype(img) <: Colorant
|
||||
map(c -> Float64[red(c),green(c),blue(c),alpha(c)], img)
|
||||
z = if eltype(z) <: Colors.AbstractGray
|
||||
float(z)
|
||||
elseif eltype(z) <: Colorant
|
||||
map(c -> Float64[red(c),green(c),blue(c),alpha(c)], z)
|
||||
else
|
||||
z # hopefully it's in a data format that will "just work" with imshow
|
||||
end
|
||||
handle = ax."imshow"(z;
|
||||
handle = ax."imshow"(
|
||||
z;
|
||||
zorder = series[:series_plotindex],
|
||||
cmap = py_colormap(cgrad(plot_color([:black, :white]))),
|
||||
vmin = 0.0,
|
||||
@@ -641,7 +640,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
end
|
||||
|
||||
if st == :heatmap
|
||||
x, y, z = heatmap_edges(x, sp[:xaxis][:scale]), heatmap_edges(y, sp[:yaxis][:scale]), transpose_z(series, z.surf)
|
||||
x, y = heatmap_edges(x, sp[:xaxis][:scale], y, sp[:yaxis][:scale], size(z))
|
||||
|
||||
expand_extrema!(sp[:xaxis], x)
|
||||
expand_extrema!(sp[:yaxis], y)
|
||||
@@ -727,7 +726,15 @@ function py_set_lims(ax, sp::Subplot, axis::Axis)
|
||||
getproperty(ax, Symbol("set_", letter, "lim"))(lfrom, lto)
|
||||
end
|
||||
|
||||
py_surround_latextext(latexstring, env) = PyPlot.LaTeXStrings.latexstring(env, "{",latexstring[2:end-1],"}")
|
||||
function py_surround_latextext(latexstring, env)
|
||||
if !isempty(latexstring) && latexstring[1] == '$' && latexstring[end] == '$'
|
||||
unenclosed = latexstring[2:end-1]
|
||||
else
|
||||
unenclosed = latexstring
|
||||
end
|
||||
PyPlot.LaTeXStrings.latexstring(env, "{", unenclosed, "}")
|
||||
end
|
||||
|
||||
|
||||
function py_set_ticks(ax, ticks, letter, env)
|
||||
ticks == :auto && return
|
||||
@@ -746,7 +753,13 @@ function py_set_ticks(ax, ticks, letter, env)
|
||||
axis."set_ticks"(ticks)
|
||||
elseif ttype == :ticks_and_labels
|
||||
axis."set_ticks"(ticks[1])
|
||||
tick_labels = [py_surround_latextext(ticklabel, env) for ticklabel in ticks[2]]
|
||||
|
||||
if pyrcparams["text.usetex"]
|
||||
tick_labels = ticks[2]
|
||||
else
|
||||
tick_labels = [py_surround_latextext(ticklabel, env) for ticklabel in ticks[2]]
|
||||
end
|
||||
|
||||
axis."set_ticklabels"(tick_labels)
|
||||
else
|
||||
error("Invalid input for $(letter)ticks: $ticks")
|
||||
@@ -1007,20 +1020,39 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
end
|
||||
|
||||
# Set ticks
|
||||
fontProperties = PyPlot.PyCall.PyDict(Dict("family" => axis[:tickfontfamily],
|
||||
"size" => py_thickness_scale(plt, axis[:tickfontsize]),
|
||||
"useTex" => false,
|
||||
"rotation" => axis[:tickfontrotation]))
|
||||
getproperty(ax, Symbol("set_",letter,"ticklabels"))(getproperty(ax, Symbol("get_",letter,"ticks"))(), fontProperties)
|
||||
fontProperties = PyPlot.PyCall.PyDict(
|
||||
Dict(
|
||||
"family" => axis[:tickfontfamily],
|
||||
"size" => py_thickness_scale(plt, axis[:tickfontsize]),
|
||||
"rotation" => axis[:tickfontrotation],
|
||||
)
|
||||
)
|
||||
|
||||
positions = getproperty(ax, Symbol("get_",letter,"ticks"))()
|
||||
pyaxis.set_major_locator(pyticker.FixedLocator(positions))
|
||||
if RecipesPipeline.is3d(sp)
|
||||
getproperty(ax, Symbol("set_",letter,"ticklabels"))(
|
||||
positions;
|
||||
(Symbol(k) => v for (k, v) in fontProperties)...
|
||||
)
|
||||
else
|
||||
getproperty(ax, Symbol("set_",letter,"ticklabels"))(
|
||||
positions,
|
||||
fontdict=fontProperties,
|
||||
)
|
||||
end
|
||||
|
||||
# workaround to set mathtext.fontspec per Text element
|
||||
env = "\\mathregular" # matches the outer fonts https://matplotlib.org/tutorials/text/mathtext.html
|
||||
axis[:ticks] == :native ? nothing : py_set_ticks(ax, ticks, letter, env)
|
||||
|
||||
axis[:ticks] == :native ? nothing : py_set_ticks(ax, ticks, letter, env)
|
||||
# Tick marks
|
||||
intensity = 0.5 # This value corresponds to scaling of other grid elements
|
||||
pyaxis."set_tick_params"(direction = axis[:tick_direction] == :out ? "out" : "in", width=py_thickness_scale(plt, intensity),
|
||||
length= 5 * py_thickness_scale(plt, intensity))
|
||||
pyaxis."set_tick_params"(
|
||||
direction = axis[:tick_direction] == :out ? "out" : "in",
|
||||
width=py_thickness_scale(plt, intensity),
|
||||
length= 5 * py_thickness_scale(plt, intensity)
|
||||
)
|
||||
|
||||
getproperty(ax, Symbol("set_", letter, "label"))(axis[:guide])
|
||||
if get(axis.plotattributes, :flip, false)
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ function standalone_html_window(plt::AbstractPlot)
|
||||
old = use_local_dependencies[] # save state to restore afterwards
|
||||
# if we open a browser ourself, we can host local files, so
|
||||
# when we have a local plotly downloaded this is the way to go!
|
||||
use_local_dependencies[] = isfile(plotly_local_file_path)
|
||||
use_local_dependencies[] = isfile(plotly_local_file_path[])
|
||||
filename = write_temp_html(plt)
|
||||
open_browser_window(filename)
|
||||
# restore for other backends
|
||||
|
||||
@@ -659,6 +659,7 @@ function locate_annotation(sp::Subplot, pos::Symbol, lab::PlotText)
|
||||
(x, y, lab)
|
||||
end
|
||||
locate_annotation(sp::Subplot, x, y, label::PlotText) = (x, y, label)
|
||||
locate_annotation(sp::Subplot, x, y, z, label::PlotText) = (x, y, z, label)
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
"type which represents z-values for colors and sizes (and anything else that might come up)"
|
||||
|
||||
+16
-9
@@ -1002,7 +1002,7 @@ const _examples = PlotExample[
|
||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||
You can also specify the connections using the connections keyword. 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,
|
||||
such that elements at the same position of these vectors form a triangle.
|
||||
such that elements at the same position of these vectors form a triangle.
|
||||
""",
|
||||
[
|
||||
:(
|
||||
@@ -1012,9 +1012,9 @@ const _examples = PlotExample[
|
||||
y=[0, 0, 1, 2]
|
||||
z=[0, 2, 0, 1]
|
||||
|
||||
# specify the triangles
|
||||
# specify the triangles
|
||||
# every column is one triangle,
|
||||
# where the values denote the indices of the vertices of the triangle
|
||||
# where the values denote the indices of the vertices of the triangle
|
||||
i=[0, 0, 0, 1]
|
||||
j=[1, 2, 3, 2]
|
||||
k=[2, 3, 1, 3]
|
||||
@@ -1040,27 +1040,34 @@ const _examples = PlotExample[
|
||||
)
|
||||
end]
|
||||
),
|
||||
PlotExample( # 49
|
||||
"Polar heatmaps",
|
||||
"",
|
||||
[quote
|
||||
z = (1:4) .+ (1:8)'
|
||||
heatmap(z, projection = :polar)
|
||||
end]
|
||||
),
|
||||
]
|
||||
|
||||
# Some constants for PlotDocs and PlotReferenceImages
|
||||
_animation_examples = [2, 31]
|
||||
_backend_skips = Dict(
|
||||
:gr => [25, 30, 47],
|
||||
:pyplot => [2, 25, 30, 31, 47],
|
||||
:plotlyjs => [2, 21, 24, 25, 30, 31],
|
||||
:plotly => [2, 21, 24, 25, 30, 31],
|
||||
: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
|
||||
10, # histogram2d
|
||||
16, # pgfplots thinks the upper panel is too small
|
||||
25, # @df
|
||||
30, # @df
|
||||
31, # animation
|
||||
32, # spy
|
||||
38, # histogram2d
|
||||
47, # mesh3d
|
||||
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[] = isfile(plotly_local_file_path[])
|
||||
|
||||
ENV["MPLBACKEND"] = "Agg"
|
||||
end
|
||||
|
||||
+20
-11
@@ -1,5 +1,7 @@
|
||||
using REPL
|
||||
using Pkg.Artifacts
|
||||
|
||||
const plotly_local_file_path = Ref("")
|
||||
|
||||
function _plots_defaults()
|
||||
if isdefined(Main, :PLOTS_DEFAULTS)
|
||||
@@ -13,9 +15,10 @@ end
|
||||
function __init__()
|
||||
user_defaults = _plots_defaults()
|
||||
if haskey(user_defaults, :theme)
|
||||
theme(pop!(user_defaults, :theme))
|
||||
theme(pop!(user_defaults, :theme); user_defaults...)
|
||||
else
|
||||
default(; user_defaults...)
|
||||
end
|
||||
default(; user_defaults...)
|
||||
|
||||
insert!(Base.Multimedia.displays, findlast(x -> x isa Base.TextDisplay || x isa REPL.REPLDisplay, Base.Multimedia.displays) + 1, PlotsDisplay())
|
||||
|
||||
@@ -41,8 +44,8 @@ function __init__()
|
||||
include(fn)
|
||||
end
|
||||
|
||||
@require ORCA = "47be7bcc-f1a6-5447-8b36-7eeeff7534fd" begin
|
||||
fn = joinpath(@__DIR__, "backends", "orca.jl")
|
||||
@require PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" begin
|
||||
fn = joinpath(@__DIR__, "backends", "plotlybase.jl")
|
||||
include(fn)
|
||||
end
|
||||
|
||||
@@ -74,16 +77,22 @@ function __init__()
|
||||
end
|
||||
end
|
||||
|
||||
if haskey(ENV, "PLOTS_HOST_DEPENDENCY_LOCAL")
|
||||
use_local_plotlyjs[] = ENV["PLOTS_HOST_DEPENDENCY_LOCAL"] == "true"
|
||||
use_local_dependencies[] = isfile(plotly_local_file_path) && use_local_plotlyjs[]
|
||||
if use_local_plotlyjs[] && !isfile(plotly_local_file_path)
|
||||
@warn("PLOTS_HOST_DEPENDENCY_LOCAL is set to true, but no local plotly file found. run Pkg.build(\"Plots\") and make sure PLOTS_HOST_DEPENDENCY_LOCAL is set to true")
|
||||
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
|
||||
end
|
||||
else
|
||||
use_local_dependencies[] = use_local_plotlyjs[]
|
||||
|
||||
plotly_local_file_path[] = joinpath(artifact_path(plotly_sha), "plotly-1.54.2.min.js")
|
||||
use_local_plotlyjs[] = true
|
||||
end
|
||||
|
||||
use_local_dependencies[] = use_local_plotlyjs[]
|
||||
|
||||
|
||||
@require FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" begin
|
||||
_show(io::IO, mime::MIME"image/png", plt::Plot{<:PDFBackends}) = _show_pdfbackends(io, mime, plt)
|
||||
|
||||
+1
-29
@@ -4,34 +4,6 @@
|
||||
to_pixels(m::AbsoluteLength) = m.value / 0.254
|
||||
|
||||
const _cbar_width = 5mm
|
||||
|
||||
#Base.broadcast(::typeof(Base.:.*), m::Measure, n::Number) = m * n
|
||||
#Base.broadcast(::typeof(Base.:.*), m::Number, n::Measure) = m * n
|
||||
Base.:-(m::Measure, a::AbstractArray) = map(ai -> m - ai, a)
|
||||
Base.:-(a::AbstractArray, m::Measure) = map(ai -> ai - m, a)
|
||||
Base.zero(::Type{typeof(mm)}) = 0mm
|
||||
Base.one(::Type{typeof(mm)}) = 1mm
|
||||
Base.typemin(::typeof(mm)) = -Inf*mm
|
||||
Base.typemax(::typeof(mm)) = Inf*mm
|
||||
Base.convert(::Type{F}, l::AbsoluteLength) where {F<:AbstractFloat} = convert(F, l.value)
|
||||
|
||||
# TODO: these are unintuitive and may cause tricky bugs
|
||||
# Base.:+(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * (1 + m2.value))
|
||||
# Base.:+(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * (1 + m1.value))
|
||||
# Base.:-(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * (1 - m2.value))
|
||||
# Base.:-(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * (m1.value - 1))
|
||||
|
||||
Base.:*(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value * m2.value)
|
||||
Base.:*(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value * m1.value)
|
||||
Base.:/(m1::AbsoluteLength, m2::Length{:pct}) = AbsoluteLength(m1.value / m2.value)
|
||||
Base.:/(m1::Length{:pct}, m2::AbsoluteLength) = AbsoluteLength(m2.value / m1.value)
|
||||
|
||||
|
||||
Base.zero(::Type{typeof(pct)}) = 0pct
|
||||
Base.one(::Type{typeof(pct)}) = 1pct
|
||||
Base.typemin(::typeof(pct)) = 0pct
|
||||
Base.typemax(::typeof(pct)) = 1pct
|
||||
|
||||
const defaultbox = BoundingBox(0mm, 0mm, 0mm, 0mm)
|
||||
|
||||
left(bbox::BoundingBox) = bbox.x0[1]
|
||||
@@ -258,7 +230,7 @@ end
|
||||
grid(args...; kw...)
|
||||
|
||||
Create a grid layout for subplots. `args` specify the dimensions, e.g.
|
||||
`grid(3,2, widths = (0.6,04))` creates a grid with three rows and two
|
||||
`grid(3,2, widths = (0.6,0.4))` creates a grid with three rows and two
|
||||
columns of different width.
|
||||
"""
|
||||
grid(args...; kw...) = GridLayout(args...; kw...)
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ RecipesPipeline.splittable_attribute(plt::Plot, key, val::SeriesAnnotations, len
|
||||
RecipesPipeline.splittable_attribute(plt, key, val.strs, len)
|
||||
|
||||
function RecipesPipeline.split_attribute(plt::Plot, key, val::SeriesAnnotations, indices)
|
||||
split_strs = RecipesPipeline.split_attribute(key, val.strs, indices)
|
||||
split_strs = RecipesPipeline.split_attribute(plt, key, val.strs, indices)
|
||||
return SeriesAnnotations(split_strs, val.font, val.baseshape, val.scalefactor)
|
||||
end
|
||||
|
||||
|
||||
+41
-13
@@ -122,8 +122,8 @@ end
|
||||
@deps hline straightline
|
||||
|
||||
@recipe function f(::Type{Val{:vline}}, x, y, z)
|
||||
n = length(x)
|
||||
newx = vec(Float64[xi for i = 1:3, xi in x])
|
||||
n = length(y)
|
||||
newx = vec(Float64[yi for i = 1:3, yi in y])
|
||||
x := newx
|
||||
y := repeat(Float64[1, 2, NaN], n)
|
||||
seriestype := :straightline
|
||||
@@ -144,8 +144,8 @@ end
|
||||
@deps hspan shape
|
||||
|
||||
@recipe function f(::Type{Val{:vspan}}, x, y, z)
|
||||
n = div(length(x), 2)
|
||||
newx = vcat([[x[2i - 1], x[2i - 1], x[2i], x[2i], NaN] for i = 1:n]...)
|
||||
n = div(length(y), 2)
|
||||
newx = vcat([[y[2i - 1], y[2i - 1], y[2i], y[2i], NaN] for i = 1:n]...)
|
||||
newy = repeat([-Inf, Inf, Inf, -Inf, NaN], outer = n)
|
||||
linewidth --> 0
|
||||
x := newx
|
||||
@@ -262,24 +262,39 @@ end
|
||||
end
|
||||
end
|
||||
newx, newy = zeros(3n), zeros(3n)
|
||||
newz = z!== nothing ? zeros(3n) : nothing
|
||||
for i = 1:n
|
||||
rng = (3i - 2):(3i)
|
||||
newx[rng] = [x[i], x[i], NaN]
|
||||
newy[rng] = [_cycle(fr, i), y[i], NaN]
|
||||
if z !== nothing
|
||||
newy[rng] = [y[i], y[i], NaN]
|
||||
newz[rng] = [_cycle(fr, i), z[i], NaN]
|
||||
else
|
||||
newy[rng] = [_cycle(fr, i), y[i], NaN]
|
||||
end
|
||||
end
|
||||
x := newx
|
||||
y := newy
|
||||
if z !== nothing
|
||||
z := newz
|
||||
end
|
||||
fillrange := nothing
|
||||
seriestype := :path
|
||||
if plotattributes[:linecolor] == :auto && plotattributes[:marker_z] !== nothing && plotattributes[:line_z] === nothing
|
||||
line_z := plotattributes[:marker_z]
|
||||
end
|
||||
|
||||
# create a secondary series for the markers
|
||||
# create a primary series for the markers
|
||||
if plotattributes[:markershape] != :none
|
||||
primary := false
|
||||
@series begin
|
||||
seriestype := :scatter
|
||||
x := x
|
||||
y := y
|
||||
label := ""
|
||||
primary := false
|
||||
if z !== nothing
|
||||
z := z
|
||||
end
|
||||
primary := true
|
||||
()
|
||||
end
|
||||
markershape := :none
|
||||
@@ -859,9 +874,7 @@ end
|
||||
|
||||
x := Plots._bin_centers(edge_x)
|
||||
y := Plots._bin_centers(edge_y)
|
||||
z := Surface(float_weights)
|
||||
|
||||
match_dimensions := true
|
||||
z := Surface(permutedims(float_weights))
|
||||
seriestype := :heatmap
|
||||
()
|
||||
end
|
||||
@@ -918,7 +931,7 @@ end
|
||||
@recipe function f(::Type{Val{:mesh3d}}, x, y, z)
|
||||
# As long as no i,j,k are supplied this should work with PyPlot and GR
|
||||
seriestype := :surface
|
||||
if plotattributes[:connections] != nothing
|
||||
if plotattributes[:connections] !== nothing
|
||||
throw(ArgumentError("Giving triangles using the connections argument is only supported on Plotly backend."))
|
||||
end
|
||||
()
|
||||
@@ -1089,6 +1102,12 @@ function error_coords(errorbar, errordata, otherdata...)
|
||||
return (ed, od...)
|
||||
end
|
||||
|
||||
# clamp non-NaN values in an array to Base.eps(Float64) for log-scale plots
|
||||
function clamp_to_eps!(ary)
|
||||
replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary)
|
||||
nothing
|
||||
end
|
||||
|
||||
# we will create a series of path segments, where each point represents one
|
||||
# side of an errorbar
|
||||
|
||||
@@ -1102,6 +1121,9 @@ end
|
||||
plotattributes[:x], plotattributes[:y], plotattributes[:z] =
|
||||
error_coords(xerr, x, y, z)
|
||||
end
|
||||
if :xscale ∈ keys(plotattributes) && plotattributes[:xscale] == :log10
|
||||
clamp_to_eps!(plotattributes[:x])
|
||||
end
|
||||
()
|
||||
end
|
||||
@deps xerror path
|
||||
@@ -1116,6 +1138,9 @@ end
|
||||
plotattributes[:y], plotattributes[:x], plotattributes[:z] =
|
||||
error_coords(yerr, y, x, z)
|
||||
end
|
||||
if :yscale ∈ keys(plotattributes) && plotattributes[:yscale] == :log10
|
||||
clamp_to_eps!(plotattributes[:y])
|
||||
end
|
||||
()
|
||||
end
|
||||
@deps yerror path
|
||||
@@ -1128,6 +1153,9 @@ end
|
||||
plotattributes[:z], plotattributes[:x], plotattributes[:y] =
|
||||
error_coords(zerr, z, x, y)
|
||||
end
|
||||
if :zscale ∈ keys(plotattributes) && plotattributes[:zscale] == :log10
|
||||
clamp_to_eps!(plotattributes[:z])
|
||||
end
|
||||
()
|
||||
end
|
||||
@deps zerror path
|
||||
@@ -1466,7 +1494,7 @@ end
|
||||
end
|
||||
|
||||
|
||||
Plots.findnz(A::AbstractSparseMatrix) = findnz(A)
|
||||
Plots.findnz(A::AbstractSparseMatrix) = SparseArrays.findnz(A)
|
||||
|
||||
# fallback function for finding non-zero elements of non-sparse matrices
|
||||
function Plots.findnz(A::AbstractMatrix)
|
||||
|
||||
+2
-2
@@ -432,10 +432,10 @@ zlims!(zmin::Real, zmax::Real; kw...) = plot!(; zlims = (zmi
|
||||
|
||||
|
||||
"Set xticks for an existing plot"
|
||||
xticks!(v::TicksArgs; kw...) where {T<:Real} = plot!(; xticks = v, kw...)
|
||||
xticks!(v::TicksArgs; kw...) = plot!(; xticks = v, kw...)
|
||||
|
||||
"Set yticks for an existing plot"
|
||||
yticks!(v::TicksArgs; kw...) where {T<:Real} = plot!(; yticks = v, kw...)
|
||||
yticks!(v::TicksArgs; kw...) = plot!(; yticks = v, kw...)
|
||||
|
||||
xticks!(
|
||||
ticks::AVec{T}, labels::AVec{S}; kw...) where {T<:Real,S<:AbstractString} = plot!(; xticks = (ticks,labels), kw...)
|
||||
|
||||
+2
-21
@@ -207,9 +207,6 @@ end
|
||||
|
||||
createSegments(z) = collect(repeat(reshape(z,1,:),2,1))[2:end]
|
||||
|
||||
Base.first(c::Colorant) = c
|
||||
Base.first(x::Symbol) = x
|
||||
|
||||
|
||||
sortedkeys(plotattributes::Dict) = sort(collect(keys(plotattributes)))
|
||||
|
||||
@@ -295,13 +292,6 @@ limsType(lims::Tuple{T,S}) where {T<:Real,S<:Real} = :limits
|
||||
limsType(lims::Symbol) = lims == :auto ? :auto : :invalid
|
||||
limsType(lims) = :invalid
|
||||
|
||||
# axis_Symbol(letter, postfix) = Symbol(letter * postfix)
|
||||
# axis_symbols(letter, postfix...) = map(s -> axis_Symbol(letter, s), postfix)
|
||||
|
||||
Base.convert(::Type{Vector{T}}, rng::AbstractRange{T}) where {T<:Real} = T[x for x in rng]
|
||||
Base.convert(::Type{Vector{T}}, rng::AbstractRange{S}) where {T<:Real,S<:Real} = T[x for x in rng]
|
||||
|
||||
Base.merge(a::AbstractVector, b::AbstractVector) = sort(unique(vcat(a,b)))
|
||||
|
||||
# recursively merge kw-dicts, e.g. for merging extra_kwargs / extra_plot_kwargs in plotly)
|
||||
recursive_merge(x::AbstractDict...) = merge(recursive_merge, x...)
|
||||
@@ -344,17 +334,8 @@ function indices_and_unique_values(z::AbstractArray)
|
||||
newz, vals
|
||||
end
|
||||
|
||||
# this is a helper function to determine whether we need to transpose a surface matrix.
|
||||
# it depends on whether the backend matches rows to x (transpose_on_match == true) or vice versa
|
||||
# for example: PyPlot sends rows to y, so transpose_on_match should be true
|
||||
function transpose_z(plotattributes, z, transpose_on_match::Bool = true)
|
||||
if plotattributes[:match_dimensions] == transpose_on_match
|
||||
# z'
|
||||
permutedims(z, [2,1])
|
||||
else
|
||||
z
|
||||
end
|
||||
end
|
||||
handle_surface(z) = z
|
||||
handle_surface(z::Surface) = permutedims(z.surf)
|
||||
|
||||
function ok(x::Number, y::Number, z::Number = 0)
|
||||
isfinite(x) && isfinite(y) && isfinite(z)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using Plots, Test, Dates
|
||||
|
||||
@testset "Limits" begin
|
||||
y=[1.0*i*i for i in 1:10]
|
||||
x=[Date(2019,11,i) for i in 1:10]
|
||||
|
||||
rx=[x[3],x[5]]
|
||||
|
||||
p = plot(x,y, widen = false)
|
||||
vspan!(p, rx, label="", alpha=0.2)
|
||||
|
||||
ref_ylims = (y[1], y[end])
|
||||
ref_xlims = (x[1].instant.periods.value, x[end].instant.periods.value)
|
||||
@test Plots.ylims(p) == ref_ylims
|
||||
@test Plots.xlims(p) == ref_xlims
|
||||
end # testset
|
||||
@@ -11,11 +11,13 @@ import GeometryTypes, GeometryBasics
|
||||
using Dates
|
||||
using RecipesBase
|
||||
|
||||
include("test_defaults.jl")
|
||||
include("test_axes.jl")
|
||||
include("test_axis_letter.jl")
|
||||
include("test_recipes.jl")
|
||||
include("test_hdf5plots.jl")
|
||||
include("test_pgfplotsx.jl")
|
||||
include("integration_dates.jl")
|
||||
|
||||
reference_dir(args...) = joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using Plots, Test
|
||||
|
||||
const PLOTS_DEFAULTS = Dict(:theme => :wong2)
|
||||
Plots.__init__()
|
||||
|
||||
@testset "Loading theme" begin
|
||||
@test plot(1:5)[1][1][:seriescolor] == RGBA(colorant"black")
|
||||
end
|
||||
|
||||
empty!(PLOTS_DEFAULTS)
|
||||
Plots.__init__()
|
||||
@@ -4,3 +4,21 @@ using Plots, Test
|
||||
lens!(pl, [1,2], [1,2], inset = (1, bbox(0.0,0.0,0.2,0.2)))
|
||||
@test length(pl.series_list) == 4
|
||||
end # testset
|
||||
|
||||
@testset "vline, vspan" begin
|
||||
vl = vline([1], widen = false)
|
||||
@test Plots.xlims(vl) == (1,2)
|
||||
@test Plots.ylims(vl) == (1,2)
|
||||
vl = vline([1], xlims=(0,2), widen = false)
|
||||
@test Plots.xlims(vl) == (0,2)
|
||||
vl = vline([1], ylims=(-3,5), widen = false)
|
||||
@test Plots.ylims(vl) == (-3,5)
|
||||
|
||||
vsp = vspan([1,3], widen = false)
|
||||
@test Plots.xlims(vsp) == (1,3)
|
||||
@test Plots.ylims(vsp) == (0,1) # TODO: might be problematic on log-scales
|
||||
vsp = vspan([1,3], xlims=(-2,5), widen = false)
|
||||
@test Plots.xlims(vsp) == (-2,5)
|
||||
vsp = vspan([1,3], ylims=(-2,5), widen = false)
|
||||
@test Plots.ylims(vsp) == (-2,5)
|
||||
end # testset
|
||||
|
||||
Reference in New Issue
Block a user