Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 89db9025c5 | |||
| 10ed39cf83 | |||
| 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 | |||
| c97900f7ee | |||
| 1b881619e3 | |||
| fbd5d79d49 | |||
| db7420fd5f | |||
| 09356ee3b5 | |||
| 0122d70640 | |||
| 5974d0ac31 | |||
| 81170b4342 | |||
| ee316e2913 | |||
| ef93aa87be | |||
| 88ebb8152d | |||
| 124d2d6aa3 | |||
| cdbafd60c8 | |||
| 5eb62abb25 | |||
| 3f110d6a6c | |||
| 293b43013b | |||
| 3536acbcc8 | |||
| 0ca5bc9124 | |||
| 14b38354da | |||
| 06c551ba51 | |||
| f63ee6d79e | |||
| b3f698c460 | |||
| 829860fa2d | |||
| 1523ef67d5 | |||
| e049b082f3 | |||
| f78899a1ef | |||
| e42b4ad34d | |||
| a7c629f775 | |||
| 1ddc673201 | |||
| bba971f7ea | |||
| 3f9105054c | |||
| a64ae3d13c | |||
| 7b0066c433 | |||
| d657c0cb33 | |||
| 50f63cf1eb | |||
| 2b22dae757 | |||
| 7ca32b5edd | |||
| 3f5a1287be | |||
| 990e0f3f7f | |||
| 849d31d57f |
@@ -44,6 +44,7 @@ jobs:
|
||||
- name: build documentation
|
||||
env:
|
||||
PYTHON: ""
|
||||
JULIA_DEBUG: "Documenter"
|
||||
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()'
|
||||
|
||||
+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"
|
||||
},
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.16.4"
|
||||
version = "1.19.3"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
@@ -36,7 +36,7 @@ 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"
|
||||
GR = "0.53, 0.54, 0.55, 0.57, 0.58"
|
||||
GeometryBasics = "0.2, 0.3.1"
|
||||
JSON = "0.21, 1"
|
||||
Latexify = "0.14, 0.15"
|
||||
|
||||
+69
-91
@@ -69,19 +69,18 @@ function _precompile_()
|
||||
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,), Tuple{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{(: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})
|
||||
@@ -89,10 +88,7 @@ function _precompile_()
|
||||
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{(:lims,), Tuple{Tuple{Int64, Int64}}},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{(:scale, :guide), Tuple{Symbol, String}},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{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},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)})
|
||||
@@ -105,23 +101,26 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_set_font)),NamedTuple{(:halign, :valign, :rotation, :color), Tuple{Symbol, Symbol, Int64, RGBA{Float64}}},typeof(gr_set_font),Font,Subplot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(hline!)),Any,typeof(hline!),Any})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(pie)),Any,typeof(pie),Any,Vararg{Any, N} where N})
|
||||
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})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{GRBackend},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:line, :seriestype), Tuple{Tuple{Int64, Symbol, Float64, Matrix{Symbol}}, Symbol}},typeof(plot!),Plot{PlotlyBackend},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Function,Float64,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Plot{GRBackend},Function,Vararg{Any, N} where N})
|
||||
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}},Vararg{Any, N} where N})
|
||||
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}},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Function,Float64,Irrational{:π}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:lw, :color), Tuple{Int64, Symbol}},typeof(plot!),Plot{GRBackend},Function,Float64,Vararg{Any, N} where N})
|
||||
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},Vararg{Any, N} where N})
|
||||
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},Vararg{Any, N} where N})
|
||||
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}})
|
||||
@@ -129,44 +128,44 @@ function _precompile_()
|
||||
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},Vararg{Any, N} where N})
|
||||
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},Vararg{Any, N} where N})
|
||||
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},Vararg{Vector{Int64}, N} where N})
|
||||
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}},Vararg{Any, N} where N})
|
||||
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}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:lab, :w, :palette, :fill, :α), Tuple{String, Int64, PlotUtils.ContinuousColorGradient, Int64, Float64}},typeof(plot),StepRange{Int64, Int64},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Vararg{Float64, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label, :title, :xlabel, :linewidth, :legend), Tuple{Matrix{String}, String, String, Int64, Symbol}},typeof(plot),Vector{Function},Float64,Float64})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:label,), Tuple{Matrix{String}}},typeof(plot),Vector{AbstractVector{Float64}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :group, :linetype, :linecolor), Tuple{GridLayout, Vector{String}, Matrix{Symbol}, Symbol}},typeof(plot),Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :label, :fillrange, :fillalpha), Tuple{Tuple{Int64, Int64}, String, Int64, Float64}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :link), Tuple{Int64, Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||
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{(:layout, :palette, :bg_inside), Tuple{Int64, Matrix{PlotUtils.ContinuousColorGradient}, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :t, :leg, :ticks, :border), Tuple{GridLayout, Matrix{Symbol}, Bool, Nothing, Symbol}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :title, :titlelocation, :left_margin, :bottom_margin, :xrotation), Tuple{GridLayout, Matrix{String}, Symbol, Matrix{AbsoluteLength}, AbsoluteLength, Int64}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xguide, :yguide, :xguidefonthalign, :yguidefontvalign, :xguideposition, :yguideposition, :ymirror, :xmirror, :legend, :seriestype), Tuple{Int64, String, String, Matrix{Symbol}, Matrix{Symbol}, Symbol, Matrix{Symbol}, Matrix{Bool}, Matrix{Bool}, Bool, Matrix{Symbol}}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{GridLayout, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Bool}},typeof(plot),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},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout, :xlims), Tuple{GridLayout, Tuple{Int64, Float64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:layout,), Tuple{Tuple{Int64, Int64}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||
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})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:legend,), Tuple{Symbol}},typeof(plot),Vector{Tuple{Int64, Real}}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :lab, :ms), Tuple{Tuple{Matrix{Symbol}, Int64}, Matrix{String}, Int64}},typeof(plot),Vector{Vector{T} where T},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :label, :legendtitle), Tuple{Tuple{Int64, Matrix{Symbol}}, Matrix{String}, String}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :leg, :fill), Tuple{Int64, Bool, Tuple{Int64, Symbol}}},typeof(plot),Function,Function,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :leg, :fill), Tuple{Int64, Bool, Tuple{Int64, Symbol}}},typeof(plot),Function,Function,Int64,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line, :marker, :bg, :fg, :xlim, :ylim, :leg), Tuple{Tuple{Int64, Symbol, Symbol}, Tuple{Shape{Float64, Float64}, Int64, RGBA{Float64}}, Symbol, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Bool}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:line_z, :linewidth, :legend), Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int64, Bool}},typeof(plot),Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:m, :markersize, :lab, :bg, :xlim, :ylim, :seriestype), Tuple{Matrix{Symbol}, Int64, Matrix{String}, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}, Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64}})
|
||||
@@ -177,29 +176,28 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :seriestype), Tuple{Int64, Symbol}},typeof(plot),Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio, :seriestype), Tuple{Tuple{Int64, Int64}, Bool, Bool, Int64, Symbol}},typeof(plot),Vector{ComplexF64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:proj, :m), Tuple{Symbol, Int64}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Vector{Float64}})
|
||||
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},Vararg{Any, N} where N})
|
||||
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},Vararg{Vector{Float64}, N} where N})
|
||||
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}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{DateTime},UnitRange{Int64},Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot),Vector{OHLC}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:st, :xlabel, :ylabel, :zlabel), Tuple{Symbol, String, String, String}},typeof(plot),Vector{Float64},Vector{Float64},Vararg{Vector{Float64}, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:st, :xlabel, :ylabel, :zlabel), Tuple{Symbol, String, String, String}},typeof(plot),Vector{Float64},Vector{Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :l, :seriestype), Tuple{String, Float64, Symbol}},typeof(plot),Vector{String},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xflip, :yflip, :zflip, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :xmirror, :ymirror, :zmirror, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, Bool, Bool, Bool, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title, :zlabel, :grid, :ylabel, :minorgrid, :xlabel, :seriestype), Tuple{String, String, Bool, String, Bool, String, Symbol}},typeof(plot),Vector{Float64},Vector{Float64},Function})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:title,), Tuple{Matrix{String}}},typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||
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{(:w,), Tuple{Int64}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:xaxis, :background_color, :leg), Tuple{Tuple{String, Tuple{Int64, Int64}, StepRange{Int64, Int64}, Symbol}, RGB{Float64}, Bool}},typeof(plot),Matrix{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:yflip, :aspect_ratio), Tuple{Bool, Symbol}},typeof(plot),Vector{Float64},Vector{Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:zcolor, :m, :leg, :cbar, :w), Tuple{StepRange{Int64, Int64}, Tuple{Int64, Float64, Symbol, Stroke}, Bool, Bool, Int64}},typeof(plot),Vector{Float64},Vector{Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot)),NamedTuple{(:zcolor, :m, :leg, :cbar, :w), Tuple{StepRange{Int64, Int64}, Tuple{Int64, Float64, Symbol, Stroke}, Bool, Bool, Int64}},typeof(plot),Vector{Float64},Vector{Float64},UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(portfoliocomposition)),Any,typeof(portfoliocomposition),Any,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(scatter!)),Any,typeof(scatter!),Any,Vararg{Any, N} where N})
|
||||
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}})
|
||||
@@ -213,7 +211,7 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:lens}},AbstractPlot})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:pie}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:quiver}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:spy}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:steppost}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:steppre}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:sticks}},Any,Any,Any})
|
||||
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),AbstractDict{Symbol, Any},Type{Val{:vline}},Any,Any,Any})
|
||||
@@ -236,11 +234,9 @@ 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),Base.OneTo{Int64},Vector{Int64}})
|
||||
Base.precompile(Tuple{typeof(_cycle),StepRange{Int64, Int64},Vector{Int64}})
|
||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},StepRange{Int64, Int64}})
|
||||
Base.precompile(Tuple{typeof(_cycle),Vector{Float64},UnitRange{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}})
|
||||
@@ -250,18 +246,17 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(_update_subplot_args),Plot{PlotlyBackend},Subplot{PlotlyBackend},Dict{Symbol, Any},Int64,Bool})
|
||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{GRBackend},Vector{Any}})
|
||||
Base.precompile(Tuple{typeof(_update_subplot_periphery),Subplot{PlotlyBackend},Vector{Any}})
|
||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{GRBackend},Symbol,Bool,Bool})
|
||||
Base.precompile(Tuple{typeof(axis_limits),Subplot{PlotlyBackend},Symbol,Bool,Bool})
|
||||
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(build_layout),GridLayout,Int64})
|
||||
Base.precompile(Tuple{typeof(contour),Any,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(convertLegendValue),Symbol})
|
||||
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(expand_extrema!),Axis,Base.OneTo{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})
|
||||
@@ -270,10 +265,9 @@ function _precompile_()
|
||||
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, Float64, Float64, Float64, Int64, Float64, Float64, Float64, 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}})
|
||||
Base.precompile(Tuple{typeof(gr_display),Subplot{GRBackend},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_colorbar),GRColorbar,Subplot{GRBackend},Tuple{Float64, Float64},Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_contour),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Matrix{Float64},Tuple{Float64, Float64}})
|
||||
@@ -283,7 +277,6 @@ function _precompile_()
|
||||
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,Base.OneTo{Int64},Vector{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_markers),Series,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},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}})
|
||||
@@ -293,14 +286,12 @@ function _precompile_()
|
||||
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}})
|
||||
Base.precompile(Tuple{typeof(gr_polyline),Vector{Float64},Vector{Float64},Function})
|
||||
Base.precompile(Tuple{typeof(gr_set_gradient),PlotUtils.ContinuousColorGradient})
|
||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}}})
|
||||
Base.precompile(Tuple{typeof(gr_update_viewport_legend!),Vector{Float64},Subplot{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(gr_update_viewport_legend!),Vector{Float64},Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}}})
|
||||
Base.precompile(Tuple{typeof(gr_viewport_from_bbox),Subplot{GRBackend},BoundingBox{Tuple{AbsoluteLength, AbsoluteLength}, Tuple{AbsoluteLength, AbsoluteLength}},AbsoluteLength,AbsoluteLength,Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(heatmap_edges),Base.OneTo{Int64},Symbol})
|
||||
Base.precompile(Tuple{typeof(heatmap_edges),StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol,StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}},Symbol,Tuple{Int64, Int64},Bool})
|
||||
@@ -310,8 +301,8 @@ function _precompile_()
|
||||
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_minimum),Vector{Int64}})
|
||||
Base.precompile(Tuple{typeof(layout_args),Int64})
|
||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
|
||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}})
|
||||
Base.precompile(Tuple{typeof(make_steps),Vector{Int64},Symbol,Bool})
|
||||
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})
|
||||
@@ -319,43 +310,45 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),StepRange{Int64, Int64},Tuple{Int64, Int64},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),UnitRange{Int64},Tuple{Float64, Float64},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(partialcircle),Int64,Float64,Int64})
|
||||
Base.precompile(Tuple{typeof(plot),Any,Any,Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(plot),Any,Any})
|
||||
Base.precompile(Tuple{typeof(plot),Any})
|
||||
Base.precompile(Tuple{typeof(processFillArg),Dict{Symbol, Any},Symbol})
|
||||
Base.precompile(Tuple{typeof(processGridArg!),DefaultsDict,Bool,Symbol})
|
||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend},Plot{GRBackend},Vararg{Plot{GRBackend}, N} where N})
|
||||
Base.precompile(Tuple{typeof(plot),Plot{GRBackend},Plot{GRBackend}})
|
||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend},Plot{PlotlyBackend},Vararg{Plot{PlotlyBackend}, N} where N})
|
||||
Base.precompile(Tuple{typeof(plot),Plot{PlotlyBackend},Plot{PlotlyBackend}})
|
||||
Base.precompile(Tuple{typeof(processGridArg!),Dict{Symbol, Any},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Matrix{Symbol}})
|
||||
Base.precompile(Tuple{typeof(processLineArg),Dict{Symbol, Any},Symbol})
|
||||
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},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Base.ReshapedArray{Int64, 2, UnitRange{Int64}, Tuple{}},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Bool},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{Int64},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{PlotUtils.ContinuousColorGradient},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{RGBA{Float64}},Int64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{String},Int64})
|
||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
||||
Base.precompile(Tuple{typeof(slice_arg),Matrix{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})
|
||||
let fbody = try __lookup_kwbody__(which(gr_polyline, (Vector{Float64},Vector{Float64},typeof(GR.fillarea),))) catch missing end
|
||||
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, (Symbol,Symbol,typeof(gr_polyline),Vector{Float64},Vector{Float64},typeof(GR.fillarea),))
|
||||
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
|
||||
@@ -378,21 +371,6 @@ function _precompile_()
|
||||
precompile(fbody, (Any,typeof(plot),Any,Vararg{Any, N} where N,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(plot, (Plot,Plot,Vararg{Plot, N} where N,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Any,typeof(plot),Plot,Plot,Vararg{Plot, 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,))
|
||||
|
||||
+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,
|
||||
|
||||
+107
-114
@@ -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
|
||||
@@ -703,62 +727,48 @@ function axis_drawing_info(sp, letter)
|
||||
)
|
||||
end
|
||||
end
|
||||
if !(ax[:ticks] in (:none, nothing, false))
|
||||
if ax[:ticks] ∉ (:none, nothing, false)
|
||||
f = RecipesPipeline.scale_func(oax[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(oax[:scale])
|
||||
if ax[:tick_direction] !== :none
|
||||
tick_start, tick_stop = if sp[:framestyle] == :origin
|
||||
t = invf(f(0) + 0.012 * (f(oamax) - f(oamin)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = ax[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(oa1) + 0.012 * (f(oa2) - f(oa1)) * ticks_in)
|
||||
(oa1, t)
|
||||
end
|
||||
end
|
||||
|
||||
for tick in ticks[1]
|
||||
if ax[:showaxis] && ax[:tick_direction] !== :none
|
||||
push!(
|
||||
tick_segments,
|
||||
reverse_if((tick, tick_start), isy),
|
||||
reverse_if((tick, tick_stop), isy),
|
||||
)
|
||||
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)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = ax[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(oa1) + factor * (f(oa2) - f(oa1)) * ticks_in)
|
||||
(oa1, t)
|
||||
end
|
||||
end
|
||||
if ax[:grid]
|
||||
push!(
|
||||
grid_segments,
|
||||
reverse_if((tick, oamin), isy),
|
||||
reverse_if((tick, oamax), isy),
|
||||
)
|
||||
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(oamax) - f(oamin)))
|
||||
(-t, t)
|
||||
else
|
||||
t = invf(f(oa1) + 0.006 * (f(oa2) - f(oa1)) * ticks_in)
|
||||
(oa1, t)
|
||||
end
|
||||
for tick in minor_ticks
|
||||
if ax[:showaxis]
|
||||
for tick in ticks
|
||||
if ax[:showaxis] && cond
|
||||
push!(
|
||||
tick_segments,
|
||||
reverse_if((tick, tick_start), isy),
|
||||
reverse_if((tick, tick_stop), isy),
|
||||
)
|
||||
end
|
||||
if ax[:minorgrid]
|
||||
if grid
|
||||
push!(
|
||||
minorgrid_segments,
|
||||
segments,
|
||||
reverse_if((tick, oamin), isy),
|
||||
reverse_if((tick, oamax), isy),
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# add major grid segments
|
||||
add_major_or_minor_segments(ticks[1], ax[:grid], grid_segments, 0.012, 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)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -841,74 +851,57 @@ function axis_drawing_info_3d(sp, 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))
|
||||
|
||||
if ax[:ticks] ∉ (:none, nothing, false)
|
||||
f = RecipesPipeline.scale_func(nax[:scale])
|
||||
invf = RecipesPipeline.inverse_scale_func(nax[:scale])
|
||||
if ax[:tick_direction] !== :none
|
||||
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
|
||||
end
|
||||
|
||||
ga0, ga1 = sp[:framestyle] in (:origin, :zerolines) ? (namin, namax) : (na0, na1)
|
||||
for tick in ticks[1]
|
||||
if ax[:showaxis] && ax[:tick_direction] !== :none
|
||||
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)
|
||||
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)))
|
||||
(-t, t)
|
||||
else
|
||||
ticks_in = ax[:tick_direction] == :out ? -1 : 1
|
||||
t = invf(f(na0) + factor * (f(na1) - f(na0)) * ticks_in)
|
||||
(na0, t)
|
||||
end
|
||||
end
|
||||
for tick in minor_ticks
|
||||
if ax[:showaxis] && ax[:tick_direction] !== :none
|
||||
|
||||
for tick in ticks
|
||||
if ax[:showaxis] && cond
|
||||
push!(
|
||||
tick_segments,
|
||||
sort_3d_axes(tick, tick_start, fa0, letter),
|
||||
sort_3d_axes(tick, tick_stop, fa0, letter),
|
||||
)
|
||||
end
|
||||
if ax[:minorgrid]
|
||||
if grid
|
||||
fa0_, fa1_ = reverse_if((fa0, fa1), ax[:mirror])
|
||||
ga0_, ga1_ = reverse_if((ga0, ga1), ax[:mirror])
|
||||
push!(
|
||||
minorgrid_segments,
|
||||
sort_3d_axes(tick, ga0, fa0, letter),
|
||||
sort_3d_axes(tick, ga1, fa0, letter),
|
||||
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),
|
||||
segments,
|
||||
sort_3d_axes(tick, ga1_, fa0_, letter),
|
||||
sort_3d_axes(tick, ga1_, fa1_, letter),
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# add major grid segments
|
||||
add_major_or_minor_segments(ticks[1], ax[:grid], grid_segments, 0.012, 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)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -256,6 +256,7 @@ end
|
||||
@init_backend PGFPlotsX
|
||||
@init_backend InspectDR
|
||||
@init_backend HDF5
|
||||
@init_backend Gaston
|
||||
|
||||
# ---------------------------------------------------------
|
||||
|
||||
@@ -352,6 +353,7 @@ const _gr_seriestype = [
|
||||
:scatter3d,
|
||||
:surface,
|
||||
:wireframe,
|
||||
:mesh3d,
|
||||
:volume,
|
||||
:shape,
|
||||
]
|
||||
@@ -574,6 +576,92 @@ 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,
|
||||
]
|
||||
|
||||
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,331 @@
|
||||
# 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 = plt.attr[:size][1]
|
||||
ysize = plt.attr[:size][2]
|
||||
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[]
|
||||
grid = size(plt.layout)
|
||||
plt.o.layout = grid
|
||||
|
||||
|
||||
for sp in plt.subplots
|
||||
gaston_init_subplot(plt, sp)
|
||||
end
|
||||
|
||||
# Then add the series (curves in gaston)
|
||||
for series in plt.series_list
|
||||
gaston_add_series(plt, series)
|
||||
end
|
||||
end
|
||||
|
||||
function _update_min_padding!(sp::Subplot{GastonBackend})
|
||||
sp.minpad = (20mm, 5mm, 2mm, 10mm)
|
||||
end
|
||||
|
||||
function _update_plot_object(plt::Plot{GastonBackend})
|
||||
end
|
||||
|
||||
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 = plt.attr[:size][1]
|
||||
ysize = plt.attr[:size][2]
|
||||
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 = plt.attr[:size][1] * scaling
|
||||
ysize = plt.attr[:size][2] * 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
|
||||
|
||||
|
||||
function _display(plt::Plot{GastonBackend})
|
||||
display(plt.o)
|
||||
end
|
||||
#
|
||||
# --------------------------------------------
|
||||
# These functions are gaston specific
|
||||
# --------------------------------------------
|
||||
#
|
||||
function gaston_init_subplot(plt::Plot{GastonBackend}, sp::Subplot{GastonBackend})
|
||||
dims = RecipesPipeline.is3d(sp) ? 3 : 2
|
||||
|
||||
axesconf = gaston_parse_axes_args(plt, sp) # Gnuplot string
|
||||
sp.o = GastonSubplot(dims=dims, axesconf = axesconf, curves = [])
|
||||
push!(plt.o.subplots, sp.o)
|
||||
|
||||
end
|
||||
|
||||
function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
|
||||
# Gaston.Curve = Plots.Series
|
||||
sp = series[:subplot]
|
||||
g_sp = sp.o # Gaston subplot object
|
||||
|
||||
seriesconf = gaston_parse_series_args(series) # Gnuplot string
|
||||
c = G.Curve(series[:x], series[:y], nothing, 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)
|
||||
end
|
||||
|
||||
function gaston_parse_series_args(series::Series)
|
||||
curveconf = String[]
|
||||
st = series[:seriestype]
|
||||
|
||||
if st == :scatter
|
||||
pt = gaston_marker(series[:markershape])
|
||||
ps = series[:markersize] * GASTON_MARKER_SCALING
|
||||
lc = gaston_color(series[:markercolor])
|
||||
# alpha = series[:markeralpha] # TODO merge alpha with rgb color
|
||||
push!(curveconf, """with points pt $pt ps $ps lc $lc""")
|
||||
elseif st == :path
|
||||
lc = gaston_color(series[:linecolor])
|
||||
dt = gaston_linestyle(series[:linestyle])
|
||||
lw = series[:linewidth]
|
||||
# alpha = series[:linealpha] # TODO merge alpha with rgb color
|
||||
if series[:markershape] == :none # simplepath
|
||||
push!(curveconf, """with lines lc $lc dt $dt lw $lw""")
|
||||
else
|
||||
pt = gaston_marker(series[:markershape])
|
||||
ps = series[:markersize] * GASTON_MARKER_SCALING
|
||||
push!(curveconf, """with lp lc $lc dt $dt lw $lw pt $pt ps $ps""")
|
||||
end
|
||||
elseif st == :shape
|
||||
fc = gaston_color(series[:fillcolor])
|
||||
fs = "solid"
|
||||
lc = gaston_color(series[:linecolor])
|
||||
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
|
||||
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
|
||||
# set title {"<title-text>"} {offset <offset>} {font "<font>{,<size>}"}{{textcolor | tc} {<colorspec> | default}} {{no}enhanced}1
|
||||
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 || ticks === nothing || ticks == 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
|
||||
end
|
||||
|
||||
function gaston_set_legend!(axesconf, sp)
|
||||
leg = sp[:legend]
|
||||
if !(sp[:legend] in(: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
|
||||
|
||||
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
|
||||
|
||||
gaston_color(color) = """rgb "#$(hex(color, :rrggbb))" """
|
||||
|
||||
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
|
||||
+118
-50
@@ -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)
|
||||
@@ -355,9 +356,9 @@ end
|
||||
|
||||
# draw ONE symbol marker
|
||||
function gr_draw_marker(series, xi, yi, clims, i, msize, strokewidth, shape::Symbol)
|
||||
GR.setborderwidth(strokewidth);
|
||||
gr_set_bordercolor(get_markerstrokecolor(series, i));
|
||||
gr_set_markercolor(get_markercolor(series, clims, i));
|
||||
GR.setborderwidth(strokewidth)
|
||||
gr_set_bordercolor(get_markerstrokecolor(series, i))
|
||||
gr_set_markercolor(get_markercolor(series, clims, i))
|
||||
gr_set_transparency(get_markeralpha(series, i))
|
||||
GR.setmarkertype(gr_markertype(shape))
|
||||
GR.setmarkersize(0.3msize / gr_nominal_size(series))
|
||||
@@ -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]]
|
||||
@@ -612,7 +613,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()
|
||||
@@ -651,12 +652,17 @@ end
|
||||
|
||||
function gr_set_tickfont(sp, letter)
|
||||
axis = sp[Symbol(letter, :axis)]
|
||||
|
||||
# invalidate alignment changes for small rotations (|θ| < 45°)
|
||||
trigger(rot) = abs(sind(rot)) < abs(cosd(rot)) ? 0 : sign(rot)
|
||||
|
||||
rot = axis[:rotation]
|
||||
if letter === :x || (RecipesPipeline.is3d(sp) && letter === :y)
|
||||
halign = (:left, :hcenter, :right)[sign(axis[:rotation]) + 2]
|
||||
valign = (axis[:mirror] ? :bottom : :top)
|
||||
halign = (:left, :hcenter, :right)[trigger(rot) + 2]
|
||||
valign = (axis[:mirror] ? :bottom : :top, :vcenter)[trigger(abs(rot)) + 1]
|
||||
else
|
||||
halign = (axis[:mirror] ? :left : :right)
|
||||
valign = (:top, :vcenter, :bottom)[sign(axis[:rotation]) + 2]
|
||||
halign = (axis[:mirror] ? :left : :right, :hcenter)[trigger(abs(rot)) + 1]
|
||||
valign = (:top, :vcenter, :bottom)[trigger(rot) + 2]
|
||||
end
|
||||
gr_set_font(
|
||||
tickfont(axis),
|
||||
@@ -1157,25 +1163,25 @@ function gr_legend_pos(theta::Real, leg, viewport_plotarea; axisclearance=nothin
|
||||
end
|
||||
|
||||
function gr_get_legend_geometry(viewport_plotarea, sp)
|
||||
legendn = 0
|
||||
legendw = 0
|
||||
legendn = legendw = dy = 0
|
||||
if sp[:legend] != :none
|
||||
GR.savestate()
|
||||
GR.selntran(0)
|
||||
GR.setscale(0)
|
||||
if sp[:legendtitle] !== nothing
|
||||
gr_set_font(legendtitlefont(sp), sp)
|
||||
legendn += 1
|
||||
tbx, tby = gr_inqtext(0, 0, string(sp[:legendtitle]))
|
||||
legendw = tbx[3] - tbx[1]
|
||||
legendn += 1
|
||||
dy = tby[3] - tby[1]
|
||||
end
|
||||
gr_set_font(legendfont(sp), sp)
|
||||
for series in series_list(sp)
|
||||
should_add_to_legend(series) || continue
|
||||
legendn += 1
|
||||
lab = series[:label]
|
||||
tbx, tby = gr_inqtext(0, 0, string(lab))
|
||||
tbx, tby = gr_inqtext(0, 0, string(series[:label]))
|
||||
legendw = max(legendw, tbx[3] - tbx[1]) # Holds text width right now
|
||||
dy = max(dy, tby[3] - tby[1])
|
||||
end
|
||||
|
||||
GR.setscale(1)
|
||||
@@ -1192,7 +1198,8 @@ function gr_get_legend_geometry(viewport_plotarea, sp)
|
||||
x_legend_offset = (viewport_plotarea[2] - viewport_plotarea[1]) / 30
|
||||
y_legend_offset = (viewport_plotarea[4] - viewport_plotarea[3]) / 30
|
||||
|
||||
dy = gr_point_mult(sp) * sp[:legendfontsize] * 1.75
|
||||
dy *= get(sp[:extra_kwargs], :legend_hfactor, 1)
|
||||
|
||||
legendh = dy * legendn
|
||||
|
||||
return (
|
||||
@@ -1282,12 +1289,22 @@ function gr_set_window(sp, viewport_plotarea)
|
||||
gr_set_viewport_polar(viewport_plotarea)
|
||||
else
|
||||
xmin, xmax, ymin, ymax = gr_xy_axislims(sp)
|
||||
needs_3d = needs_any_3d_axes(sp)
|
||||
if needs_3d
|
||||
zmin, zmax = gr_z_axislims(sp)
|
||||
zok = zmax > zmin
|
||||
else
|
||||
zok = true
|
||||
end
|
||||
|
||||
scaleop = 0
|
||||
if xmax > xmin && ymax > ymin
|
||||
sp[:xaxis][:scale] == :log10 && (scaleop |= GR.OPTION_X_LOG)
|
||||
sp[:yaxis][:scale] == :log10 && (scaleop |= GR.OPTION_Y_LOG)
|
||||
sp[:xaxis][:flip] && (scaleop |= GR.OPTION_FLIP_X)
|
||||
sp[:yaxis][:flip] && (scaleop |= GR.OPTION_FLIP_Y)
|
||||
if xmax > xmin && ymax > ymin && zok
|
||||
sp[:xaxis][:scale] == :log10 && (scaleop |= GR.OPTION_X_LOG)
|
||||
sp[:yaxis][:scale] == :log10 && (scaleop |= GR.OPTION_Y_LOG)
|
||||
needs_3d && sp[:zaxis][:scale] == :log10 && (scaleop |= GR.OPTION_Z_LOG)
|
||||
sp[:xaxis][:flip] && (scaleop |= GR.OPTION_FLIP_X)
|
||||
sp[:yaxis][:flip] && (scaleop |= GR.OPTION_FLIP_Y)
|
||||
needs_3d && sp[:zaxis][:flip] && (scaleop |= GR.OPTION_FLIP_Z)
|
||||
# NOTE: setwindow sets the "data coordinate" limits of the current "viewport"
|
||||
GR.setwindow(xmin, xmax, ymin, ymax)
|
||||
GR.setscale(scaleop)
|
||||
@@ -1310,8 +1327,14 @@ function gr_draw_axes(sp, viewport_plotarea)
|
||||
if RecipesPipeline.is3d(sp)
|
||||
# set space
|
||||
xmin, xmax, ymin, ymax = gr_xy_axislims(sp)
|
||||
zmin, zmax = axis_limits(sp, :z)
|
||||
GR.setspace(zmin, zmax, round.(Int, sp[:camera])...)
|
||||
zmin, zmax = gr_z_axislims(sp)
|
||||
|
||||
camera = round.(Int, sp[:camera])
|
||||
|
||||
warn_invalid(val) = if val < 0 || val > 90 @warn "camera: $(val)° ∉ [0°, 90°]" end
|
||||
warn_invalid.(camera)
|
||||
|
||||
GR.setspace(zmin, zmax, camera...)
|
||||
|
||||
# fill the plot area
|
||||
gr_set_fill(plot_color(sp[:background_color_inside]))
|
||||
@@ -1322,7 +1345,7 @@ function gr_draw_axes(sp, viewport_plotarea)
|
||||
GR.fillarea(x_bg, y_bg)
|
||||
|
||||
for letter in (:x, :y, :z)
|
||||
gr_draw_axis_3d(sp, letter)
|
||||
gr_draw_axis_3d(sp, letter, viewport_plotarea)
|
||||
end
|
||||
elseif ispolar(sp)
|
||||
r = gr_set_viewport_polar(viewport_plotarea)
|
||||
@@ -1352,7 +1375,7 @@ function gr_draw_axis(sp, letter, viewport_plotarea)
|
||||
gr_label_axis(sp, letter, viewport_plotarea)
|
||||
end
|
||||
|
||||
function gr_draw_axis_3d(sp, letter)
|
||||
function gr_draw_axis_3d(sp, letter, viewport_plotarea)
|
||||
ax = axis_drawing_info_3d(sp, letter)
|
||||
axis = sp[Symbol(letter, :axis)]
|
||||
|
||||
@@ -1364,8 +1387,10 @@ function gr_draw_axis_3d(sp, letter)
|
||||
gr_draw_ticks(sp, axis, ax.tick_segments, gr_polyline3d)
|
||||
|
||||
# labels
|
||||
GR.setscale(0)
|
||||
gr_label_ticks_3d(sp, letter, ax.ticks)
|
||||
gr_label_axis_3d(sp, letter)
|
||||
gr_set_window(sp, viewport_plotarea)
|
||||
end
|
||||
|
||||
function gr_draw_grid(sp, axis, segments, func = gr_polyline)
|
||||
@@ -1440,13 +1465,14 @@ function gr_label_ticks(sp, letter, ticks)
|
||||
oamin, oamax = axis_limits(sp, oletter)
|
||||
gr_set_tickfont(sp, letter)
|
||||
out_factor = ifelse(axis[:tick_direction] === :out, 1.5, 1)
|
||||
x_offset = isy ? (axis[:mirror] ? 1 : -1) * 1.5e-2 * out_factor : 0
|
||||
y_offset = isy ? 0 : (axis[:mirror] ? 1 : -1) * 8e-3 * out_factor
|
||||
x_offset = isy ? -1.5e-2 * out_factor : 0
|
||||
y_offset = isy ? 0 : -8e-3 * out_factor
|
||||
|
||||
ov = sp[:framestyle] == :origin ? 0 : xor(oaxis[:flip], axis[:mirror]) ? oamax : oamin
|
||||
sgn = axis[:mirror] ? -1 : 1
|
||||
for (cv, dv) in zip(ticks...)
|
||||
x, y = GR.wctondc(reverse_if((cv, ov), isy)...)
|
||||
gr_text(x + x_offset, y + y_offset, dv)
|
||||
gr_text(x + sgn * x_offset, y + sgn * y_offset, dv)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1478,8 +1504,8 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
||||
xax, yax, zax = getindex.(Ref(sp), asyms)
|
||||
|
||||
gr_set_tickfont(sp, letter)
|
||||
nt = sp[:framestyle] == :origin ? 0 : xor(ax[:mirror], nax[:flip]) ? n1 : n0
|
||||
ft = sp[:framestyle] == :origin ? 0 : xor(ax[:mirror], fax[:flip]) ? famax : famin
|
||||
nt = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? n1 : n0
|
||||
ft = sp[:framestyle] == :origin ? 0 : ax[:mirror] ? famax : famin
|
||||
|
||||
xoffset = if letter === :x
|
||||
(sp[:yaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:xaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||
@@ -1496,7 +1522,10 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
||||
0
|
||||
end
|
||||
|
||||
for (cv, dv) in zip(ticks...)
|
||||
cvs, dvs = ticks
|
||||
ax[:flip] && reverse!(cvs)
|
||||
|
||||
for (cv, dv) in zip((cvs, dvs)...)
|
||||
xi, yi = gr_w3tondc(sort_3d_axes(cv, nt, ft, letter)...)
|
||||
gr_text(xi + xoffset, yi + yoffset, dv)
|
||||
end
|
||||
@@ -1565,8 +1594,8 @@ function gr_label_axis_3d(sp, letter)
|
||||
# color = ax[:guidefontcolor],
|
||||
)
|
||||
ag = (amin + amax) / 2
|
||||
ng = xor(ax[:mirror], nax[:flip]) ? n1 : n0
|
||||
fg = xor(ax[:mirror], fax[:flip]) ? famax : famin
|
||||
ng = ax[:mirror] ? n1 : n0
|
||||
fg = ax[:mirror] ? famax : famin
|
||||
x, y = gr_w3tondc(sort_3d_axes(ag, ng, fg, letter)...)
|
||||
if letter in (:x, :y)
|
||||
h = gr_axis_height(sp, ax)
|
||||
@@ -1577,7 +1606,8 @@ function gr_label_axis_3d(sp, letter)
|
||||
y_offset = 0
|
||||
end
|
||||
letter === :z && GR.setcharup(-1, 0)
|
||||
gr_text(x + x_offset, y + y_offset, ax[:guide])
|
||||
sgn = ax[:mirror] ? -1 : 1
|
||||
gr_text(x + sgn * x_offset, y + sgn * y_offset, ax[:guide])
|
||||
GR.restorestate()
|
||||
end
|
||||
end
|
||||
@@ -1653,7 +1683,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
|
||||
@@ -1695,7 +1725,7 @@ end
|
||||
function gr_draw_segments(series, x, y, fillrange, clims)
|
||||
st = series[:seriestype]
|
||||
if x !== nothing && length(x) > 1
|
||||
segments = series_segments(series, st)
|
||||
segments = series_segments(series, st; check=true)
|
||||
# do area fill
|
||||
if fillrange !== nothing
|
||||
GR.setfillintstyle(GR.INTSTYLE_SOLID)
|
||||
@@ -1732,7 +1762,7 @@ end
|
||||
function gr_draw_segments_3d(series, x, y, z, clims)
|
||||
if series[:seriestype] === :path3d && length(x) > 1
|
||||
lz = series[:line_z]
|
||||
segments = series_segments(series, :path3d)
|
||||
segments = series_segments(series, :path3d; check=true)
|
||||
for segment in segments
|
||||
i, rng = segment.attr_index, segment.range
|
||||
lc = get_linecolor(series, clims, i)
|
||||
@@ -1803,13 +1833,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
|
||||
@@ -1819,22 +1850,59 @@ function gr_draw_contour(series, x, y, z, clims)
|
||||
end
|
||||
|
||||
function gr_draw_surface(series, x, y, z, clims)
|
||||
|
||||
if series[:seriestype] === :surface
|
||||
e_kwargs = series[:extra_kwargs]
|
||||
st = series[:seriestype]
|
||||
if st === :surface
|
||||
fillalpha = get_fillalpha(series)
|
||||
fillcolor = get_fillcolor(series)
|
||||
if length(x) == length(y) == length(z)
|
||||
x, y, z = GR.gridit(x, y, z, 200, 200)
|
||||
# NOTE: setting nx = 0 or ny = 0 disables GR.gridit interpolation
|
||||
nx, ny = get(e_kwargs, :nx, 200), get(e_kwargs, :ny, 200)
|
||||
if length(x) == length(y) == length(z) && nx > 0 && ny > 0
|
||||
x, y, z = GR.gridit(x, y, z, nx, ny)
|
||||
end
|
||||
d_opt = get(e_kwargs, :display_option, GR.OPTION_COLORED_MESH)
|
||||
if (!isnothing(fillalpha) && fillalpha < 1) || alpha(first(fillcolor)) < 1
|
||||
gr_set_transparency(fillcolor, fillalpha)
|
||||
GR.surface(x, y, z, GR.OPTION_COLORED_MESH)
|
||||
GR.surface(x, y, z, d_opt)
|
||||
else
|
||||
GR.gr3.surface(x, y, z, GR.OPTION_COLORED_MESH)
|
||||
GR.gr3.surface(x, y, z, d_opt)
|
||||
end
|
||||
else # wireframe
|
||||
elseif st === :wireframe
|
||||
GR.setfillcolorind(0)
|
||||
GR.surface(x, y, z, GR.OPTION_FILLED_MESH)
|
||||
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
|
||||
|
||||
|
||||
+31
-18
@@ -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]
|
||||
@@ -327,7 +337,7 @@ end
|
||||
|
||||
function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, opt)
|
||||
# treat segments
|
||||
segments = collect(series_segments(series, series[:seriestype]))
|
||||
segments = collect(series_segments(series, series[:seriestype]; check=true))
|
||||
sf = opt[:fillrange]
|
||||
for (k, segment) in enumerate(segments)
|
||||
i, rng = segment.attr_index, segment.range
|
||||
@@ -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
|
||||
|
||||
@@ -1081,7 +1094,7 @@ end
|
||||
function pgfx_fillrange_series!(axis, series, series_func, i, fillrange, rng)
|
||||
fillrange_opt = PGFPlotsX.Options("line width" => "0", "draw opacity" => "0")
|
||||
fillrange_opt = merge(fillrange_opt, pgfx_fillstyle(series, i))
|
||||
push!(fillrange_opt, "markers" => "none") # no markers on fillranges
|
||||
push!(fillrange_opt, "mark" => "none") # no markers on fillranges
|
||||
push!(fillrange_opt, "forget plot" => nothing)
|
||||
opt = series.plotattributes
|
||||
args = RecipesPipeline.is3d(series) ? (opt[:x][rng], opt[:y][rng], opt[:z][rng]) :
|
||||
|
||||
@@ -663,7 +663,7 @@ function plotly_series(plt::Plot, series::Series)
|
||||
end
|
||||
|
||||
function plotly_series_shapes(plt::Plot, series::Series, clims)
|
||||
segments = series_segments(series)
|
||||
segments = series_segments(series; check=true)
|
||||
plotattributes_outs = Vector{KW}(undef, length(segments))
|
||||
|
||||
# TODO: create a plotattributes_out for each polygon
|
||||
|
||||
@@ -442,7 +442,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
# end
|
||||
# push!(handles, handle)
|
||||
# else
|
||||
for (k, segment) in enumerate(series_segments(series, st))
|
||||
for (k, segment) in enumerate(series_segments(series, st; check=true))
|
||||
i, rng = segment.attr_index, segment.range
|
||||
handle = ax."plot"((arg[rng] for arg in xyargs)...;
|
||||
label = k == 1 ? series[:label] : "",
|
||||
|
||||
@@ -474,6 +474,11 @@ mutable struct SeriesAnnotations
|
||||
baseshape::Union{Shape, AbstractVector{Shape}, Nothing}
|
||||
scalefactor::Tuple
|
||||
end
|
||||
|
||||
series_annotations(scalar) = series_annotations([scalar])
|
||||
function series_annotations(anns::AMat)
|
||||
map(series_annotations, anns)
|
||||
end
|
||||
function series_annotations(strs::AbstractVector, args...)
|
||||
fnt = font()
|
||||
shp = nothing
|
||||
@@ -570,6 +575,7 @@ end
|
||||
|
||||
annotations(::Nothing) = []
|
||||
annotations(anns::AVec) = anns
|
||||
annotations(anns::AMat) = map(annotations, anns)
|
||||
annotations(anns) = Any[anns]
|
||||
annotations(sa::SeriesAnnotations) = sa
|
||||
|
||||
|
||||
+97
-36
@@ -115,7 +115,7 @@ const _examples = PlotExample[
|
||||
)
|
||||
vline!([5, 10])
|
||||
title!("TITLE")
|
||||
yaxis!("YLABEL", :log10)
|
||||
yaxis!("YLABEL", :log10, minorgrid = true)
|
||||
end
|
||||
),
|
||||
],
|
||||
@@ -370,10 +370,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 +394,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 +1007,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",
|
||||
@@ -1163,15 +1176,61 @@ const _examples = PlotExample[
|
||||
),
|
||||
],
|
||||
),
|
||||
PlotExample( # 55
|
||||
"3D axis flip / mirror",
|
||||
"",
|
||||
[
|
||||
:(
|
||||
begin
|
||||
using LinearAlgebra
|
||||
scalefontsizes(.4)
|
||||
|
||||
x, y = collect(-6:0.5:10), collect(-8:0.5:8)
|
||||
|
||||
args = x, y, (x, y) -> sinc(norm([x, y]) / π)
|
||||
kwargs = Dict(:xlabel=>"x", :ylabel=>"y", :zlabel=>"z", :grid=>true, :minorgrid=>true)
|
||||
|
||||
plots = [wireframe(args..., title = "wire"; kwargs...)]
|
||||
|
||||
for ax ∈ (:x, :y, :z)
|
||||
push!(plots, wireframe(
|
||||
args...,
|
||||
title = "wire-flip-$ax",
|
||||
xflip = ax == :x,
|
||||
yflip = ax == :y,
|
||||
zflip = ax == :z;
|
||||
kwargs...,
|
||||
))
|
||||
end
|
||||
|
||||
for ax ∈ (:x, :y, :z)
|
||||
push!(plots, wireframe(
|
||||
args...,
|
||||
title = "wire-mirror-$ax",
|
||||
xmirror = ax == :x,
|
||||
ymirror = ax == :y,
|
||||
zmirror = ax == :z;
|
||||
kwargs...,
|
||||
))
|
||||
end
|
||||
|
||||
plt = plot(plots..., layout=(@layout [_ ° _; ° ° °; ° ° °]), margin=0Plots.px)
|
||||
|
||||
resetfontsizes()
|
||||
plt
|
||||
end
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
# Some constants for PlotDocs and PlotReferenceImages
|
||||
_animation_examples = [2, 31]
|
||||
_backend_skips = Dict(
|
||||
:gr => [25, 30, 47],
|
||||
:pyplot => [2, 25, 30, 31, 47, 49],
|
||||
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 51],
|
||||
:plotly => [2, 21, 24, 25, 30, 31, 49, 50, 51],
|
||||
: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],
|
||||
:pgfplotsx => [
|
||||
2, # animation
|
||||
6, # images
|
||||
@@ -1182,6 +1241,8 @@ _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],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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
-58
@@ -406,7 +406,7 @@ end
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
calc_num_subplots(layout::AbstractLayout) = 1
|
||||
calc_num_subplots(layout::AbstractLayout) = get(layout.attr, :blank, false) ? 0 : 1
|
||||
function calc_num_subplots(layout::GridLayout)
|
||||
tot = 0
|
||||
for l in layout.grid
|
||||
@@ -494,34 +494,42 @@ layout_args(huh) = error("unhandled layout type $(typeof(huh)): $huh")
|
||||
|
||||
function build_layout(args...)
|
||||
layout, n = layout_args(args...)
|
||||
build_layout(layout, n)
|
||||
build_layout(layout, n, Array{Plot}(undef, 0))
|
||||
end
|
||||
|
||||
# # just a single subplot
|
||||
# function build_layout(sp::Subplot, n::Integer)
|
||||
# sp, Subplot[sp], SubplotMap(gensym() => sp)
|
||||
# end
|
||||
|
||||
# n is the number of subplots... build a grid and initialize the inner subplots recursively
|
||||
function build_layout(layout::GridLayout, n::Integer)
|
||||
# n is the number of subplots...
|
||||
function build_layout(layout::GridLayout, n::Integer, plts::AVec{Plot})
|
||||
nr, nc = size(layout)
|
||||
subplots = Subplot[]
|
||||
spmap = SubplotMap()
|
||||
empty = isempty(plts)
|
||||
i = 0
|
||||
for r=1:nr, c=1:nc
|
||||
l = layout[r,c]
|
||||
for r = 1:nr, c = 1:nc
|
||||
l = layout[r, c]
|
||||
if isa(l, EmptyLayout) && !get(l.attr, :blank, false)
|
||||
sp = Subplot(backend(), parent=layout)
|
||||
layout[r,c] = sp
|
||||
push!(subplots, sp)
|
||||
spmap[attr(l,:label,gensym())] = sp
|
||||
if empty
|
||||
# initialize the inner subplots recursively
|
||||
sp = Subplot(backend(), parent=layout)
|
||||
layout[r, c] = sp
|
||||
push!(subplots, sp)
|
||||
spmap[attr(l,:label,gensym())] = sp
|
||||
inc = 1
|
||||
else
|
||||
# build a layout from a list of existing Plot objects
|
||||
plt = popfirst!(plts) # grab the first plot out of the list
|
||||
layout[r, c] = plt.layout
|
||||
append!(subplots, plt.subplots)
|
||||
merge!(spmap, plt.spmap)
|
||||
inc = length(plt.subplots)
|
||||
end
|
||||
if get(l.attr, :width, :auto) != :auto
|
||||
layout.widths[c] = attr(l,:width)
|
||||
end
|
||||
if get(l.attr, :height, :auto) != :auto
|
||||
layout.heights[r] = attr(l,:height)
|
||||
end
|
||||
i += 1
|
||||
i += inc
|
||||
elseif isa(l, GridLayout)
|
||||
# sub-grid
|
||||
if get(l.attr, :width, :auto) != :auto
|
||||
@@ -530,11 +538,11 @@ function build_layout(layout::GridLayout, n::Integer)
|
||||
if get(l.attr, :height, :auto) != :auto
|
||||
layout.heights[r] = attr(l,:height)
|
||||
end
|
||||
l, sps, m = build_layout(l, n-i)
|
||||
l, sps, m = build_layout(l, n - i, plts)
|
||||
append!(subplots, sps)
|
||||
merge!(spmap, m)
|
||||
i += length(sps)
|
||||
elseif isa(l, Subplot)
|
||||
elseif isa(l, Subplot) && empty
|
||||
error("Subplot exists. Cannot re-use existing layout. Please make a new one.")
|
||||
end
|
||||
i >= n && break # only add n subplots
|
||||
@@ -543,45 +551,6 @@ function build_layout(layout::GridLayout, n::Integer)
|
||||
layout, subplots, spmap
|
||||
end
|
||||
|
||||
# build a layout from a list of existing Plot objects
|
||||
# TODO... much of the logic overlaps with the method above... can we merge?
|
||||
function build_layout(layout::GridLayout, numsp::Integer, plts::AVec{Plot})
|
||||
nr, nc = size(layout)
|
||||
subplots = Subplot[]
|
||||
spmap = SubplotMap()
|
||||
i = 0
|
||||
for r=1:nr, c=1:nc
|
||||
l = layout[r,c]
|
||||
if isa(l, EmptyLayout) && !get(l.attr, :blank, false)
|
||||
plt = popfirst!(plts) # grab the first plot out of the list
|
||||
layout[r,c] = plt.layout
|
||||
append!(subplots, plt.subplots)
|
||||
merge!(spmap, plt.spmap)
|
||||
if get(l.attr, :width, :auto) != :auto
|
||||
layout.widths[c] = attr(l,:width)
|
||||
end
|
||||
if get(l.attr, :height, :auto) != :auto
|
||||
layout.heights[r] = attr(l,:height)
|
||||
end
|
||||
i += length(plt.subplots)
|
||||
elseif isa(l, GridLayout)
|
||||
# sub-grid
|
||||
if get(l.attr, :width, :auto) != :auto
|
||||
layout.widths[c] = attr(l,:width)
|
||||
end
|
||||
if get(l.attr, :height, :auto) != :auto
|
||||
layout.heights[r] = attr(l,:height)
|
||||
end
|
||||
l, sps, m = build_layout(l, numsp-i, plts)
|
||||
append!(subplots, sps)
|
||||
merge!(spmap, m)
|
||||
i += length(sps)
|
||||
end
|
||||
i >= numsp && break # only add n subplots
|
||||
end
|
||||
layout, subplots, spmap
|
||||
end
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# @layout macro
|
||||
@@ -775,9 +744,17 @@ end
|
||||
|
||||
"Adds a new, empty subplot overlayed on top of `sp`, with a mirrored y-axis and linked x-axis."
|
||||
function twinx(sp::Subplot)
|
||||
sp[:right_margin] = max(sp[:right_margin], 30px)
|
||||
plot!(sp.plt, inset = (sp[:subplot_index], bbox(0,0,1,1)))
|
||||
plot!(sp.plt,
|
||||
inset = (sp[:subplot_index], bbox(0,0,1,1)),
|
||||
right_margin = sp[:right_margin],
|
||||
left_margin = sp[:left_margin],
|
||||
top_margin = sp[:top_margin],
|
||||
bottom_margin = sp[:bottom_margin],
|
||||
)
|
||||
twinsp = sp.plt.subplots[end]
|
||||
twinsp[:xaxis][:grid] = false
|
||||
twinsp[:yaxis][:grid] = false
|
||||
twinsp[:xaxis][:showaxis] = false
|
||||
twinsp[:yaxis][:mirror] = true
|
||||
twinsp[:background_color_inside] = RGBA{Float64}(0,0,0,0)
|
||||
link_axes!(sp[:xaxis], twinsp[:xaxis])
|
||||
|
||||
+43
-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
|
||||
|
||||
@@ -338,6 +371,14 @@ function _override_seriestype_check(plotattributes::AKW, st::Symbol)
|
||||
st
|
||||
end
|
||||
|
||||
function needs_any_3d_axes(sp::Subplot)
|
||||
any(
|
||||
RecipesPipeline.needs_3d_axes(
|
||||
_override_seriestype_check(s.plotattributes, s.plotattributes[:seriestype])
|
||||
) for s in series_list(sp)
|
||||
)
|
||||
end
|
||||
|
||||
function _expand_subplot_extrema(sp::Subplot, plotattributes::AKW, st::Symbol)
|
||||
# adjust extrema and discrete info
|
||||
if st == :image
|
||||
|
||||
+50
-5
@@ -23,7 +23,38 @@ current(plot::AbstractPlot) = (CURRENT_PLOT.nullableplot = plot)
|
||||
|
||||
Base.string(plt::Plot) = "Plot{$(plt.backend) n=$(plt.n)}"
|
||||
Base.print(io::IO, plt::Plot) = print(io, string(plt))
|
||||
Base.show(io::IO, plt::Plot) = print(io, string(plt))
|
||||
function Base.show(io::IO, plt::Plot)
|
||||
print(io, string(plt))
|
||||
sp_ekwargs = getindex.(plt.subplots, :extra_kwargs)
|
||||
s_ekwargs = getindex.(plt.series_list, :extra_kwargs)
|
||||
if isempty(plt[:extra_plot_kwargs]) && all(isempty, sp_ekwargs) && all(isempty, s_ekwargs)
|
||||
return
|
||||
end
|
||||
print(io,"\nCaptured extra kwargs:\n")
|
||||
do_show = true
|
||||
for (key, value) in plt[:extra_plot_kwargs]
|
||||
do_show && println(io, " Plot:")
|
||||
println(io, " "^4, key, ": ", value)
|
||||
do_show = false
|
||||
end
|
||||
do_show = true
|
||||
for (i, ekwargs) in enumerate(sp_ekwargs)
|
||||
for (key, value) in ekwargs
|
||||
do_show && println(io, " SubplotPlot{$i}:")
|
||||
println(io, " "^4, key, ": ", value)
|
||||
do_show = false
|
||||
end
|
||||
do_show = true
|
||||
end
|
||||
for (i, ekwargs) in enumerate(s_ekwargs)
|
||||
for (key, value) in ekwargs
|
||||
do_show && println(io, " Series{$i}:")
|
||||
println(io, " "^4, key, ": ", value)
|
||||
do_show = false
|
||||
end
|
||||
do_show = true
|
||||
end
|
||||
end
|
||||
|
||||
getplot(plt::Plot) = plt
|
||||
getattr(plt::Plot, idx::Int = 1) = plt.attr
|
||||
@@ -59,18 +90,20 @@ function plot(args...; kw...)
|
||||
end
|
||||
|
||||
# build a new plot from existing plots
|
||||
# note: we split into plt1 and plts_tail so we can dispatch correctly
|
||||
function plot(plt1::Plot, plts_tail::Plot...; kw...)
|
||||
# note: we split into plt1, plt2 and plts_tail so we can dispatch correctly
|
||||
plot(plt1::Plot, plt2::Plot, plts_tail::Plot...; kw...) = plot!(deepcopy(plt1), deepcopy(plt2), deepcopy.(plts_tail)...; kw...)
|
||||
function plot!(plt1::Plot, plt2::Plot, plts_tail::Plot...; kw...)
|
||||
@nospecialize
|
||||
plotattributes = KW(kw)
|
||||
RecipesPipeline.preprocess_attributes!(plotattributes)
|
||||
|
||||
# build our plot vector from the args
|
||||
n = length(plts_tail) + 1
|
||||
n = length(plts_tail) + 2
|
||||
plts = Array{Plot}(undef, n)
|
||||
plts[1] = plt1
|
||||
plts[2] = plt2
|
||||
for (i,plt) in enumerate(plts_tail)
|
||||
plts[i+1] = plt
|
||||
plts[i+2] = plt
|
||||
end
|
||||
|
||||
# compute the layout
|
||||
@@ -127,6 +160,7 @@ function plot(plt1::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)
|
||||
@@ -154,6 +188,7 @@ function plot!(args...; kw...)
|
||||
end
|
||||
|
||||
# this adds to a specific plot... most plot commands will flow through here
|
||||
plot(plt::Plot, args...; kw...) = plot!(deepcopy(plt), args...; kw...)
|
||||
function plot!(plt::Plot, args...; kw...)
|
||||
@nospecialize
|
||||
plotattributes = KW(kw)
|
||||
@@ -191,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...)
|
||||
|
||||
+17
-1
@@ -75,13 +75,29 @@ function iter_segments(args...)
|
||||
NaNSegmentsIterator(tup, n1, n2)
|
||||
end
|
||||
|
||||
function series_segments(series::Series, seriestype::Symbol = :path)
|
||||
function series_segments(series::Series, seriestype::Symbol=:path; check=false)
|
||||
x, y, z = series[:x], series[:y], series[:z]
|
||||
(x === nothing || isempty(x)) && return UnitRange{Int}[]
|
||||
|
||||
args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y)
|
||||
nan_segments = collect(iter_segments(args...))
|
||||
|
||||
if check
|
||||
scales = :xscale, :yscale, :zscale
|
||||
for (n, s) ∈ enumerate(args)
|
||||
scale = get(series, scales[n], :identity)
|
||||
if scale ∈ _logScales
|
||||
for (i, v) ∈ enumerate(s)
|
||||
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
|
||||
end
|
||||
end
|
||||
|
||||
segments = if has_attribute_segments(series)
|
||||
Iterators.flatten(map(nan_segments) do r
|
||||
if seriestype in (:scatter, :scatter3d)
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
using Plots: guidefont
|
||||
using Plots: guidefont, series_annotations
|
||||
import ImageMagick
|
||||
using VisualRegressionTests
|
||||
using Plots
|
||||
@@ -30,6 +30,7 @@ end
|
||||
end # testset
|
||||
|
||||
include("test_defaults.jl")
|
||||
include("test_pipeline.jl")
|
||||
include("test_axes.jl")
|
||||
include("test_axis_letter.jl")
|
||||
include("test_components.jl")
|
||||
|
||||
+13
-3
@@ -35,13 +35,13 @@ end
|
||||
@testset "Axis limits" begin
|
||||
pl = plot(1:5, xlims=:symmetric, widen = false)
|
||||
@test Plots.xlims(pl) == (-5, 5)
|
||||
|
||||
|
||||
pl = plot(1:3)
|
||||
@test Plots.xlims(pl) == Plots.widen(1,3)
|
||||
|
||||
|
||||
pl = plot([1.05,2.0,2.95], ylims=:round)
|
||||
@test Plots.ylims(pl) == (1, 3)
|
||||
|
||||
|
||||
pl = plot(1:3, xlims=(1,5))
|
||||
@test Plots.xlims(pl) == (1, 5)
|
||||
|
||||
@@ -53,3 +53,13 @@ end
|
||||
ql = quiver([1, 2], [2, 1], [3, 4], quiver = ([1, -1], [0, 0], [1, -0.5]), arrow=true)
|
||||
@test ql[1][:projection] == "3d"
|
||||
end
|
||||
|
||||
@testset "twinx" begin
|
||||
pl = plot(1:10, margin = 2Plots.cm)
|
||||
twpl = twinx(pl)
|
||||
pl! = plot!(twinx(), -(1:10))
|
||||
@test twpl[:right_margin] == 2Plots.cm
|
||||
@test twpl[:left_margin] == 2Plots.cm
|
||||
@test twpl[:top_margin] == 2Plots.cm
|
||||
@test twpl[:bottom_margin] == 2Plots.cm
|
||||
end
|
||||
|
||||
+65
-41
@@ -2,58 +2,58 @@ using Plots, Test
|
||||
|
||||
@testset "Shapes" begin
|
||||
@testset "Type" begin
|
||||
square = Shape([(0,0.0),(1,0.0),(1,1.0),(0,1.0)])
|
||||
@test isa(square, Shape{Int64, Float64})
|
||||
@test coords(square) isa Tuple{Vector{S}, Vector{T}} where {T,S}
|
||||
square = Shape([(0, 0.0), (1, 0.0), (1, 1.0), (0, 1.0)])
|
||||
@test isa(square, Shape{Int64,Float64})
|
||||
@test coords(square) isa Tuple{Vector{S},Vector{T}} where {T,S}
|
||||
end
|
||||
|
||||
@testset "Copy" begin
|
||||
square = Shape([(0,0),(1,0),(1,1),(0,1)])
|
||||
square = Shape([(0, 0), (1, 0), (1, 1), (0, 1)])
|
||||
square2 = Shape(square)
|
||||
@test square2.x == square.x
|
||||
@test square2.y == square.y
|
||||
end
|
||||
|
||||
@testset "Center" begin
|
||||
square = Shape([(0,0),(1,0),(1,1),(0,1)])
|
||||
@test Plots.center(square) == (0.5,0.5)
|
||||
square = Shape([(0, 0), (1, 0), (1, 1), (0, 1)])
|
||||
@test Plots.center(square) == (0.5, 0.5)
|
||||
end
|
||||
|
||||
@testset "Translate" begin
|
||||
square = Shape([(0,0),(1,0),(1,1),(0,1)])
|
||||
squareUp = Shape([(0,1),(1,1),(1,2),(0,2)])
|
||||
squareUpRight = Shape([(1,1),(2,1),(2,2),(1,2)])
|
||||
square = Shape([(0, 0), (1, 0), (1, 1), (0, 1)])
|
||||
squareUp = Shape([(0, 1), (1, 1), (1, 2), (0, 2)])
|
||||
squareUpRight = Shape([(1, 1), (2, 1), (2, 2), (1, 2)])
|
||||
|
||||
@test Plots.translate(square,0,1).x == squareUp.x
|
||||
@test Plots.translate(square,0,1).y == squareUp.y
|
||||
@test Plots.translate(square, 0, 1).x == squareUp.x
|
||||
@test Plots.translate(square, 0, 1).y == squareUp.y
|
||||
|
||||
@test Plots.center(translate!(square,1)) == (1.5,1.5)
|
||||
@test Plots.center(translate!(square, 1)) == (1.5, 1.5)
|
||||
end
|
||||
|
||||
@testset "Rotate" begin
|
||||
# 2 radians rotation matrix
|
||||
R2 = [cos(2) sin(2); -sin(2) cos(2)]
|
||||
coords = [0 0; 1 0; 1 1; 0 1]'
|
||||
coordsRotated2 = R2*(coords.-0.5).+0.5
|
||||
coordsRotated2 = R2 * (coords .- 0.5) .+ 0.5
|
||||
|
||||
square = Shape([(0,0),(1,0),(1,1),(0,1)])
|
||||
square = Shape([(0, 0), (1, 0), (1, 1), (0, 1)])
|
||||
|
||||
# make a new, rotated square
|
||||
square2 = Plots.rotate(square, -2)
|
||||
@test square2.x ≈ coordsRotated2[1,:]
|
||||
@test square2.y ≈ coordsRotated2[2,:]
|
||||
@test square2.x ≈ coordsRotated2[1, :]
|
||||
@test square2.y ≈ coordsRotated2[2, :]
|
||||
|
||||
# unrotate the new square in place
|
||||
rotate!(square2, 2)
|
||||
@test square2.x ≈ coords[1,:]
|
||||
@test square2.y ≈ coords[2,:]
|
||||
@test square2.x ≈ coords[1, :]
|
||||
@test square2.y ≈ coords[2, :]
|
||||
end
|
||||
|
||||
@testset "Plot" begin
|
||||
ang = range(0, 2π, length = 60)
|
||||
ellipse(x, y, w, h) = Shape(w*sin.(ang).+x, h*cos.(ang).+y)
|
||||
myshapes = [ellipse(x,rand(),rand(),rand()) for x = 1:4]
|
||||
@test coords(myshapes) isa Tuple{Vector{Vector{S}}, Vector{Vector{T}}} where {T,S}
|
||||
ellipse(x, y, w, h) = Shape(w * sin.(ang) .+ x, h * cos.(ang) .+ y)
|
||||
myshapes = [ellipse(x, rand(), rand(), rand()) for x = 1:4]
|
||||
@test coords(myshapes) isa Tuple{Vector{Vector{S}},Vector{Vector{T}}} where {T,S}
|
||||
local p
|
||||
@test_nowarn p = plot(myshapes)
|
||||
@test p[1][1][:seriestype] == :shape
|
||||
@@ -62,7 +62,7 @@ end
|
||||
|
||||
@testset "Brush" begin
|
||||
@testset "Colors" begin
|
||||
baseline = brush(1, RGB(0,0,0))
|
||||
baseline = brush(1, RGB(0, 0, 0))
|
||||
@test brush(:black) == baseline
|
||||
@test brush("black") == baseline
|
||||
end
|
||||
@@ -76,7 +76,7 @@ end
|
||||
end
|
||||
@testset "Bad Argument" begin
|
||||
# using test_logs because test_warn seems to not work anymore
|
||||
@test_logs (:warn,"Unused brush arg: nothing (Nothing)") begin
|
||||
@test_logs (:warn, "Unused brush arg: nothing (Nothing)") begin
|
||||
brush(nothing)
|
||||
end
|
||||
end
|
||||
@@ -84,44 +84,68 @@ end
|
||||
|
||||
@testset "Fonts" begin
|
||||
@testset "Scaling" begin
|
||||
sizesToCheck = [:titlefontsize, :legendfontsize, :legendtitlefontsize,
|
||||
:xtickfontsize, :ytickfontsize, :ztickfontsize,
|
||||
:xguidefontsize, :yguidefontsize, :zguidefontsize,]
|
||||
sizesToCheck = [
|
||||
:titlefontsize,
|
||||
:legendfontsize,
|
||||
:legendtitlefontsize,
|
||||
:xtickfontsize,
|
||||
:ytickfontsize,
|
||||
:ztickfontsize,
|
||||
:xguidefontsize,
|
||||
:yguidefontsize,
|
||||
:zguidefontsize,
|
||||
]
|
||||
# get inital font sizes
|
||||
initialSizes = [Plots.default(s) for s in sizesToCheck ]
|
||||
initialSizes = [Plots.default(s) for s in sizesToCheck]
|
||||
|
||||
#scale up font sizes
|
||||
scalefontsizes(2)
|
||||
|
||||
# get inital font sizes
|
||||
doubledSizes = [Plots.default(s) for s in sizesToCheck ]
|
||||
doubledSizes = [Plots.default(s) for s in sizesToCheck]
|
||||
|
||||
@test doubledSizes == initialSizes*2
|
||||
@test doubledSizes == initialSizes * 2
|
||||
|
||||
# reset font sizes
|
||||
resetfontsizes()
|
||||
|
||||
finalSizes = [Plots.default(s) for s in sizesToCheck ]
|
||||
finalSizes = [Plots.default(s) for s in sizesToCheck]
|
||||
|
||||
@test finalSizes == initialSizes
|
||||
end
|
||||
end
|
||||
|
||||
@testset "Series Annotations" begin
|
||||
square = Shape([(0,0),(1,0),(1,1),(0,1)])
|
||||
@test_logs (:warn,"Unused SeriesAnnotations arg: triangle (Symbol)") begin
|
||||
p = plot([1,2,3],
|
||||
series_annotations=(["a"],
|
||||
2, # pass a scale factor
|
||||
(1,4), # pass two scale factors (overwrites first one)
|
||||
square, # pass a shape
|
||||
font(:courier), # pass an annotation font
|
||||
:triangle # pass an incorrect argument
|
||||
))
|
||||
square = Shape([(0, 0), (1, 0), (1, 1), (0, 1)])
|
||||
@test_logs (:warn, "Unused SeriesAnnotations arg: triangle (Symbol)") begin
|
||||
p = plot(
|
||||
[1, 2, 3],
|
||||
series_annotations = (
|
||||
["a"],
|
||||
2, # pass a scale factor
|
||||
(1, 4), # pass two scale factors (overwrites first one)
|
||||
square, # pass a shape
|
||||
font(:courier), # pass an annotation font
|
||||
:triangle, # pass an incorrect argument
|
||||
),
|
||||
)
|
||||
sa = p.series_list[1].plotattributes[:series_annotations]
|
||||
@test sa.strs == ["a"]
|
||||
@test sa.font.family == "courier"
|
||||
@test sa.baseshape == square
|
||||
@test sa.scalefactor == (1,4)
|
||||
@test sa.scalefactor == (1, 4)
|
||||
end
|
||||
spl = scatter(
|
||||
4.53 .* [1/1 1/2 1/3 1/4 1/5],
|
||||
[0 0 0 0 0],
|
||||
layout = (5, 1),
|
||||
ylims = (-1.1, 1.1),
|
||||
xlims = (0, 5),
|
||||
series_annotations = permutedims([["1/1"],["1/2"],["1/3"],["1/4"],["1/5"]]),
|
||||
)
|
||||
@test spl.series_list[1].plotattributes[:series_annotations].strs == ["1/1"]
|
||||
@test spl.series_list[2].plotattributes[:series_annotations].strs == ["1/2"]
|
||||
@test spl.series_list[3].plotattributes[:series_annotations].strs == ["1/3"]
|
||||
@test spl.series_list[4].plotattributes[:series_annotations].strs == ["1/4"]
|
||||
@test spl.series_list[5].plotattributes[:series_annotations].strs == ["1/5"]
|
||||
end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using Plots, Test
|
||||
using RecipesPipeline
|
||||
|
||||
@testset "plot" begin
|
||||
pl = plot(1:5)
|
||||
pl2 = plot(pl, tex_output_standalone = true)
|
||||
@test pl[:tex_output_standalone] == false
|
||||
@test pl2[:tex_output_standalone] == true
|
||||
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