Compare commits
137 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd46fd4add | |||
| ac6c7fda11 | |||
| 4755635fbd | |||
| c82a3c35ee | |||
| 83bce6e895 | |||
| 07c5019259 | |||
| 093181d358 | |||
| 0085706f6f | |||
| 31359610bd | |||
| 34c6c76cb8 | |||
| 734b301abc | |||
| e2907b973f | |||
| 9e3ff15522 | |||
| ce8255a462 | |||
| aedb1fbb0b | |||
| cebcdfb3b5 | |||
| b4632c8b48 | |||
| cd4ab0fd24 | |||
| e3cd14944c | |||
| cac0c8d8d3 | |||
| 4f352d8e7c | |||
| aa32561fe8 | |||
| f470e6a590 | |||
| ca0041639b | |||
| 73208ac3bd | |||
| 0112e78c50 | |||
| a3f209b100 | |||
| 573c0cf1bf | |||
| a0c939b7c7 | |||
| f4ed35c3b6 | |||
| 50b0ae3b0f | |||
| f049f56e0b | |||
| 6a459d4c22 | |||
| f576456617 | |||
| a7c4eef861 | |||
| 741684251c | |||
| 75bd9dbd01 | |||
| 42c60a4fd6 | |||
| 92caf2e15f | |||
| 99188f7a7e | |||
| a9d11cb2be | |||
| 8a3fd8f77e | |||
| bb29abb8a4 | |||
| b801b2b272 | |||
| 371d9f8dd7 | |||
| 49f8e48399 | |||
| dbc14ac761 | |||
| c0e35f2358 | |||
| 3ce4e23f1b | |||
| d4d4d5732b | |||
| 86a732e9c5 | |||
| 530768064e | |||
| 89f59532c1 | |||
| c41e586385 | |||
| 8cbfe74863 | |||
| 27032a3e21 | |||
| 07a786a946 | |||
| ad0f623386 | |||
| 4fa567aa5b | |||
| c5ae99374a | |||
| e79740d3bd | |||
| dbe6c8dc57 | |||
| 9bd075d06b | |||
| 1c68a13d2c | |||
| 86d3097123 | |||
| 6c2d969316 | |||
| 30e728213e | |||
| 4c9fd4e4b7 | |||
| 458d72b36b | |||
| 26ddb62a27 | |||
| 4aa9d74a28 | |||
| 878e590125 | |||
| 4e5b490b6c | |||
| f3aa61293b | |||
| cd06648ec3 | |||
| fe7d957be3 | |||
| a39582c06e | |||
| 86fbb39723 | |||
| 6f49ec112c | |||
| 6594b93126 | |||
| f9a1e2e92d | |||
| e58bd8b657 | |||
| 5f31ab7169 | |||
| b85468162c | |||
| 0550033065 | |||
| 89db9025c5 | |||
| 10ed39cf83 | |||
| 237fa4be7b | |||
| 192eb6ffbb | |||
| 4fc0f85cf1 | |||
| aecce08a0f | |||
| 3ad2e0674a | |||
| 05f585f8ad | |||
| c6ba6dd899 | |||
| fcf75a195a | |||
| 3195a67915 | |||
| aa837bb027 | |||
| 7bb2a29356 | |||
| f0afadf43a | |||
| 0525ade990 | |||
| 6b22f45dd5 | |||
| fc0e9a1245 | |||
| 2ec78be9a1 | |||
| 4449398614 | |||
| 946f90d3e4 | |||
| c046e6461f | |||
| 411de69765 | |||
| 4bc6412b46 | |||
| 798de8b17c | |||
| b0ff0e58b3 | |||
| 5cca5e9148 | |||
| 90e0074f44 | |||
| 3e14a47e17 | |||
| 5d608d1e77 | |||
| 20e24cfa8d | |||
| 2d0191cd70 | |||
| 12d5accf0a | |||
| c02dbca31d | |||
| 0e25767cd3 | |||
| 5d935d29c5 | |||
| f5e6ae9f98 | |||
| 4a18098944 | |||
| 3994e47d3c | |||
| 39d52a5c57 | |||
| 91e91ac821 | |||
| e9949251a6 | |||
| 16e41f0690 | |||
| 6f4400411e | |||
| 1bba6afde5 | |||
| 909ad3314a | |||
| 68a56fee91 | |||
| 9f4e32aa4d | |||
| 434e189f1e | |||
| c9f7c6b45d | |||
| e58fdf970f | |||
| 81170b4342 | |||
| ee316e2913 |
@@ -75,8 +75,8 @@ jobs:
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Update precompile_*.jl file
|
||||
title: "[AUTO] Update precompiles"
|
||||
commit-message: Update precompile_*.jl file [skip ci]
|
||||
title: "[AUTO] Update precompiles [skip ci]"
|
||||
labels: SnoopCompile
|
||||
branch: "Test_SnoopCompile_AutoPR_${{ github.ref }}"
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ jobs:
|
||||
texlive-latex-extra \
|
||||
texlive-luatex \
|
||||
ghostscript-x \
|
||||
libgconf2-4
|
||||
libgconf2-4 \
|
||||
gnuplot
|
||||
sudo fc-cache -vr
|
||||
|
||||
- name: build documentation
|
||||
@@ -46,5 +47,10 @@ jobs:
|
||||
PYTHON: ""
|
||||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
|
||||
run: |
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add(PackageSpec(name="Plots", rev=split(ENV["GITHUB_REF"], "/", limit=3)[3])); Pkg.instantiate()'
|
||||
# export JULIA_DEBUG=Documenter
|
||||
export PLOTDOCS_ANSICOLOR=true
|
||||
export GKSwstype=nul # Plots.jl/issues/3664
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add(PackageSpec(name="Plots", rev=split(ENV["GITHUB_REF"], "/", limit=3)[3])); Pkg.instantiate()'
|
||||
# xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; pkg"add Documenter#master"'
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; pkg"st -m"'
|
||||
xvfb-run julia --color=yes --project=docs/ -e 'withenv("GITHUB_REPOSITORY" => "JuliaPlots/PlotDocs.jl") do; include("docs/make.jl"); end'
|
||||
|
||||
+2
-1
@@ -15,8 +15,9 @@
|
||||
"type": "ProjectLeader"
|
||||
},
|
||||
{
|
||||
"affiliation": "GLOBE Institute",
|
||||
"affiliation": "GLOBE Institute, University of Copenhagen",
|
||||
"name": "Michael Krabbe Borregaard",
|
||||
"orcid": "0000-0002-8146-8435",
|
||||
"type": "ProjectLeader"
|
||||
},
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.17.0"
|
||||
version = "1.19.4"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
@@ -36,8 +36,8 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
|
||||
Contour = "0.5"
|
||||
FFMPEG = "0.2, 0.3, 0.4"
|
||||
FixedPointNumbers = "0.6, 0.7, 0.8"
|
||||
GR = "0.53, 0.54, 0.55, 0.57"
|
||||
GeometryBasics = "0.2, 0.3.1"
|
||||
GR = "0.53, 0.54, 0.55, 0.57, 0.58"
|
||||
GeometryBasics = "0.2, 0.3.1, 0.4"
|
||||
JSON = "0.21, 1"
|
||||
Latexify = "0.14, 0.15"
|
||||
Measures = "0.3"
|
||||
|
||||
+60
-23
@@ -68,20 +68,35 @@ function _precompile_()
|
||||
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:label, :blank), Tuple{Symbol, Bool}},Type{EmptyLayout}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:label, :width, :height), Tuple{Symbol, Symbol, Length{:pct, Float64}}},Type{EmptyLayout}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},GRBackend})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{GridLayout}},Type{Subplot},PlotlyBackend})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{GRBackend}}},Type{Subplot},GRBackend})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(Type)),NamedTuple{(:parent,), Tuple{Subplot{PlotlyBackend}}},Type{Subplot},PlotlyBackend})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Int64})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}, Vector{Float64}},Tuple{Int64, Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(_make_hist)),NamedTuple{(:normed, :weights), Tuple{Bool, Vector{Int64}}},typeof(_make_hist),Tuple{Vector{Float64}},Symbol})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:flip,), Tuple{Bool}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{Symbol}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:formatter,), Tuple{typeof(datetimeformatter)}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :flip, :minorgrid, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Float64, Float64}, Bool}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :guide), Tuple{Bool, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid, :minorgrid, :mirror, :guide), Tuple{Bool, Bool, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:grid,), Tuple{Bool}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:gridlinewidth, :grid, :gridalpha, :gridstyle, :foreground_color_grid), Tuple{Int64, Bool, Float64, Symbol, RGBA{Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide,), Tuple{String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guidefonthalign, :guide_position, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, StepRange{Int64, Int64}, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:scale, :guide), Tuple{Symbol, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:rotation,), Tuple{Int64}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{Nothing}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:titlefont, :legendfontsize, :guidefont, :tickfont, :guide, :framestyle, :yminorgrid), Tuple{Tuple{Int64, String}, Int64, Tuple{Int64, Symbol}, Tuple{Int64, Symbol}, String, Symbol, Bool}},typeof(default)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(font)),NamedTuple{(:family, :pointsize, :halign, :valign, :rotation, :color), Tuple{String, Int64, Symbol, Symbol, Float64, RGBA{Float64}}},typeof(font)})
|
||||
@@ -95,7 +110,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{GRBackend},Vector{GeometryBasics.Point2{Float64}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{GeometryBasics.Point2{Float64}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:alpha, :seriestype), Tuple{Float64, Symbol}},typeof(plot!),Vector{GeometryBasics.Point2{Float64}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, PlotText}}}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:annotation,), Tuple{Vector{Tuple{Int64, Float64, Tuple{String, Any, Any, Any}}}}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:layout, :margin), Tuple{GridLayout, AbsoluteLength}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
@@ -109,22 +124,29 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{GRBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),Plot{PlotlyBackend},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:marker, :series_annotations, :seriestype), Tuple{Tuple{Int64, Float64, Symbol}, Vector{Any}, Symbol}},typeof(plot!),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:markersize, :c, :seriestype), Tuple{Int64, Symbol, Symbol}},typeof(plot!),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{PlotlyBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:xgrid,), Tuple{Tuple{Symbol, Symbol, Int64, Symbol, Float64}}},typeof(plot!),Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis,), Tuple{Tuple{String, Symbol}}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:yaxis, :minorgrid), Tuple{Tuple{String, Symbol}, Bool}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{GRBackend},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype), Tuple{Vector{Float64}, Tuple{Symbol, Float64, Stroke}, Vector{Float64}, String, Symbol}},typeof(plot!),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:annotations, :leg), Tuple{Tuple{Int64, Float64, PlotText}, Bool}},typeof(plot),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:arrow,), Tuple{Int64}},typeof(plot),Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:aspect_ratio, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{String},Vector{String},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:bins, :weights, :seriestype), Tuple{Symbol, Vector{Int64}, Symbol}},typeof(plot),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:color, :line, :marker), Tuple{Matrix{Symbol}, Tuple{Symbol, Int64}, Tuple{Matrix{Symbol}, Int64, Float64, Stroke}}},typeof(plot),Vector{Vector{T} where T}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:connections, :title, :xlabel, :ylabel, :zlabel, :legend, :margin, :seriestype), Tuple{Tuple{Vector{Int64}, Vector{Int64}, Vector{Int64}}, String, String, String, String, Symbol, AbsoluteLength, Symbol}},typeof(plot),Vector{Int64},Vector{Int64},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:fill, :seriestype), Tuple{Bool, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Function})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks, :seriestype), Tuple{Matrix{Symbol}, Matrix{String}, Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}}, Int64, String, Int64, UnitRange{Int64}, Symbol}},typeof(plot),Vector{Vector{Float64}},Vector{Vector{Float64}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:grid, :title), Tuple{Tuple{Symbol, Symbol, Symbol, Int64, Float64}, String}},typeof(plot),Vector{Float64}})
|
||||
@@ -165,6 +187,8 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:projection, :seriestype), Tuple{Symbol, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},UnitRange{Int64},Matrix{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:quiver, :seriestype), Tuple{Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:reg, :fill), Tuple{Bool, Tuple{Int64, Symbol}}},typeof(plot),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Int64}},typeof(plot),UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}},typeof(plot),UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{Tuple{LinRange{Float64}, LinRange{Float64}}}},typeof(plot),UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:ribbon,), Tuple{typeof(sqrt)}},typeof(plot),UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype, :markershape, :markersize, :color), Tuple{Matrix{Symbol}, Vector{Symbol}, Int64, Vector{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||
@@ -185,8 +209,10 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(scatter!)),Any,typeof(scatter!),Any})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip, :disp), Tuple{Vector{Int64}, Bool}},typeof(test_examples),Symbol})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(test_examples)),NamedTuple{(:skip,), Tuple{Vector{Int64}}},typeof(test_examples),Symbol})
|
||||
Base.precompile(Tuple{Type{GridLayout},Int64,Vararg{Int64, N} where N})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},AbstractVector{OHLC}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},PortfolioComposition})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barbins}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:barhist}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bar}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:bins2d}},Any,Any,Any})
|
||||
@@ -200,6 +226,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:xerror}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Vector{ComplexF64}})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol, Any},Type{Val{:bar}},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{GRBackend},DefaultsDict})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.add_series!),Plot{PlotlyBackend},DefaultsDict})
|
||||
Base.precompile(Tuple{typeof(RecipesPipeline.plot_setup!),Plot{GRBackend},Dict{Symbol, Any},Vector{Dict{Symbol, Any}}})
|
||||
@@ -217,7 +244,11 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{PlotUtils.ContinuousColorGradient},String})
|
||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}},String})
|
||||
Base.precompile(Tuple{typeof(_cbar_unique),Vector{Symbol},String})
|
||||
Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}})
|
||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}})
|
||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{GRBackend},Bool})
|
||||
Base.precompile(Tuple{typeof(_do_plot_show),Plot{PlotlyBackend},Bool})
|
||||
Base.precompile(Tuple{typeof(_heatmap_edges),Vector{Float64},Bool,Bool})
|
||||
Base.precompile(Tuple{typeof(_plot!),Plot,Any,Any})
|
||||
Base.precompile(Tuple{typeof(_preprocess_barlike),DefaultsDict,Base.OneTo{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(_preprocess_binlike),DefaultsDict,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
@@ -231,20 +262,21 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(backend),PlotlyBackend})
|
||||
Base.precompile(Tuple{typeof(bbox),AbsoluteLength,AbsoluteLength,AbsoluteLength,AbsoluteLength})
|
||||
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
|
||||
Base.precompile(Tuple{typeof(bottompad),EmptyLayout})
|
||||
Base.precompile(Tuple{typeof(build_layout),GridLayout,Int64,Vector{Plot}})
|
||||
Base.precompile(Tuple{typeof(convert_to_polar),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64},Tuple{Int64, Float64}})
|
||||
Base.precompile(Tuple{typeof(create_grid),Expr})
|
||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64},Vararg{Vector{Float64}, N} where N})
|
||||
Base.precompile(Tuple{typeof(error_coords),Vector{Float64},Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(error_zipit),Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}}})
|
||||
Base.precompile(Tuple{typeof(fakedata),Int64,Int64})
|
||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
||||
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),UnitRange{Int64},Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_xy),OHLC{Float64},Int64,Float64})
|
||||
Base.precompile(Tuple{typeof(get_xy),Vector{OHLC}})
|
||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
||||
@@ -256,16 +288,18 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Int64,Int64,Shape{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Float64,Tuple{Float64, Float64},Int64,Float64,Int64,Symbol})
|
||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Int64,Int64,Tuple{Float64, Float64},Int64,Int64,Int64,Symbol})
|
||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,UnitRange{Int64},Vector{Float64},Tuple{Float64, Float64},Int64,Int64})
|
||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},UnitRange{Int64},Tuple{Vector{Float64}, Vector{Float64}},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Int64},Vector{Float64},Nothing,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_shapes),Series,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Float64}, Vector{String}},Int64})
|
||||
Base.precompile(Tuple{typeof(gr_get_ticks_size),Tuple{Vector{Int64}, Vector{String}},Int64})
|
||||
Base.precompile(Tuple{typeof(gr_label_ticks),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(gr_label_ticks_3d),Subplot{GRBackend},Symbol,Tuple{Vector{Float64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(gr_polaraxes),Int64,Float64,Subplot{GRBackend}})
|
||||
@@ -280,9 +314,10 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol,UnitRange{Int64},Symbol,Tuple{Int64, Int64},Bool})
|
||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol,Vector{Float64},Symbol,Tuple{Int64, Int64},Bool})
|
||||
Base.precompile(Tuple{typeof(heatmap_edges),Vector{Float64},Symbol})
|
||||
Base.precompile(Tuple{typeof(ignorenan_extrema),Matrix{Float64}})
|
||||
Base.precompile(Tuple{typeof(ignorenan_minimum),Vector{Int64}})
|
||||
Base.precompile(Tuple{typeof(layout_args),Int64})
|
||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}})
|
||||
Base.precompile(Tuple{typeof(is_marker_supported),PlotlyBackend,Vector{Symbol}})
|
||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Float64},Symbol,Symbol})
|
||||
@@ -302,27 +337,39 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Matrix{Symbol}})
|
||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},RGBA{Float64}})
|
||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Shape{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Stroke})
|
||||
Base.precompile(Tuple{typeof(processMarkerArg),Dict{Symbol, Any},Symbol})
|
||||
Base.precompile(Tuple{typeof(processMinorGridArg!),Dict{Symbol, Any},Bool,Symbol})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,PlotText})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{GRBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,PlotText})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Int64, Symbol, Symbol}})
|
||||
Base.precompile(Tuple{typeof(process_annotation),Subplot{PlotlyBackend},Int64,Float64,Tuple{String, Symbol, Int64, String}})
|
||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},StepRange{Int64, Int64},Symbol})
|
||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},String,Symbol})
|
||||
Base.precompile(Tuple{typeof(process_axis_arg!),Dict{Symbol, Any},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(push!),Segments{Tuple{Float64, Float64, Float64}},Tuple{Float64, Int64, Int64},Tuple{Float64, Float64, Int64}})
|
||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{AbsoluteLength},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64})
|
||||
Base.precompile(Tuple{typeof(spy),Any})
|
||||
Base.precompile(Tuple{typeof(straightline_data),Tuple{Float64, Float64},Tuple{Float64, Float64},Vector{Float64},Vector{Float64},Int64})
|
||||
Base.precompile(Tuple{typeof(stroke),Int64,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(text),String,Int64,Symbol,Vararg{Symbol, N} where N})
|
||||
Base.precompile(Tuple{typeof(text),String,Symbol,Int64,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(title!),AbstractString})
|
||||
Base.precompile(Tuple{typeof(unzip),Vector{GeometryBasics.Point2{Float64}}})
|
||||
Base.precompile(Tuple{typeof(vline!),Any})
|
||||
Base.precompile(Tuple{typeof(xgrid!),Plot{GRBackend},Symbol,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(xlims),Subplot{PlotlyBackend}})
|
||||
Base.precompile(Tuple{typeof(yaxis!),Any,Any})
|
||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#126")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#126")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64}},Float64,Bool})
|
||||
isdefined(Plots, Symbol("#add_major_or_minor_segments#127")) && Base.precompile(Tuple{getfield(Plots, Symbol("#add_major_or_minor_segments#127")),Vector{Float64},Bool,Segments{Tuple{Float64, Float64, Float64}},Float64,Bool})
|
||||
let fbody = try __lookup_kwbody__(which(font, (Font,Vararg{Any, N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(font),Font,Vararg{Any, N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(plot!, (Any,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Any,typeof(plot!),Any,))
|
||||
@@ -343,16 +390,6 @@ function _precompile_()
|
||||
precompile(fbody, (Any,typeof(plot),Any,Vararg{Any, N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(text, (String,Int64,Vararg{Any, N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(text),String,Int64,Vararg{Any, N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(text, (String,Symbol,Vararg{Any, N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}},typeof(text),String,Symbol,Vararg{Any, N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(title!, (AbstractString,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Any,typeof(title!),AbstractString,))
|
||||
|
||||
+1
-1
@@ -118,7 +118,6 @@ export
|
||||
scalefontsizes,
|
||||
resetfontsizes
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
|
||||
import NaNMath # define functions that ignores NaNs. To overcome the destructive effects of https://github.com/JuliaLang/julia/pull/12563
|
||||
@@ -250,6 +249,7 @@ end
|
||||
# ---------------------------------------------------------
|
||||
|
||||
const CURRENT_BACKEND = CurrentBackend(:none)
|
||||
const PLOTS_SEED = 1234
|
||||
|
||||
include("precompile_includer.jl")
|
||||
|
||||
|
||||
+7
-6
@@ -170,18 +170,19 @@ function _animate(forloop::Expr, args...; callgif = false)
|
||||
end
|
||||
|
||||
push!(block.args, :(if $filterexpr; Plots.frame($animsym); end))
|
||||
push!(block.args, :(global $countersym += 1))
|
||||
push!(block.args, :($countersym += 1))
|
||||
|
||||
# add a final call to `gif(anim)`?
|
||||
retval = callgif ? :(Plots.gif($animsym)) : animsym
|
||||
|
||||
# full expression:
|
||||
esc(quote
|
||||
$freqassert # if filtering, check frequency is an Integer > 0
|
||||
$animsym = Plots.Animation() # init animation object
|
||||
global $countersym = 1 # init iteration counter
|
||||
$forloop # for loop, saving a frame after each iteration
|
||||
$retval # return the animation object, or the gif
|
||||
$freqassert # if filtering, check frequency is an Integer > 0
|
||||
$animsym = Plots.Animation() # init animation object
|
||||
let $countersym = 1 # init iteration counter
|
||||
$forloop # for loop, saving a frame after each iteration
|
||||
end
|
||||
$retval # return the animation object, or the gif
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
+3
-2
@@ -53,7 +53,8 @@ const _arg_desc = KW(
|
||||
:colorbar_entry => "Bool. Include this series in the color bar? Set to `false` to exclude.",
|
||||
|
||||
# plot args
|
||||
:plot_title => "String. Title for the whole plot (not the subplots) (Note: Not currently implemented)",
|
||||
:plot_title => "String. Title for the whole plot (not the subplots)",
|
||||
:plot_titlevspan => "Number in [0,1]. Vertical span of the whole plot title (fraction of the plot height)",
|
||||
:background_color => "Color Type. Base color for all backgrounds.",
|
||||
:background_color_outside => "Color Type or `:match` (matches `:background_color`). Color outside the plot area(s)",
|
||||
:foreground_color => "Color Type. Base color for all foregrounds.",
|
||||
@@ -115,7 +116,7 @@ const _arg_desc = KW(
|
||||
:colorbar_formatter => "Function, :scientific, :plain or :auto. A method which converts a number to a string for tick labeling.",
|
||||
:legendfont => "Font. Font of legend items.",
|
||||
:legendtitlefont => "Font. Font of the legend title.",
|
||||
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String or PlotText (created with `text(args...)`) Add one-off text annotations at the x,y coordinates.",
|
||||
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String, PlotText (created with `text(args...)`), or a tuple of arguments to `text` (e.g., `(\"Label\", 8, :red, :top)`). Add one-off text annotations at the x,y coordinates.",
|
||||
:annotationfontfamily => "String or Symbol. Font family of annotations.",
|
||||
:annotationfontsize => "Integer. Font pointsize of annotations.",
|
||||
:annotationhalign => "Symbol. horizontal alignment of annotations, :hcenter, :left, :right or :center.",
|
||||
|
||||
+3
-1
@@ -331,13 +331,15 @@ const _series_defaults = KW(
|
||||
|
||||
const _plot_defaults = KW(
|
||||
:plot_title => "",
|
||||
:plot_titleindex => 0,
|
||||
:plot_titlefontsize => 16,
|
||||
:plot_title_location => :center, # also :left or :right
|
||||
:plot_titlelocation => :center, # also :left or :right
|
||||
:plot_titlefontfamily => :match,
|
||||
:plot_titlefonthalign => :hcenter,
|
||||
:plot_titlefontvalign => :vcenter,
|
||||
:plot_titlefontrotation => 0.0,
|
||||
:plot_titlefontcolor => :match,
|
||||
:plot_titlevspan => 0.05, # vertical span of the plot title, here 5%
|
||||
:background_color => colorant"white", # default for all backgrounds,
|
||||
:background_color_outside => :match, # background outside grid,
|
||||
:foreground_color => :auto, # default for all foregrounds, and title color,
|
||||
|
||||
+56
-28
@@ -172,8 +172,9 @@ function optimal_ticks_and_labels(ticks, alims, scale, formatter)
|
||||
scaled_ticks = optimize_ticks(
|
||||
sf(amin),
|
||||
sf(amax);
|
||||
k_min = 4, # minimum number of ticks
|
||||
k_min = scale ∈ _logScales ? 2 : 4, # minimum number of ticks
|
||||
k_max = 8, # maximum number of ticks
|
||||
scale = scale,
|
||||
)[1]
|
||||
elseif typeof(ticks) <: Int
|
||||
scaled_ticks, viewmin, viewmax = optimize_ticks(
|
||||
@@ -185,6 +186,7 @@ function optimal_ticks_and_labels(ticks, alims, scale, formatter)
|
||||
# `strict_span = false` rewards cases where the span of the
|
||||
# chosen ticks is not too much bigger than amin - amax:
|
||||
strict_span = false,
|
||||
scale = scale,
|
||||
)
|
||||
# axis[:lims] = map(RecipesPipeline.inverse_scale_func(scale), (viewmin, viewmax))
|
||||
else
|
||||
@@ -331,30 +333,48 @@ _transform_ticks(ticks::AbstractArray{T}) where T <: Dates.TimeType = Dates.valu
|
||||
_transform_ticks(ticks::NTuple{2, Any}) = (_transform_ticks(ticks[1]), ticks[2])
|
||||
|
||||
function get_minor_ticks(sp, axis, ticks)
|
||||
axis[:minorticks] in (:none, nothing, false) && !axis[:minorgrid] && return nothing
|
||||
axis[:minorticks] ∈ (:none, nothing, false) && !axis[:minorgrid] && return nothing
|
||||
ticks = ticks[1]
|
||||
length(ticks) < 2 && return nothing
|
||||
|
||||
amin, amax = axis_limits(sp, axis[:letter])
|
||||
#Add one phantom tick either side of the ticks to ensure minor ticks extend to the axis limits
|
||||
if length(ticks) > 2
|
||||
ratio = (ticks[3] - ticks[2])/(ticks[2] - ticks[1])
|
||||
elseif axis[:scale] in (:none, :identity)
|
||||
ratio = 1
|
||||
else
|
||||
return nothing
|
||||
end
|
||||
first_step = ticks[2] - ticks[1]
|
||||
last_step = ticks[end] - ticks[end-1]
|
||||
ticks = [ticks[1] - first_step/ratio; ticks; ticks[end] + last_step*ratio]
|
||||
scale = axis[:scale]
|
||||
log_scaled = scale ∈ _logScales
|
||||
base = get(_logScaleBases, scale, nothing)
|
||||
|
||||
# add one phantom tick either side of the ticks to ensure minor ticks extend to the axis limits
|
||||
if log_scaled
|
||||
sub = round(Int, log(base, ticks[2] / ticks[1]))
|
||||
ticks = [ticks[1] / base; ticks; ticks[end] * base]
|
||||
else
|
||||
sub = 1 # unused
|
||||
ratio = length(ticks) > 2 ? (ticks[3] - ticks[2]) / (ticks[2] - ticks[1]) : 1
|
||||
first_step = ticks[2] - ticks[1]
|
||||
last_step = ticks[end] - ticks[end-1]
|
||||
ticks = [ticks[1] - first_step / ratio; ticks; ticks[end] + last_step * ratio]
|
||||
end
|
||||
|
||||
# default to 9 intervals between major ticks for log10 scale and 5 intervals otherwise
|
||||
n_default = (scale == :log10) ? 9 : 5
|
||||
n = typeof(axis[:minorticks]) <: Integer && axis[:minorticks] > 1 ? axis[:minorticks] : n_default
|
||||
|
||||
#Default to 5 intervals between major ticks
|
||||
n = typeof(axis[:minorticks]) <: Integer && axis[:minorticks] > 1 ? axis[:minorticks] : 5
|
||||
minorticks = typeof(ticks[1])[]
|
||||
for (i,hi) in enumerate(ticks[2:end])
|
||||
for (i, hi) ∈ enumerate(ticks[2:end])
|
||||
lo = ticks[i]
|
||||
if isfinite(lo) && isfinite(hi) && hi > lo
|
||||
append!(minorticks,collect(lo + (hi-lo)/n :(hi-lo)/n: hi - (hi-lo)/2n))
|
||||
if log_scaled
|
||||
for e ∈ 1:sub
|
||||
lo_ = lo * base^(e - 1)
|
||||
hi_ = lo_ * base
|
||||
step = (hi_ - lo_) / n
|
||||
append!(minorticks, collect(
|
||||
lo_ + (e > 1 ? 0 : step) : step : hi_ - (e < sub ? 0 : step / 2)
|
||||
))
|
||||
end
|
||||
else
|
||||
step = (hi - lo) / n
|
||||
append!(minorticks, collect(lo + step : step : hi - step / 2))
|
||||
end
|
||||
end
|
||||
end
|
||||
minorticks[amin .<= minorticks .<= amax]
|
||||
@@ -492,12 +512,12 @@ end
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# push the limits out slightly
|
||||
function widen(lmin, lmax, scale = :identity)
|
||||
function widen(lmin, lmax, scale=:identity)
|
||||
f, invf = RecipesPipeline.scale_func(scale), RecipesPipeline.inverse_scale_func(scale)
|
||||
span = f(lmax) - f(lmin)
|
||||
# eps = NaNMath.max(1e-16, min(1e-2span, 1e-10))
|
||||
eps = NaNMath.max(1e-16, 0.03span)
|
||||
invf(f(lmin)-eps), invf(f(lmax)+eps)
|
||||
invf(f(lmin) - eps), invf(f(lmax) + eps)
|
||||
end
|
||||
|
||||
# figure out if widening is a good idea.
|
||||
@@ -519,10 +539,11 @@ function default_should_widen(axis::Axis)
|
||||
false
|
||||
end
|
||||
|
||||
function round_limits(amin,amax)
|
||||
scale = 10^(1-round(log10(amax - amin)))
|
||||
amin = floor(amin*scale)/scale
|
||||
amax = ceil(amax*scale)/scale
|
||||
function round_limits(amin, amax, scale)
|
||||
base = get(_logScaleBases, scale, 10.)
|
||||
factor = base^(1 - round(log(base, amax - amin)))
|
||||
amin = floor(amin * factor) / factor
|
||||
amax = ceil(amax * factor) / factor
|
||||
amin, amax
|
||||
end
|
||||
|
||||
@@ -559,7 +580,7 @@ function axis_limits(sp, letter, should_widen = default_should_widen(sp[Symbol(l
|
||||
if axis[:letter] == :x
|
||||
amin, amax = 0, 2pi
|
||||
elseif lims == :auto
|
||||
#widen max radius so ticks dont overlap with theta axis
|
||||
# widen max radius so ticks dont overlap with theta axis
|
||||
0, amax + 0.1 * abs(amax - amin)
|
||||
else
|
||||
amin, amax
|
||||
@@ -567,12 +588,15 @@ function axis_limits(sp, letter, should_widen = default_should_widen(sp[Symbol(l
|
||||
elseif should_widen
|
||||
widen(amin, amax, axis[:scale])
|
||||
elseif lims == :round
|
||||
round_limits(amin,amax)
|
||||
round_limits(amin, amax, axis[:scale])
|
||||
else
|
||||
amin, amax
|
||||
end
|
||||
|
||||
if !has_user_lims && consider_aspect && letter in (:x, :y) && !(sp[:aspect_ratio] in (:none, :auto) || RecipesPipeline.is3d(:sp))
|
||||
if (
|
||||
!has_user_lims && consider_aspect && letter in (:x, :y) &&
|
||||
!(sp[:aspect_ratio] in (:none, :auto) || RecipesPipeline.is3d(:sp))
|
||||
)
|
||||
aspect_ratio = isa(sp[:aspect_ratio], Number) ? sp[:aspect_ratio] : 1
|
||||
plot_ratio = height(plotarea(sp)) / width(plotarea(sp))
|
||||
dist = amax - amin
|
||||
@@ -708,6 +732,7 @@ function axis_drawing_info(sp, letter)
|
||||
invf = RecipesPipeline.inverse_scale_func(oax[:scale])
|
||||
|
||||
add_major_or_minor_segments(ticks, grid, segments, factor, cond) = begin
|
||||
ticks === nothing && return
|
||||
if cond
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + factor * (f(oamax) - f(oamin)))
|
||||
@@ -737,12 +762,14 @@ function axis_drawing_info(sp, letter)
|
||||
end
|
||||
end
|
||||
|
||||
ax_length = letter === :x ? height(sp.plotarea).value : width(sp.plotarea).value
|
||||
|
||||
# add major grid segments
|
||||
add_major_or_minor_segments(ticks[1], ax[:grid], grid_segments, 0.012, ax[:tick_direction] !== :none)
|
||||
add_major_or_minor_segments(ticks[1], ax[:grid], grid_segments, 1.2 / ax_length, ax[:tick_direction] !== :none)
|
||||
|
||||
# add minor grid segments
|
||||
if ax[:minorticks] ∉ (:none, nothing, false) || ax[:minorgrid]
|
||||
add_major_or_minor_segments(minor_ticks, ax[:minorgrid], minorgrid_segments, 0.006, true)
|
||||
add_major_or_minor_segments(minor_ticks, ax[:minorgrid], minorgrid_segments, 0.6 / ax_length, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -833,6 +860,7 @@ function axis_drawing_info_3d(sp, letter)
|
||||
ga0, ga1 = sp[:framestyle] in (:origin, :zerolines) ? (namin, namax) : (na0, na1)
|
||||
|
||||
add_major_or_minor_segments(ticks, grid, segments, factor, cond) = begin
|
||||
ticks === nothing && return
|
||||
if cond
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + factor * (f(namax) - f(namin)))
|
||||
|
||||
+102
@@ -256,6 +256,7 @@ end
|
||||
@init_backend PGFPlotsX
|
||||
@init_backend InspectDR
|
||||
@init_backend HDF5
|
||||
@init_backend Gaston
|
||||
|
||||
# ---------------------------------------------------------
|
||||
|
||||
@@ -326,6 +327,9 @@ const _gr_attr = merge_with_base_supported([
|
||||
:guidefontrotation, :guidefontcolor,
|
||||
:grid, :gridalpha, :gridstyle, :gridlinewidth,
|
||||
:legend, :legendtitle, :colorbar, :colorbar_title, :colorbar_entry,
|
||||
:colorbar_titlefontfamily, :colorbar_titlefontsize,
|
||||
:colorbar_titlefontvalign, :colorbar_titlefonthalign,
|
||||
:colorbar_titlefontrotation, :colorbar_titlefontcolor,
|
||||
:fill_z, :line_z, :marker_z, :levels,
|
||||
:ribbon, :quiver,
|
||||
:orientation,
|
||||
@@ -352,6 +356,7 @@ const _gr_seriestype = [
|
||||
:scatter3d,
|
||||
:surface,
|
||||
:wireframe,
|
||||
:mesh3d,
|
||||
:volume,
|
||||
:shape,
|
||||
]
|
||||
@@ -574,6 +579,103 @@ const _pyplot_style = [:auto, :solid, :dash, :dot, :dashdot]
|
||||
const _pyplot_marker = vcat(_allMarkers, :pixel)
|
||||
const _pyplot_scale = [:identity, :ln, :log2, :log10]
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Gaston
|
||||
|
||||
function _initialize_backend(::GastonBackend)
|
||||
@eval Main begin
|
||||
import Gaston
|
||||
export Gaston
|
||||
end
|
||||
end
|
||||
|
||||
const _gaston_attr = merge_with_base_supported([
|
||||
# :annotations,
|
||||
# :background_color_legend,
|
||||
# :background_color_inside,
|
||||
# :background_color_outside,
|
||||
# :foreground_color_legend,
|
||||
# :foreground_color_grid, :foreground_color_axis,
|
||||
# :foreground_color_text, :foreground_color_border,
|
||||
:label,
|
||||
# :seriescolor, :seriesalpha,
|
||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||
:markershape, :markercolor, :markersize, :markeralpha,
|
||||
# :markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
||||
# :fillrange, :fillcolor, :fillalpha,
|
||||
# :bins,
|
||||
# :bar_width, :bar_edges,
|
||||
# :title,
|
||||
# :window_title,
|
||||
:guide,
|
||||
# :guide_position,
|
||||
:lims, :ticks, :scale, # :flip, :rotation,
|
||||
:tickfont, :guidefont,
|
||||
# :legendfont,
|
||||
# :grid, :legend,
|
||||
# :colorbar, :colorbar_title,
|
||||
# :fill_z, :line_z, :marker_z, :levels,
|
||||
# :ribbon, :quiver, :arrow,
|
||||
# :orientation,
|
||||
# :overwrite_figure,
|
||||
# :polar,
|
||||
# :normalize, :weights, :contours,
|
||||
# :aspect_ratio,
|
||||
:tick_direction,
|
||||
# :framestyle,
|
||||
# :camera,
|
||||
# :contour_labels,
|
||||
])
|
||||
|
||||
const _gaston_seriestype = [
|
||||
:path,
|
||||
:path3d,
|
||||
:scatter,
|
||||
:steppre,
|
||||
:stepmid,
|
||||
:steppost,
|
||||
:histogram2d,
|
||||
:ysticks, :xsticks,
|
||||
:contour,
|
||||
:shape,
|
||||
:straightline,
|
||||
:scatter3d,
|
||||
:contour3d,
|
||||
:wireframe,
|
||||
:heatmap,
|
||||
:surface,
|
||||
:mesh3d,
|
||||
]
|
||||
|
||||
const _gaston_style = [
|
||||
:auto,
|
||||
:solid,
|
||||
:dash,
|
||||
:dot,
|
||||
:dashdot,
|
||||
:dashdotdot
|
||||
]
|
||||
|
||||
const _gaston_marker = [
|
||||
:none,
|
||||
# :auto,
|
||||
:circle,
|
||||
:rect,
|
||||
:diamond,
|
||||
:utriangle,
|
||||
:dtriangle,
|
||||
:pentagon,
|
||||
:x,
|
||||
:+
|
||||
] #vcat(_allMarkers, Shape)
|
||||
|
||||
const _gaston_scale = [
|
||||
:identity,
|
||||
# :ln,
|
||||
# :log2,
|
||||
:log10,
|
||||
]
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# unicodeplots
|
||||
|
||||
|
||||
@@ -0,0 +1,425 @@
|
||||
# https://github.com/mbaz/Gaston.
|
||||
const G = Gaston
|
||||
const GastonSubplot = G.Plot
|
||||
const GASTON_MARKER_SCALING = 1.3 / 5.0
|
||||
const GNUPLOT_DPI = 72 # Compensate for DPI with increased resolution
|
||||
|
||||
|
||||
# --------------------------------------------
|
||||
# These functions are called by Plots
|
||||
# --------------------------------------------
|
||||
|
||||
# Create the window/figure for this backend.
|
||||
function _create_backend_figure(plt::Plot{GastonBackend})
|
||||
xsize, ysize = plt.attr[:size]
|
||||
G.set(termopts="""size $xsize,$ysize""")
|
||||
|
||||
state_handle = G.nexthandle() # for now all the figures will be kept
|
||||
plt.o = G.newfigure(state_handle)
|
||||
end
|
||||
|
||||
|
||||
function _before_layout_calcs(plt::Plot{GastonBackend})
|
||||
# Initialize all the subplots first
|
||||
plt.o.subplots = G.SubPlot[]
|
||||
|
||||
n1 = n2 = 0
|
||||
if length(plt.inset_subplots) > 0
|
||||
n1, sps = gaston_get_subplots(0, plt.inset_subplots, plt.layout)
|
||||
gaston_init_subplots(plt, sps)
|
||||
end
|
||||
|
||||
if length(plt.subplots) > 0
|
||||
n2, sps = gaston_get_subplots(0, plt.subplots, plt.layout)
|
||||
end
|
||||
|
||||
n = n1 + n2
|
||||
if n != length(plt.subplots)
|
||||
@error "Gaston: $n != $(length(plt.subplots))"
|
||||
end
|
||||
|
||||
# FIXME: find a way to support nested layouts
|
||||
# e.g. figures spanning multiple rows/cols
|
||||
plt.o.layout = gaston_init_subplots(plt, sps)
|
||||
|
||||
# Then add the series (curves in gaston)
|
||||
for series in plt.series_list
|
||||
gaston_add_series(plt, series)
|
||||
end
|
||||
nothing
|
||||
end
|
||||
|
||||
function _update_min_padding!(sp::Subplot{GastonBackend})
|
||||
# FIXME: make this more flexible
|
||||
sp.minpad = (20mm, 5mm, 2mm, 10mm)
|
||||
end
|
||||
|
||||
_update_plot_object(plt::Plot{GastonBackend}) = nothing
|
||||
|
||||
for (mime, term) in (
|
||||
"application/eps" => "epscairo", # NEED fixing TODO
|
||||
"image/eps" => "epslatex", # NEED fixing TODO
|
||||
"application/pdf" => "pdfcairo", # NEED fixing TODO
|
||||
"application/postscript" => "postscript", # NEED fixing TODO
|
||||
"image/svg+xml" => "svg",
|
||||
"text/latex" => "tikz", # NEED fixing TODO
|
||||
"application/x-tex" => "epslatex", # NEED fixing TODO
|
||||
"text/plain" => "dumb", # NEED fixing TODO
|
||||
)
|
||||
@eval function _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{GastonBackend})
|
||||
xsize, ysize = plt.attr[:size]
|
||||
termopts = """size $xsize,$ysize"""
|
||||
|
||||
tmpfile = G.tempname() * "." * $term
|
||||
G.save(
|
||||
term=$term,
|
||||
output=tmpfile,
|
||||
handle=plt.o.handle,
|
||||
saveopts=termopts
|
||||
)
|
||||
while !isfile(tmpfile) end # avoid race condition with read in next line
|
||||
write(io, read(tmpfile))
|
||||
rm(tmpfile, force=true)
|
||||
nothing
|
||||
end
|
||||
end
|
||||
|
||||
function _show(io::IO, mime::MIME{Symbol("image/png")}, plt::Plot{GastonBackend})
|
||||
scaling = plt.attr[:dpi] / GNUPLOT_DPI
|
||||
xsize, ysize = plt.attr[:size] .* scaling
|
||||
|
||||
# Scale all plot elements to match Plots.jl DPI standard
|
||||
termopts = """size $xsize,$ysize fontscale $scaling lw $scaling dl $scaling ps $scaling"""
|
||||
|
||||
tmpfile = G.tempname()
|
||||
G.save(
|
||||
term="pngcairo",
|
||||
output=tmpfile,
|
||||
handle=plt.o.handle,
|
||||
saveopts=termopts
|
||||
)
|
||||
while !isfile(tmpfile) end # avoid race condition with read in next line
|
||||
write(io, read(tmpfile))
|
||||
rm(tmpfile, force=true)
|
||||
nothing
|
||||
end
|
||||
|
||||
_display(plt::Plot{GastonBackend}) = display(plt.o)
|
||||
|
||||
# --------------------------------------------
|
||||
# These functions are gaston specific
|
||||
# --------------------------------------------
|
||||
|
||||
function gaston_get_subplots(n, plt_subplots, layout)
|
||||
nr, nc = size(layout)
|
||||
sps = Array{Any}(undef, nr, nc)
|
||||
for r ∈ 1:nr, c ∈ 1:nc # NOTE: col major
|
||||
l = layout[r, c]
|
||||
if l isa GridLayout
|
||||
n, sub = gaston_get_subplots(n, plt_subplots, l)
|
||||
sps[r, c] = size(sub) == (1, 1) ? only(sub) : sub
|
||||
else
|
||||
sps[r, c] = get(l.attr, :blank, false) ? nothing : plt_subplots[n += 1]
|
||||
end
|
||||
end
|
||||
return n, sps
|
||||
end
|
||||
|
||||
function gaston_init_subplots(plt, sps)
|
||||
sz = nr, nc = size(sps)
|
||||
for c ∈ 1:nc, r ∈ 1:nr # NOTE: row major
|
||||
sp = sps[r, c]
|
||||
if sp isa Subplot || sp === nothing
|
||||
gaston_init_subplot(plt, sp)
|
||||
else
|
||||
gaston_init_subplots(plt, sp)
|
||||
sz = max.(sz, size(sp))
|
||||
end
|
||||
end
|
||||
return sz
|
||||
end
|
||||
|
||||
function gaston_init_subplot(plt::Plot{GastonBackend}, sp::Subplot{GastonBackend})
|
||||
if sp === nothing
|
||||
push!(plt.o.subplots, sp)
|
||||
else
|
||||
sp.o = GastonSubplot(
|
||||
dims=RecipesPipeline.is3d(sp) ? 3 : 2,
|
||||
axesconf=gaston_parse_axes_args(plt, sp), # Gnuplot string
|
||||
curves=[]
|
||||
)
|
||||
push!(plt.o.subplots, sp.o)
|
||||
end
|
||||
nothing
|
||||
end
|
||||
|
||||
function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
|
||||
# Gaston.Curve = Plots.Series
|
||||
sp = series[:subplot]
|
||||
g_sp = sp.o # Gaston subplot object
|
||||
|
||||
if series[:seriestype] ∈ (:heatmap, :contour) && g_sp.dims == 2
|
||||
g_sp.dims = 3 # FIXME: this is ugly, we need heatmap/contour to use splot, not plot
|
||||
end
|
||||
|
||||
x = series[:x]
|
||||
y = series[:y]
|
||||
z = g_sp.dims == 2 ? nothing : series[:z]
|
||||
if z isa Surface
|
||||
z = z.surf
|
||||
end
|
||||
|
||||
seriesconf = gaston_seriesconf!(sp, series) # Gnuplot string
|
||||
c = G.Curve(x, y, z, nothing, seriesconf)
|
||||
|
||||
isfirst = length(g_sp.curves) == 0 ? true : false
|
||||
push!(g_sp.curves, c)
|
||||
G.write_data(c, g_sp.dims, g_sp.datafile, append = isfirst ? false : true)
|
||||
nothing
|
||||
end
|
||||
|
||||
function gaston_seriesconf!(sp, series::Series)
|
||||
gsp = sp.o
|
||||
curveconf = String[]
|
||||
st = series[:seriestype]
|
||||
|
||||
clims = get_clims(sp, series)
|
||||
if st ∈ (:scatter, :scatter3d)
|
||||
pt, ps, lc = gaston_mk_ms_mc(series)
|
||||
push!(curveconf, """with points pt $pt ps $ps lc $lc""")
|
||||
elseif st ∈ (:path, :straightline, :path3d)
|
||||
lc, dt, lw = gaston_lc_ls_lw(series)
|
||||
if series[:markershape] == :none # simplepath
|
||||
push!(curveconf, """with lines lc $lc dt $dt lw $lw""")
|
||||
else
|
||||
pt, ps = gaston_mk_ms_mc(series)
|
||||
push!(curveconf, """with lp lc $lc dt $dt lw $lw pt $pt ps $ps""")
|
||||
end
|
||||
elseif st == :shape
|
||||
fc = gaston_color(series[:fillcolor], series[:fillalpha])
|
||||
fs = "solid"
|
||||
lc, _ = gaston_lc_ls_lw(series)
|
||||
push!(curveconf, """with filledcurves fc $fc fs $fs border lc $lc""")
|
||||
elseif st == :steppre
|
||||
push!(curveconf, """with steps""")
|
||||
elseif st == :steppost
|
||||
push!(curveconf, """with fsteps""") # Not sure if not the other way
|
||||
elseif st ∈ (:contour, :contour3d)
|
||||
push!(curveconf, """with lines""")
|
||||
if st == :contour
|
||||
gsp.axesconf *= """\nset view map\nunset surface"""
|
||||
end
|
||||
levels = join(map(string, collect(contour_levels(series, clims))), ", ")
|
||||
gsp.axesconf *= """\nset contour base\nset cntrparam levels discrete $levels """
|
||||
elseif st ∈ (:surface, :heatmap)
|
||||
palette = gaston_palette(series[:seriescolor])
|
||||
gsp.axesconf *= """\nset palette model RGB defined $palette"""
|
||||
if st == :heatmap
|
||||
gsp.axesconf *= """\nset view map"""
|
||||
end
|
||||
push!(curveconf, """with pm3d""")
|
||||
elseif st == :wireframe
|
||||
lc, dt, lw = gaston_lc_ls_lw(series)
|
||||
push!(curveconf, """with lines lc $lc dt $dt lw $lw""")
|
||||
else
|
||||
@warn "Gaston: $st is not implemented yet"
|
||||
end
|
||||
|
||||
# label
|
||||
push!(curveconf, """title "$(series[:label])" """)
|
||||
return join(curveconf, " ")
|
||||
end
|
||||
|
||||
function gaston_parse_axes_args(plt::Plot{GastonBackend}, sp::Subplot{GastonBackend})
|
||||
axesconf = String[]
|
||||
# Standard 2d axis
|
||||
if !ispolar(sp) && !RecipesPipeline.is3d(sp)
|
||||
# TODO: configure grid, axis spines, thickness
|
||||
end
|
||||
|
||||
for letter in (:x, :y, :z)
|
||||
axis_attr = sp.attr[Symbol(letter, :axis)]
|
||||
# label names
|
||||
push!(axesconf, """set $(letter)label "$(axis_attr[:guide])" """)
|
||||
push!(axesconf, """set $(letter)label font "$(axis_attr[:guidefontfamily]), $(axis_attr[:guidefontsize])" """)
|
||||
|
||||
# Handle ticks
|
||||
# ticksyle
|
||||
push!(axesconf, """set $(letter)tics font "$(axis_attr[:tickfontfamily]), $(axis_attr[:tickfontsize])" """)
|
||||
push!(axesconf, """set $(letter)tics textcolor rgb "#$(hex(axis_attr[:tickfontcolor], :rrggbb))" """)
|
||||
push!(axesconf, """set $(letter)tics $(axis_attr[:tick_direction])""")
|
||||
|
||||
mirror = axis_attr[:mirror] ? "mirror" : "nomirror"
|
||||
push!(axesconf, """set $(letter)tics $(mirror) """)
|
||||
|
||||
logscale = if axis_attr[:scale] == :identity
|
||||
"nologscale"
|
||||
elseif axis_attr[:scale] == :log10
|
||||
"logscale"
|
||||
end
|
||||
push!(axesconf, """set $logscale $(letter)""")
|
||||
|
||||
# tick locations
|
||||
if axis_attr[:ticks] != :native
|
||||
# axis limits
|
||||
from, to = axis_limits(sp, letter)
|
||||
push!(axesconf, """set $(letter)range [$from:$to]""")
|
||||
|
||||
ticks = get_ticks(sp, axis_attr)
|
||||
gaston_set_ticks!(axesconf, ticks, letter)
|
||||
end
|
||||
|
||||
ratio = get_aspect_ratio(sp)
|
||||
if ratio != :none
|
||||
if ratio == :equal
|
||||
ratio = -1
|
||||
end
|
||||
push!(axesconf, """set size ratio $ratio""")
|
||||
end
|
||||
end
|
||||
gaston_set_legend!(axesconf, sp) # Set legend params
|
||||
|
||||
if sp[:title] != nothing
|
||||
push!(axesconf, """set title '$(sp[:title])' """)
|
||||
push!(axesconf, """set title font '$(sp[:titlefontfamily]), $(sp[:titlefontsize])' """)
|
||||
end
|
||||
|
||||
return join(axesconf, "\n")
|
||||
end
|
||||
|
||||
function gaston_set_ticks!(axesconf, ticks, letter)
|
||||
ticks == :auto && return
|
||||
if ticks ∈ (:none, nothing, false)
|
||||
push!(axesconf, """unset $(letter)tics """)
|
||||
return
|
||||
end
|
||||
|
||||
ttype = ticksType(ticks)
|
||||
if ttype == :ticks
|
||||
tick_locations = @view ticks[:]
|
||||
gaston_tick_string = []
|
||||
for i in eachindex(tick_locations)
|
||||
lac = tick_locations[i]
|
||||
push!(gaston_tick_string, "$loc")
|
||||
end
|
||||
push!(
|
||||
axesconf,
|
||||
"set $(letter)tics (" * join(gaston_tick_string, ", ") * ")"
|
||||
)
|
||||
elseif ttype == :ticks_and_labels
|
||||
tick_locations = @view ticks[1][:]
|
||||
tick_labels = @view ticks[2][:]
|
||||
gaston_tick_string = []
|
||||
for i in eachindex(tick_locations)
|
||||
loc = tick_locations[i]
|
||||
lab = gaston_enclose_tick_string(tick_labels[i])
|
||||
push!(gaston_tick_string, "'$lab' $loc")
|
||||
end
|
||||
push!(
|
||||
axesconf,
|
||||
"set $(letter)tics (" * join(gaston_tick_string, ", ") * ")"
|
||||
)
|
||||
else
|
||||
error("Invalid input for $(letter)ticks: $ticks")
|
||||
end
|
||||
nothing
|
||||
end
|
||||
|
||||
function gaston_set_legend!(axesconf, sp)
|
||||
leg = sp[:legend]
|
||||
if sp[:legend] ∉ (:none, :inline)
|
||||
if leg == :best
|
||||
leg = :topright
|
||||
end
|
||||
|
||||
if occursin("outer", string(leg))
|
||||
push!(axesconf, "set key outside")
|
||||
else
|
||||
push!(axesconf, "set key inside")
|
||||
end
|
||||
positions = ["top", "bottom", "left", "right"]
|
||||
for position in positions
|
||||
if occursin(position, string(leg))
|
||||
push!(axesconf, "set key $position")
|
||||
end
|
||||
end
|
||||
if sp[:legendtitle] != nothing
|
||||
push!(axesconf, "set key title '$(sp[:legendtitle])'")
|
||||
end
|
||||
push!(axesconf, "set key box linewidth 1")
|
||||
push!(axesconf, "set key opaque")
|
||||
|
||||
push!(axesconf, "set border back")
|
||||
push!(axesconf, """set key font "$(sp[:legendfontfamily]), $(sp[:legendfontsize])" """)
|
||||
else
|
||||
push!(axesconf, "set key off")
|
||||
|
||||
end
|
||||
nothing
|
||||
end
|
||||
|
||||
# --------------------------------------------
|
||||
# Helpers
|
||||
# --------------------------------------------
|
||||
|
||||
gaston_lc_ls_lw(series::Series) = (
|
||||
gaston_color(series[:linecolor], series[:linealpha]),
|
||||
gaston_linestyle(series[:linestyle]),
|
||||
series[:linewidth],
|
||||
)
|
||||
|
||||
gaston_mk_ms_mc(series::Series) = (
|
||||
gaston_marker(series[:markershape]),
|
||||
series[:markersize] * GASTON_MARKER_SCALING,
|
||||
gaston_color(series[:markercolor], series[:markeralpha]),
|
||||
)
|
||||
|
||||
function gaston_palette(gradient)
|
||||
palette = String[]
|
||||
n = -1
|
||||
for rgba ∈ gradient # FIXME: naive conversion, inefficient ?
|
||||
push!(palette, "$(n += 1) $(rgba.r) $(rgba.g) $(rgba.b)")
|
||||
end
|
||||
return '(' * join(palette, ", ") * ')'
|
||||
end
|
||||
|
||||
function gaston_marker(marker)
|
||||
marker == :none && return -1
|
||||
marker == :circle && return 7
|
||||
marker == :rect && return 5
|
||||
marker == :diamond && return 28
|
||||
marker == :utriangle && return 9
|
||||
marker == :dtriangle && return 11
|
||||
marker == :+ && return 1
|
||||
marker == :x && return 2
|
||||
marker == :star5 && return 3
|
||||
marker == :pentagon && return 15
|
||||
marker == :pixel && return 0
|
||||
|
||||
@warn "Unsupported marker $marker"
|
||||
return 1
|
||||
end
|
||||
|
||||
function gaston_color(color, alpha=0.)
|
||||
col = single_color(color) # in case of gradients
|
||||
col = alphacolor(col, alpha == nothing ? 0. : alpha) # add a default alpha if non existent
|
||||
return """rgb "#$(hex(col, :aarrggbb))" """
|
||||
end
|
||||
|
||||
function gaston_linestyle(style)
|
||||
style == :solid && return "1"
|
||||
style == :dash && return "2"
|
||||
style == :dot && return "3"
|
||||
style == :dashdot && return "4"
|
||||
style == :dashdotdot && return "5"
|
||||
end
|
||||
|
||||
function gaston_enclose_tick_string(tick_string)
|
||||
if findfirst("^", tick_string) == nothing
|
||||
return tick_string
|
||||
end
|
||||
|
||||
base, power = split(tick_string, "^")
|
||||
power = string("{", power, "}")
|
||||
return string(base, "^", power)
|
||||
end
|
||||
+54
-13
@@ -326,13 +326,15 @@ end
|
||||
# draw ONE Shape
|
||||
function gr_draw_marker(series, xi, yi, clims, i, msize, strokewidth, shape::Shape)
|
||||
sx, sy = coords(shape)
|
||||
# convert to ndc coords (percentages of window)
|
||||
GR.selntran(0)
|
||||
# convert to ndc coords (percentages of window) ...
|
||||
w, h = get_size(series)
|
||||
f = msize / (w + h)
|
||||
|
||||
xi, yi = GR.wctondc(xi, yi)
|
||||
xs = xi .+ sx .* f
|
||||
ys = yi .+ sy .* f
|
||||
|
||||
# ... convert back to world coordinates
|
||||
xs_ys = GR.ndctowc.(xi .+ sx .* f, yi .+ sy .* f)
|
||||
xs, ys = getindex.(xs_ys, 1), getindex.(xs_ys, 2)
|
||||
|
||||
# draw the interior
|
||||
mc = get_markercolor(series, clims, i)
|
||||
@@ -345,7 +347,6 @@ function gr_draw_marker(series, xi, yi, clims, i, msize, strokewidth, shape::Sha
|
||||
gr_set_line(strokewidth, :solid, msc, series)
|
||||
gr_set_transparency(msc, get_markerstrokealpha(series, i))
|
||||
GR.polyline(xs, ys)
|
||||
GR.selntran(1)
|
||||
end
|
||||
|
||||
function gr_nominal_size(s)
|
||||
@@ -524,7 +525,7 @@ function gr_draw_colorbar(cbar::GRColorbar, sp::Subplot, clims, viewport_plotare
|
||||
levels = _cbar_unique(contour_levels.(series, Ref(clims)), "levels")
|
||||
# GR implicitly uses the maximal z value as the highest level
|
||||
if levels[end] < clims[2]
|
||||
@warn("GR: highest contour level less than maximal z value is not supported.")
|
||||
@warn "GR: highest contour level less than maximal z value is not supported."
|
||||
# replace levels, rather than assign to levels[end], to ensure type
|
||||
# promotion in case levels is an integer array
|
||||
levels = [levels[1:end-1]; clims[2]]
|
||||
@@ -558,11 +559,16 @@ function gr_draw_colorbar(cbar::GRColorbar, sp::Subplot, clims, viewport_plotare
|
||||
gr_set_line(1, :solid, plot_color(:black), sp)
|
||||
GR.axes(0, ztick, xmax, zmin, 0, 1, 0.005)
|
||||
|
||||
gr_set_font(guidefont(sp[:yaxis]), sp)
|
||||
title = if isa(sp[:colorbar_title], PlotText)
|
||||
sp[:colorbar_title]
|
||||
else
|
||||
text(sp[:colorbar_title], colorbartitlefont(sp))
|
||||
end
|
||||
gr_set_font(title.font, sp)
|
||||
GR.settextalign(GR.TEXT_HALIGN_CENTER, GR.TEXT_VALIGN_TOP)
|
||||
GR.setcharup(-1, 0)
|
||||
gr_text(
|
||||
viewport_plotarea[2] + 0.1, gr_view_ycenter(viewport_plotarea), sp[:colorbar_title]
|
||||
viewport_plotarea[2] + 0.1, gr_view_ycenter(viewport_plotarea), title.str
|
||||
)
|
||||
|
||||
GR.restorestate()
|
||||
@@ -612,7 +618,7 @@ end
|
||||
function gr_display(plt::Plot, fmt="")
|
||||
GR.clearws()
|
||||
|
||||
dpi_factor = plt[:dpi] / Plots.DPI
|
||||
dpi_factor = fmt == "png" ? plt[:dpi] / Plots.DPI : 1
|
||||
|
||||
# collect some monitor/display sizes in meters and pixels
|
||||
display_width_meters, display_height_meters, display_width_px, display_height_px = GR.inqdspsize()
|
||||
@@ -1682,7 +1688,7 @@ function gr_add_series(sp, series)
|
||||
end
|
||||
elseif st === :contour
|
||||
gr_draw_contour(series, x, y, z, clims)
|
||||
elseif st in (:surface, :wireframe)
|
||||
elseif st in (:surface, :wireframe, :mesh3d)
|
||||
gr_draw_surface(series, x, y, z, clims)
|
||||
elseif st === :volume
|
||||
sp[:legend] = :none
|
||||
@@ -1832,13 +1838,14 @@ end
|
||||
function gr_draw_contour(series, x, y, z, clims)
|
||||
GR.setspace(clims[1], clims[2], 0, 90)
|
||||
gr_set_line(get_linewidth(series), get_linestyle(series), get_linecolor(series), series)
|
||||
gr_set_transparency(get_fillalpha(series))
|
||||
is_lc_black = let black=plot_color(:black)
|
||||
plot_color(series[:linecolor]) in (black,[black])
|
||||
end
|
||||
h = gr_contour_levels(series, clims)
|
||||
if series[:fillrange] !== nothing
|
||||
if series[:fillcolor] != series[:linecolor] && !is_lc_black
|
||||
@warn("GR: filled contour only supported with black contour lines")
|
||||
@warn "GR: filled contour only supported with black contour lines"
|
||||
end
|
||||
GR.contourf(x, y, h, z, series[:contour_labels] == true ? 1 : 0)
|
||||
else
|
||||
@@ -1849,7 +1856,8 @@ end
|
||||
|
||||
function gr_draw_surface(series, x, y, z, clims)
|
||||
e_kwargs = series[:extra_kwargs]
|
||||
if series[:seriestype] === :surface
|
||||
st = series[:seriestype]
|
||||
if st === :surface
|
||||
fillalpha = get_fillalpha(series)
|
||||
fillcolor = get_fillcolor(series)
|
||||
# NOTE: setting nx = 0 or ny = 0 disables GR.gridit interpolation
|
||||
@@ -1864,9 +1872,42 @@ function gr_draw_surface(series, x, y, z, clims)
|
||||
else
|
||||
GR.gr3.surface(x, y, z, d_opt)
|
||||
end
|
||||
else # wireframe
|
||||
elseif st === :wireframe
|
||||
GR.setfillcolorind(0)
|
||||
GR.surface(x, y, z, get(e_kwargs, :display_option, GR.OPTION_FILLED_MESH))
|
||||
elseif st === :mesh3d
|
||||
@warn "GR: mesh3d is experimental (no face colors)"
|
||||
conn = series[:connections]
|
||||
if typeof(conn) <: Tuple{Array, Array, Array}
|
||||
ci, cj, ck = conn
|
||||
if !(length(ci) == length(cj) == length(ck))
|
||||
throw(ArgumentError("Argument connections must consist of equally sized arrays."))
|
||||
end
|
||||
else
|
||||
throw(ArgumentError("Argument connections has to be a tuple of three arrays."))
|
||||
end
|
||||
X = zeros(eltype(x), 4length(ci))
|
||||
Y = zeros(eltype(y), 4length(cj))
|
||||
Z = zeros(eltype(z), 4length(ck))
|
||||
@inbounds for I ∈ 1:length(ci)
|
||||
i = ci[I] + 1 # connections are 0-based
|
||||
j = cj[I] + 1
|
||||
k = ck[I] + 1
|
||||
m = 4(I - 1) + 1; n = m + 1; o = m + 2; p = m + 3
|
||||
X[m] = X[p] = x[i]
|
||||
Y[m] = Y[p] = y[i]
|
||||
Z[m] = Z[p] = z[i]
|
||||
X[n] = x[j]
|
||||
Y[n] = y[j]
|
||||
Z[n] = z[j]
|
||||
X[o] = x[k]
|
||||
Y[o] = y[k]
|
||||
Z[o] = z[k]
|
||||
end
|
||||
gr_set_line(get_linewidth(series), get_linestyle(series), get_linecolor(series), series)
|
||||
GR.polyline3d(X, Y, Z)
|
||||
else
|
||||
throw(ArgumentError("Not handled !"))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+29
-16
@@ -118,11 +118,22 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
end
|
||||
|
||||
for sp in plt.subplots
|
||||
bb1 = sp.plotarea
|
||||
bb2 = bbox(sp)
|
||||
dx, dy = bb2.x0
|
||||
sp_width = width(bb2)
|
||||
sp_height = height(bb2)
|
||||
if sp[:subplot_index] == plt[:plot_titleindex]
|
||||
x = dx + sp_width / 2 - 10mm # FIXME: get rid of magic constant
|
||||
y = dy + sp_height / 2
|
||||
pgfx_add_annotation!(the_plot, x, y, PlotText(plt[:plot_title], plottitlefont(plt)), pgfx_thickness_scaling(plt);
|
||||
cs = "",
|
||||
options = PGFPlotsX.Options("anchor" => "center")
|
||||
)
|
||||
continue
|
||||
end
|
||||
|
||||
sp_width = width(bb2)
|
||||
sp_height = height(bb2)
|
||||
dx, dy = bb2.x0
|
||||
lpad = leftpad(sp) + sp[:left_margin]
|
||||
rpad = rightpad(sp) + sp[:right_margin]
|
||||
tpad = toppad(sp) + sp[:top_margin]
|
||||
@@ -131,7 +142,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
dy += tpad
|
||||
axis_height = sp_height - (tpad + bpad)
|
||||
axis_width = sp_width - (rpad + lpad)
|
||||
|
||||
title_cstr = plot_color(sp[:titlefontcolor])
|
||||
title_a = alpha(title_cstr)
|
||||
title_loc = sp[:titlelocation]
|
||||
@@ -889,7 +899,7 @@ function pgfx_framestyle(style::Symbol)
|
||||
return style
|
||||
else
|
||||
default_style = get((semi = :box,), style, :axes)
|
||||
@warn( "Framestyle :$style is not (yet) supported by the PGFPlotsX backend. :$default_style was cosen instead.",)
|
||||
@warn "Framestyle :$style is not (yet) supported by the PGFPlotsX backend. :$default_style was chosen instead."
|
||||
default_style
|
||||
end
|
||||
end
|
||||
@@ -999,24 +1009,27 @@ function pgfx_marker(plotattributes, i = 1)
|
||||
)
|
||||
end
|
||||
|
||||
function pgfx_add_annotation!(o, x, y, val, thickness_scaling = 1)
|
||||
function pgfx_add_annotation!(o, x, y, val, thickness_scaling = 1; cs = "axis cs:", options = PGFPlotsX.Options())
|
||||
# Construct the style string.
|
||||
cstr = val.font.color
|
||||
a = alpha(cstr)
|
||||
push!(
|
||||
o,
|
||||
[
|
||||
join([
|
||||
"\\node",
|
||||
PGFPlotsX.Options(
|
||||
get((center = "", left = "right", right = "left"), val.font.halign, "") =>
|
||||
nothing,
|
||||
"color" => cstr,
|
||||
"draw opacity" => convert(Float16, a),
|
||||
"rotate" => val.font.rotation,
|
||||
"font" => pgfx_font(val.font.pointsize, thickness_scaling),
|
||||
),
|
||||
" at (axis cs:$x, $y) {$(val.str)};",
|
||||
],
|
||||
sprint(PGFPlotsX.print_tex, merge(
|
||||
PGFPlotsX.Options(
|
||||
get((hcenter = "", left = "right", right = "left"), val.font.halign, "") =>
|
||||
nothing,
|
||||
"color" => cstr,
|
||||
"draw opacity" => convert(Float16, a),
|
||||
"rotate" => val.font.rotation,
|
||||
"font" => pgfx_font(val.font.pointsize, thickness_scaling),
|
||||
),
|
||||
options
|
||||
)),
|
||||
string(" at (", cs, x, ",", y, ") {", val.str, "};"),
|
||||
]),
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
+66
-35
@@ -115,7 +115,7 @@ const _examples = PlotExample[
|
||||
)
|
||||
vline!([5, 10])
|
||||
title!("TITLE")
|
||||
yaxis!("YLABEL", :log10)
|
||||
yaxis!("YLABEL", :log10, minorgrid = true)
|
||||
end
|
||||
),
|
||||
],
|
||||
@@ -128,8 +128,7 @@ const _examples = PlotExample[
|
||||
:(
|
||||
begin
|
||||
import FileIO
|
||||
path =
|
||||
download("http://juliaplots.org/PlotReferenceImages.jl/Plots/pyplot/0.7.0/ref1.png")
|
||||
path = download("http://juliaplots.org/PlotReferenceImages.jl/Plots/pyplot/0.7.0/ref1.png")
|
||||
img = FileIO.load(path)
|
||||
plot(img)
|
||||
end
|
||||
@@ -370,10 +369,19 @@ const _examples = PlotExample[
|
||||
"Annotations",
|
||||
"""
|
||||
The `annotations` keyword is used for text annotations in data-coordinates. Pass in a
|
||||
tuple (x,y,text) or a vector of annotations. `annotate!(ann)` is shorthand for `plot!(;
|
||||
annotation=ann)`. Series annotations are used for annotating individual data points.
|
||||
They require only the annotation... x/y values are computed. A `PlotText` object can be
|
||||
build with the method `text(string, attr...)`, which wraps font and color attributes.
|
||||
tuple `(x, y, text)`, or a vector of annotations, each of which is a tuple of `x`, `y`
|
||||
and `text`.
|
||||
`text` may be a simple `String`, or a `PlotText` object, which can be
|
||||
built with the method `text(string, attrs...)`.
|
||||
This wraps font and color attributes and allows you to set text styling.
|
||||
`text` may also be a tuple `(string, attrs...)` of arguments which are passed
|
||||
to `Plots.text`.
|
||||
|
||||
`annotate!(ann)` is shorthand for `plot!(; annotation=ann)`.
|
||||
|
||||
Series annotations are used for annotating individual data points.
|
||||
They require only the annotation; x/y values are computed. Series annotations
|
||||
require either plain `String`s or `PlotText` objects.
|
||||
""",
|
||||
[
|
||||
:(
|
||||
@@ -385,11 +393,11 @@ const _examples = PlotExample[
|
||||
leg = false,
|
||||
)
|
||||
annotate!([
|
||||
(5, y[5], Plots.text("this is #5", 16, :red, :center)),
|
||||
(5, y[5], ("this is #5", 16, :red, :center)),
|
||||
(
|
||||
10,
|
||||
y[10],
|
||||
Plots.text("this is #10", :right, 20, "courier"),
|
||||
("this is #10", :right, 20, "courier"),
|
||||
),
|
||||
])
|
||||
scatter!(
|
||||
@@ -998,33 +1006,37 @@ const _examples = PlotExample[
|
||||
end]
|
||||
),
|
||||
PlotExample( # 47
|
||||
"Mesh3d",
|
||||
"""
|
||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||
You can also specify the connections using the connections keyword.
|
||||
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.
|
||||
""",
|
||||
[
|
||||
:(
|
||||
begin
|
||||
# specify the vertices
|
||||
x=[0, 1, 2, 0]
|
||||
y=[0, 0, 1, 2]
|
||||
z=[0, 2, 0, 1]
|
||||
"Mesh3d",
|
||||
"""
|
||||
Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically.
|
||||
You can also specify the connections using the connections keyword.
|
||||
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.
|
||||
""",
|
||||
[
|
||||
:(
|
||||
begin
|
||||
# specify the vertices
|
||||
x=[0, 1, 2, 0]
|
||||
y=[0, 0, 1, 2]
|
||||
z=[0, 2, 0, 1]
|
||||
|
||||
# specify the triangles
|
||||
# every column is one 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]
|
||||
# specify the triangles
|
||||
# every column is one 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]
|
||||
|
||||
# the four triangles gives above give a tetrahedron
|
||||
mesh3d(x,y,z;connections=(i,j,k))
|
||||
end
|
||||
),
|
||||
],
|
||||
# the four triangles gives above give a tetrahedron
|
||||
mesh3d(
|
||||
x, y, z; connections=(i, j, k),
|
||||
title="triangles", xlabel="x", ylabel="y", zlabel="z",
|
||||
legend=:none, margin=2Plots.mm
|
||||
)
|
||||
end
|
||||
),
|
||||
],
|
||||
),
|
||||
PlotExample( # 48
|
||||
"Vectors of markershapes and segments",
|
||||
@@ -1214,7 +1226,7 @@ const _examples = PlotExample[
|
||||
# Some constants for PlotDocs and PlotReferenceImages
|
||||
_animation_examples = [2, 31]
|
||||
_backend_skips = Dict(
|
||||
:gr => [25, 30, 47],
|
||||
:gr => [25, 30],
|
||||
:pyplot => [2, 25, 30, 31, 47, 49, 55],
|
||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51, 55],
|
||||
:plotly => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55],
|
||||
@@ -1228,6 +1240,25 @@ _backend_skips = Dict(
|
||||
49, # polar heatmap
|
||||
51, # image with custom axes
|
||||
],
|
||||
:inspectdr => [4, 6, 10, 22, 24, 28, 30, 38, 43, 45, 47, 48, 49, 50, 51, 55],
|
||||
:unicodeplots => [6, 10, 22, 24, 28, 38, 43, 45, 47, 49, 50, 51, 55],
|
||||
:gaston => [
|
||||
2, # animations
|
||||
4, # colors/palette issues
|
||||
6, # TODO: support embedded images
|
||||
10, # TODO: support histogram2d
|
||||
16, # TODO: support nested layouts
|
||||
27, # TODO: support polar
|
||||
30, # uses StatsPlots, deprecated ?
|
||||
31, # animations
|
||||
38, # TODO: support histogram2d
|
||||
47, # TODO: support mesh3d
|
||||
48, # TODO: vector of shapes, ...
|
||||
49, # TODO: support polar
|
||||
50, # TODO: 1D data not supported for pm3d
|
||||
51, # TODO: support embedded images
|
||||
55, # TODO: scaling is ugly
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +70,11 @@ function __init__()
|
||||
include(fn)
|
||||
end
|
||||
|
||||
@require Gaston = "4b11ee91-296f-5714-9832-002c20994614" begin
|
||||
fn = joinpath(@__DIR__, "backends", "gaston.jl")
|
||||
include(fn)
|
||||
end
|
||||
|
||||
@require IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" begin
|
||||
if IJulia.inited
|
||||
_init_ijulia_plotting()
|
||||
|
||||
+35
-2
@@ -141,7 +141,7 @@ function _add_smooth_kw(kw_list::Vector{KW}, kw::AKW)
|
||||
end
|
||||
|
||||
|
||||
RecipesPipeline.get_axis_limits(plt::Plot, letter) = axis_limits(plt[1], letter)
|
||||
RecipesPipeline.get_axis_limits(plt::Plot, letter) = axis_limits(plt[1], letter, false)
|
||||
|
||||
|
||||
## Plot recipes
|
||||
@@ -243,10 +243,17 @@ function _subplot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
|
||||
attr = KW()
|
||||
for (k, v) in collect(kw)
|
||||
if is_subplot_attr(k) || is_axis_attr(k)
|
||||
attr[k] = pop!(kw, k)
|
||||
v = pop!(kw, k)
|
||||
if sps isa AbstractArray && v isa AbstractArray && length(v) == length(sps)
|
||||
v = v[series_idx(kw_list, kw)]
|
||||
end
|
||||
attr[k] = v
|
||||
end
|
||||
if is_axis_attr_noletter(k)
|
||||
v = pop!(kw, k)
|
||||
if sps isa AbstractArray && v isa AbstractArray && length(v) == length(sps)
|
||||
v = v[series_idx(kw_list, kw)]
|
||||
end
|
||||
for letter in (:x, :y, :z)
|
||||
attr[Symbol(letter, k)] = v
|
||||
end
|
||||
@@ -262,6 +269,7 @@ function _subplot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
|
||||
sp_attrs[sp] = attr
|
||||
end
|
||||
|
||||
_add_plot_title!(plt)
|
||||
# override subplot/axis args. `sp_attrs` take precendence
|
||||
for (idx, sp) in enumerate(plt.subplots)
|
||||
attr = if !haskey(plotattributes, :subplot) || plotattributes[:subplot] == idx
|
||||
@@ -274,12 +282,37 @@ function _subplot_setup(plt::Plot, plotattributes::AKW, kw_list::Vector{KW})
|
||||
|
||||
# do we need to link any axes together?
|
||||
link_axes!(plt.layout, plt[:link])
|
||||
return nothing
|
||||
end
|
||||
|
||||
function series_idx(kw_list::AVec{KW}, kw::AKW)
|
||||
Int(kw[:series_plotindex]) - Int(kw_list[1][:series_plotindex]) + 1
|
||||
end
|
||||
|
||||
function _add_plot_title!(plt)
|
||||
plot_title = plt[:plot_title]
|
||||
if plot_title != ""
|
||||
the_layout = plt.layout
|
||||
vspan = plt[:plot_titlevspan]
|
||||
plt.layout = grid(2, 1, heights=(vspan, 1 - vspan))
|
||||
plt.layout.grid[1, 1] = subplot = Subplot(plt.backend, parent=plt.layout[1, 1])
|
||||
plt.layout.grid[2, 1] = the_layout
|
||||
subplot.plt = plt
|
||||
# propagate arguments plt[:plot_titleXXX] --> subplot[:titleXXX]
|
||||
for sym ∈ filter(x -> startswith(string(x), "plot_title"), keys(_plot_defaults))
|
||||
subplot[Symbol(string(sym)[length("plot_") + 1:end])] = plt[sym]
|
||||
end
|
||||
top = plt.backend isa PyPlotBackend ? nothing : 0mm
|
||||
bot = 0mm
|
||||
plt[:force_minpad] = nothing, top, nothing, bot
|
||||
subplot[:subplot_index] = last(plt.subplots)[:subplot_index] + 1
|
||||
plt[:plot_titleindex] = subplot[:subplot_index]
|
||||
subplot[:framestyle] = :none
|
||||
subplot[:margin] = 0px
|
||||
push!(plt.subplots, subplot)
|
||||
end
|
||||
return nothing
|
||||
end
|
||||
|
||||
## Series recipes
|
||||
|
||||
|
||||
+11
@@ -160,6 +160,7 @@ function plot!(plt1::Plot, plt2::Plot, plts_tail::Plot...; kw...)
|
||||
cmdidx += 1
|
||||
end
|
||||
end
|
||||
_add_plot_title!(plt)
|
||||
|
||||
# first apply any args for the subplots
|
||||
for (idx,sp) in enumerate(plt.subplots)
|
||||
@@ -225,6 +226,16 @@ function prepare_output(plt::Plot)
|
||||
_update_min_padding!(sp)
|
||||
end
|
||||
|
||||
# spedific to :plot_title see _add_plot_title!
|
||||
force_minpad = get(plt, :force_minpad, ())
|
||||
if !isempty(force_minpad)
|
||||
for i ∈ eachindex(plt.layout.grid)
|
||||
plt.layout.grid[i].minpad = Tuple(
|
||||
i === nothing ? j : i for (i, j) ∈ zip(force_minpad, plt.layout.grid[i].minpad)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
# now another pass down, to update the bounding boxes
|
||||
update_child_bboxes!(plt.layout)
|
||||
|
||||
|
||||
+3
-1
@@ -453,12 +453,14 @@ Add annotations to an existing plot.
|
||||
# Arguments
|
||||
|
||||
- `anns`: An `AbstractVector` of tuples of the form `(x,y,text)`. The `text` object
|
||||
can be a `String` or `PlotText`.
|
||||
can be a `String`, `PlotText` PlotText (created with `text(args...)`),
|
||||
or a tuple of arguments to `text` (e.g., `("Label", 8, :red, :top)`).
|
||||
|
||||
# Example
|
||||
```julia-repl
|
||||
julia> plot(1:10)
|
||||
julia> annotate!([(7,3,"(7,3)"),(3,7,text("hey", 14, :left, :top, :green))])
|
||||
julia> annotate!([(4, 4, ("More text", 8, 45.0, :bottom, :red))])
|
||||
```
|
||||
"""
|
||||
annotate!(anns...; kw...) = plot!(; annotation = anns, kw...)
|
||||
|
||||
+5
-2
@@ -91,6 +91,7 @@ function series_segments(series::Series, seriestype::Symbol=:path; check=false)
|
||||
if v <= 0
|
||||
@warn "Invalid negative or zero value $v found at series index $i for $(scale) based $(scales[n])"
|
||||
@debug "" exception=(DomainError(v), stacktrace())
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -302,10 +303,12 @@ function convert_to_polar(theta, r, r_extrema = ignorenan_extrema(r))
|
||||
x, y
|
||||
end
|
||||
|
||||
function fakedata(sz...)
|
||||
fakedata(sz::Int...) = fakedata(Random.seed!(PLOTS_SEED), sz...)
|
||||
|
||||
function fakedata(rng::AbstractRNG, sz...)
|
||||
y = zeros(sz...)
|
||||
for r in 2:size(y,1)
|
||||
y[r,:] = 0.95 * vec(y[r-1,:]) + randn(size(y,2))
|
||||
y[r,:] = 0.95 * vec(y[r-1,:]) + randn(rng, size(y,2))
|
||||
end
|
||||
y
|
||||
end
|
||||
|
||||
+3
-2
@@ -6,14 +6,14 @@ function replace_rand!(ex::Expr)
|
||||
for arg in ex.args
|
||||
replace_rand!(arg)
|
||||
end
|
||||
if ex.head === :call && ex.args[1] ∈ (:rand, :randn)
|
||||
if ex.head === :call && ex.args[1] ∈ (:rand, :randn, :(Plots.fakedata))
|
||||
pushfirst!(ex.args, ex.args[1])
|
||||
ex.args[2] = :rng
|
||||
end
|
||||
end
|
||||
function fix_rand!(ex)
|
||||
replace_rand!(ex)
|
||||
pushfirst!(ex.args[1].args, :(rng = StableRNG(1234)))
|
||||
pushfirst!(ex.args[1].args, :(rng = StableRNG(PLOTS_SEED)))
|
||||
end
|
||||
|
||||
function image_comparison_tests(
|
||||
@@ -35,6 +35,7 @@ function image_comparison_tests(
|
||||
fn = "ref$idx.png"
|
||||
reffn = reference_file(pkg, idx, _current_plots_version)
|
||||
newfn = joinpath(reference_path(pkg, _current_plots_version), fn)
|
||||
@debug example.exprs
|
||||
|
||||
# test function
|
||||
func = (fn, idx) -> begin
|
||||
|
||||
+8
-9
@@ -1,4 +1,4 @@
|
||||
using Plots: guidefont, series_annotations
|
||||
using Plots: guidefont, series_annotations, PLOTS_SEED
|
||||
import ImageMagick
|
||||
using VisualRegressionTests
|
||||
using Plots
|
||||
@@ -13,7 +13,6 @@ import GeometryBasics
|
||||
using Dates
|
||||
using RecipesBase
|
||||
|
||||
|
||||
@testset "Plotly standalone" begin
|
||||
@test_nowarn Plots._init_ijulia_plotting()
|
||||
@test Plots.plotly_local_file_path[] === nothing
|
||||
@@ -68,30 +67,30 @@ end
|
||||
|
||||
include("imgcomp.jl")
|
||||
# don't actually show the plots
|
||||
Random.seed!(1234)
|
||||
Random.seed!(PLOTS_SEED)
|
||||
default(show=false, reuse=true)
|
||||
is_ci() = get(ENV, "CI", "false") == "true"
|
||||
const IMG_TOL = VERSION < v"1.4" && Sys.iswindows() ? 1e-1 : is_ci() ? 1e-2 : 1e-3
|
||||
const PLOTS_IMG_TOL = parse(Float64, get(ENV, "PLOTS_IMG_TOL", is_ci() ? "1e-4" : "1e-5"))
|
||||
|
||||
## Uncomment the following lines to update reference images for different backends
|
||||
|
||||
# @testset "GR" begin
|
||||
# image_comparison_facts(:gr, tol=IMG_TOL, skip = Plots._backend_skips[:gr])
|
||||
# image_comparison_facts(:gr, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:gr])
|
||||
# end
|
||||
#
|
||||
# plotly()
|
||||
# @testset "Plotly" begin
|
||||
# image_comparison_facts(:plotly, tol=IMG_TOL, skip = Plots._backend_skips[:plotlyjs])
|
||||
# image_comparison_facts(:plotly, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:plotlyjs])
|
||||
# end
|
||||
#
|
||||
# pyplot()
|
||||
# @testset "PyPlot" begin
|
||||
# image_comparison_facts(:pyplot, tol=IMG_TOL, skip = Plots._backend_skips[:pyplot])
|
||||
# image_comparison_facts(:pyplot, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:pyplot])
|
||||
# end
|
||||
#
|
||||
# pgfplotsx()
|
||||
# @testset "PGFPlotsX" begin
|
||||
# image_comparison_facts(:pgfplotsx, tol=IMG_TOL, skip = Plots._backend_skips[:pgfplotsx])
|
||||
# image_comparison_facts(:pgfplotsx, tol=PLOTS_IMG_TOL, skip = Plots._backend_skips[:pgfplotsx])
|
||||
# end
|
||||
|
||||
# 10 Histogram2D
|
||||
@@ -109,7 +108,7 @@ const IMG_TOL = VERSION < v"1.4" && Sys.iswindows() ? 1e-1 : is_ci() ? 1e-2 : 1e
|
||||
@static if haskey(ENV, "APPVEYOR")
|
||||
@info "Skipping GR image comparison tests on AppVeyor"
|
||||
else
|
||||
image_comparison_facts(:gr, tol=IMG_TOL, skip=Plots._backend_skips[:gr])
|
||||
image_comparison_facts(:gr, tol=PLOTS_IMG_TOL, skip=Plots._backend_skips[:gr])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Plots, Test
|
||||
using RecipesPipeline
|
||||
|
||||
@testset "plot" begin
|
||||
pl = plot(1:5)
|
||||
@@ -8,3 +9,11 @@ using Plots, Test
|
||||
plot!(pl, tex_output_standalone = true)
|
||||
@test pl[:tex_output_standalone] == true
|
||||
end
|
||||
|
||||
@testset "get_axis_limits" begin
|
||||
x = [.1, 5]
|
||||
p1 = plot(x, [5, .1], yscale=:log10)
|
||||
p2 = plot!(identity)
|
||||
@test all(RecipesPipeline.get_axis_limits(p1, :x) .== x)
|
||||
@test all(RecipesPipeline.get_axis_limits(p2, :x) .== x)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user