Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d2d516ca6 | |||
| 12a1d83595 | |||
| 9eba5964d9 | |||
| d74ee63710 | |||
| 9941563b0b | |||
| fb82722dd3 | |||
| 86a9b8bf6d | |||
| 5a19673eaf | |||
| c26561eab3 | |||
| f0ad66da36 | |||
| aca2aa49b8 | |||
| 9d56e72f6a | |||
| f06225655d | |||
| 4f0f84f400 | |||
| a65cda8b7e | |||
| 37744d7b6a | |||
| 09a66224ce | |||
| 405bc0820b | |||
| 1c89bd8727 | |||
| 8e17a182f9 | |||
| 032c5d1638 | |||
| 8d95333d1e | |||
| 7bfc97285c |
@@ -692,6 +692,16 @@
|
||||
{
|
||||
"name": "Fred Callaway",
|
||||
"type": "Other"
|
||||
},
|
||||
{
|
||||
"name": "Jan Thorben Schneider",
|
||||
"type": "Other"
|
||||
},
|
||||
{
|
||||
"orcid": "0000-0003-4102-2460",
|
||||
"affiliation": "Alogus Research Corporation",
|
||||
"name": "Lee Phillips",
|
||||
"type": "Other"
|
||||
}
|
||||
],
|
||||
"upload_type": "software"
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
name = "Plots"
|
||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||
author = ["Tom Breloff (@tbreloff)"]
|
||||
version = "1.22.2"
|
||||
version = "1.22.6"
|
||||
|
||||
[deps]
|
||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||
@@ -37,7 +37,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
|
||||
Contour = "0.5"
|
||||
FFMPEG = "0.2 - 0.4"
|
||||
FixedPointNumbers = "0.6 - 0.8"
|
||||
GR = "0.53 - 0.59"
|
||||
GR = "0.60 - 0.61"
|
||||
GeometryBasics = "0.2, 0.3.1, 0.4"
|
||||
JSON = "0.21, 1"
|
||||
Latexify = "0.14 - 0.15"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
[gitter-url]: https://gitter.im/tbreloff/Plots.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||
|
||||
[docs-img]: https://img.shields.io/badge/docs-stable-blue.svg
|
||||
[docs-url]: http://docs.juliaplots.org/latest/
|
||||
[docs-url]: https://docs.juliaplots.org/latest/
|
||||
|
||||
[![][gh-ci-img]][gh-ci-url]
|
||||
[![][pkgeval-img]][pkgeval-url]
|
||||
|
||||
+10
-21
@@ -87,9 +87,10 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guide_position, :guidefontvalign, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:guidefonthalign, :guide_position, :mirror, :guide), Tuple{Symbol, Symbol, Bool, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, StepRange{Int64, Int64}, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:minorgrid, :scale, :guide), Tuple{Bool, Symbol, String}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:rotation,), Tuple{Int64}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(attr!)),NamedTuple{(:ticks,), Tuple{UnitRange{Int64}}},typeof(attr!),Axis})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:shape,), Tuple{Symbol}},typeof(default)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(default)),NamedTuple{(:titlefont, :legendfontsize, :guidefont, :tickfont, :guide, :framestyle, :yminorgrid), Tuple{Tuple{Int64, String}, Int64, Tuple{Int64, Symbol}, Tuple{Int64, Symbol}, String, Symbol, Bool}},typeof(default)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(font)),NamedTuple{(:family, :pointsize, :halign, :valign, :rotation, :color), Tuple{String, Int64, Symbol, Symbol, Float64, RGBA{Float64}}},typeof(font)})
|
||||
@@ -99,7 +100,6 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},UnitRange{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(gr_polyline)),NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}},typeof(gr_polyline),UnitRange{Int64},Vector{Float64}})
|
||||
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(hline!)),Any,typeof(hline!),Any})
|
||||
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}}})
|
||||
@@ -121,10 +121,8 @@ function _precompile_()
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{GRBackend},Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype, :inset), Tuple{Symbol, Tuple{Int64, BoundingBox{Tuple{Length{:w, Float64}, Length{:h, Float64}}, Tuple{Length{:w, Float64}, Length{:h, Float64}}}}}},typeof(plot!),Vector{Int64},Vector{Float64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{GRBackend},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Plot{PlotlyBackend},Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:seriestype,), Tuple{Symbol}},typeof(plot!),Vector{Int64}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{GRBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!),Plot{PlotlyBackend}})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:title,), Tuple{String}},typeof(plot!)})
|
||||
Base.precompile(Tuple{Core.kwftype(typeof(plot!)),NamedTuple{(:w,), Tuple{Int64}},typeof(plot!),Plot{GRBackend},Vector{Float64},Vector{Float64},Vararg{Any, N} where N})
|
||||
@@ -198,7 +196,6 @@ function _precompile_()
|
||||
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})
|
||||
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}})
|
||||
@@ -233,7 +230,6 @@ 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),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})
|
||||
@@ -245,6 +241,7 @@ 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(allStyles),Symbol})
|
||||
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})
|
||||
@@ -253,26 +250,22 @@ function _precompile_()
|
||||
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(default),Symbol,String})
|
||||
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,UnitRange{Int64}})
|
||||
Base.precompile(Tuple{typeof(fakedata),Int64,Int64})
|
||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Float64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(get_minor_ticks),Subplot{GRBackend},Axis,Tuple{Vector{Int64}, Vector{String}}})
|
||||
Base.precompile(Tuple{typeof(get_series_color),PlotUtils.ContinuousColorGradient,Subplot{GRBackend},Int64,Symbol})
|
||||
Base.precompile(Tuple{typeof(get_series_color),Vector{Symbol},Subplot{GRBackend},Int64,Symbol})
|
||||
Base.precompile(Tuple{typeof(get_ticks),StepRange{Int64, Int64},Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),Symbol,Vector{Float64},Vector{Any},Tuple{Int64, Int64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_ticks),UnitRange{Int64},Vector{Float64},Vector{Any},Tuple{Float64, Float64},Vararg{Any, N} where N})
|
||||
Base.precompile(Tuple{typeof(get_xy),OHLC{Float64},Int64,Float64})
|
||||
Base.precompile(Tuple{typeof(get_xy),Vector{OHLC}})
|
||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), NTuple{9, Float64}},Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_add_legend),Subplot{GRBackend},NamedTuple{(:w, :h, :dy, :leftw, :textw, :rightw, :xoffset, :yoffset, :width_factor), Tuple{Int64, Int64, Int64, Float64, Int64, Float64, Float64, Float64, Float64}},Vector{Float64}})
|
||||
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}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_heatmap),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_marker),Series,Float64,Float64,Tuple{Float64, Float64},Int64,Float64,Float64,Symbol})
|
||||
@@ -287,15 +280,18 @@ function _precompile_()
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Base.OneTo{Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,StepRange{Int64, Int64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_segments),Series,Vector{Float64},Vector{Float64},Int64,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_shapes),Series,Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Matrix{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_draw_surface),Series,Vector{Float64},Vector{Float64},Vector{Float64},Tuple{Float64, Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_fill_viewport),Vector{Float64},RGBA{Float64}})
|
||||
Base.precompile(Tuple{typeof(gr_get_3d_axis_angle),Vector{Float64},Float64,Float64,Symbol})
|
||||
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),Subplot{GRBackend},Symbol,Tuple{Vector{Int64}, 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_set_gradient),PlotUtils.ContinuousColorGradient})
|
||||
Base.precompile(Tuple{typeof(gr_text),Float64,Float64,String})
|
||||
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, 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}})
|
||||
@@ -307,7 +303,7 @@ 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(intersection_point),Float64,Float64,Float64,Float64,Float64,Float64})
|
||||
Base.precompile(Tuple{typeof(make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Function})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Float64, Float64},Symbol,Symbol})
|
||||
Base.precompile(Tuple{typeof(optimal_ticks_and_labels),Nothing,Tuple{Int64, Float64},Symbol,Symbol})
|
||||
@@ -316,7 +312,6 @@ function _precompile_()
|
||||
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})
|
||||
Base.precompile(Tuple{typeof(plot),Any})
|
||||
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})
|
||||
@@ -328,7 +323,6 @@ function _precompile_()
|
||||
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},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}})
|
||||
@@ -337,7 +331,6 @@ function _precompile_()
|
||||
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(process_axis_arg!),Dict{Symbol, Any},Tuple{Int64, Int64},Symbol})
|
||||
Base.precompile(Tuple{typeof(push!),Plot{GRBackend},Float64,Vector{Float64}})
|
||||
Base.precompile(Tuple{typeof(resetfontsizes)})
|
||||
Base.precompile(Tuple{typeof(scalefontsizes),Float64})
|
||||
@@ -345,6 +338,7 @@ function _precompile_()
|
||||
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,Symbol})
|
||||
Base.precompile(Tuple{typeof(title!),AbstractString})
|
||||
Base.precompile(Tuple{typeof(unzip),Vector{GeometryBasics.Point2{Float64}}})
|
||||
Base.precompile(Tuple{typeof(unzip),Vector{Tuple{Float64, Float64, Float64}}})
|
||||
@@ -386,9 +380,4 @@ function _precompile_()
|
||||
precompile(fbody, (Any,typeof(title!),AbstractString,))
|
||||
end
|
||||
end
|
||||
let fbody = try __lookup_kwbody__(which(vline!, (Any,))) catch missing end
|
||||
if !ismissing(fbody)
|
||||
precompile(fbody, (Any,typeof(vline!),Any,))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2033,7 +2033,6 @@ function _update_subplot_args(
|
||||
lims_warned = true
|
||||
end
|
||||
end
|
||||
_update_subplot_colorbars(sp)
|
||||
end
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+28
-1
@@ -943,7 +943,34 @@ const _unicodeplots_seriestype = [
|
||||
:spy,
|
||||
]
|
||||
const _unicodeplots_style = [:auto, :solid]
|
||||
const _unicodeplots_marker = [:none, :auto, :circle]
|
||||
const _unicodeplots_marker = [
|
||||
:none,
|
||||
:auto,
|
||||
:pixel,
|
||||
# vvvvvvvvvv shapes
|
||||
:circle,
|
||||
:rect,
|
||||
:star5,
|
||||
:diamond,
|
||||
:hexagon,
|
||||
:cross,
|
||||
:xcross,
|
||||
:utriangle,
|
||||
:dtriangle,
|
||||
:rtriangle,
|
||||
:ltriangle,
|
||||
:pentagon,
|
||||
# :heptagon,
|
||||
# :octagon,
|
||||
:star4,
|
||||
:star6,
|
||||
# :star7,
|
||||
:star8,
|
||||
:vline,
|
||||
:hline,
|
||||
:+,
|
||||
:x,
|
||||
]
|
||||
const _unicodeplots_scale = [:identity, :ln, :log2, :log10]
|
||||
|
||||
# Additional constants
|
||||
|
||||
+125
-40
@@ -104,6 +104,9 @@ function gr_color(c, ::Type{<:AbstractGray})
|
||||
end
|
||||
gr_color(c, ::Type) = gr_color(RGBA(c), RGB)
|
||||
|
||||
set_RGBA_alpha(alpha, c::RGBA) = RGBA(red(c), green(c), blue(c), alpha)
|
||||
set_RGBA_alpha(alpha::Nothing, c::RGBA) = c
|
||||
|
||||
function gr_getcolorind(c)
|
||||
gr_set_transparency(float(alpha(c)))
|
||||
convert(Int, GR.inqcolorfromrgb(red(c), green(c), blue(c)))
|
||||
@@ -671,31 +674,19 @@ end
|
||||
|
||||
function gr_set_tickfont(sp, letter)
|
||||
axis = sp[get_attr_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)[trigger(rot) + 2]
|
||||
valign = (axis[:mirror] ? :bottom : :top, :vcenter)[trigger(abs(rot)) + 1]
|
||||
else
|
||||
halign = (axis[:mirror] ? :left : :right, :hcenter)[trigger(abs(rot)) + 1]
|
||||
valign = (:top, :vcenter, :bottom)[trigger(rot) + 2]
|
||||
end
|
||||
gr_set_font(
|
||||
tickfont(axis),
|
||||
sp,
|
||||
halign = halign,
|
||||
valign = valign,
|
||||
rotation = axis[:rotation],
|
||||
color = axis[:tickfontcolor],
|
||||
)
|
||||
end
|
||||
|
||||
# size of the text with no rotation
|
||||
function gr_text_size(str)
|
||||
GR.savestate()
|
||||
GR.selntran(0)
|
||||
GR.setcharup(0, 1)
|
||||
xs, ys = gr_inqtext(0, 0, string(str))
|
||||
l, r = extrema(xs)
|
||||
b, t = extrema(ys)
|
||||
@@ -705,9 +696,11 @@ function gr_text_size(str)
|
||||
return w, h
|
||||
end
|
||||
|
||||
# size of the text with rotation applied
|
||||
function gr_text_size(str, rot)
|
||||
GR.savestate()
|
||||
GR.selntran(0)
|
||||
GR.setcharup(0, 1)
|
||||
xs, ys = gr_inqtext(0, 0, string(str))
|
||||
l, r = extrema(xs)
|
||||
b, t = extrema(ys)
|
||||
@@ -720,6 +713,15 @@ end
|
||||
text_box_width(w, h, rot) = abs(cosd(rot)) * w + abs(cosd(rot + 90)) * h
|
||||
text_box_height(w, h, rot) = abs(sind(rot)) * w + abs(sind(rot + 90)) * h
|
||||
|
||||
function gr_get_3d_axis_angle(cvs, nt, ft, letter)
|
||||
length(cvs) < 2 && return 0
|
||||
tickpoints = [gr_w3tondc(sort_3d_axes(cv, nt, ft, letter)...) for cv in cvs]
|
||||
|
||||
dx = tickpoints[2][1] - tickpoints[1][1]
|
||||
dy = tickpoints[2][2] - tickpoints[1][2]
|
||||
return atand(dy, dx)
|
||||
end
|
||||
|
||||
function gr_get_ticks_size(ticks, rot)
|
||||
w, h = 0.0, 0.0
|
||||
for (cv, dv) in zip(ticks...)
|
||||
@@ -1560,13 +1562,35 @@ 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 ? -1.5e-2 * out_factor : 0
|
||||
y_offset = isy ? 0 : -8e-3 * out_factor
|
||||
x_base_offset = isy ? -1.5e-2 * out_factor : 0
|
||||
y_base_offset = isy ? 0 : -8e-3 * out_factor
|
||||
|
||||
rot = axis[:rotation] % 360
|
||||
ov = sp[:framestyle] == :origin ? 0 : xor(oaxis[:flip], axis[:mirror]) ? oamax : oamin
|
||||
sgn = axis[:mirror] ? -1 : 1
|
||||
sgn2 = iseven(Int(floor(rot / 90))) ? -1 : 1
|
||||
sgn3 = if isy
|
||||
-360 < rot < -180 || 0 < rot < 180 ? 1 : -1
|
||||
else
|
||||
rot < -270 || -90 < rot < 90 || rot > 270 ? 1 : -1
|
||||
end
|
||||
for (cv, dv) in zip(ticks...)
|
||||
x, y = GR.wctondc(reverse_if((cv, ov), isy)...)
|
||||
sz_rot = gr_text_size(dv, rot)
|
||||
sz = gr_text_size(dv)
|
||||
x_offset = x_base_offset
|
||||
y_offset = y_base_offset
|
||||
if isy
|
||||
x_offset += -first(sz_rot) / 2
|
||||
if rot % 90 != 0
|
||||
y_offset += sgn2 * last(sz_rot) / 2 + sgn3 * last(sz) * cosd(rot) / 2
|
||||
end
|
||||
else
|
||||
if rot % 90 != 0
|
||||
x_offset += sgn2 * first(sz_rot) / 2 + sgn3 * last(sz) * sind(rot) / 2
|
||||
end
|
||||
y_offset += -last(sz_rot) / 2
|
||||
end
|
||||
gr_text(x + sgn * x_offset, y + sgn * y_offset, dv)
|
||||
end
|
||||
end
|
||||
@@ -1577,6 +1601,9 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
||||
near_letter = letter in (:x, :z) ? :y : :x
|
||||
far_letter = letter in (:x, :y) ? :z : :x
|
||||
|
||||
isy = letter === :y
|
||||
isz = letter === :z
|
||||
|
||||
ax = sp[get_attr_symbol(letter, :axis)]
|
||||
nax = sp[get_attr_symbol(near_letter, :axis)]
|
||||
fax = sp[get_attr_symbol(far_letter, :axis)]
|
||||
@@ -1584,7 +1611,7 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
||||
amin, amax = axis_limits(sp, letter)
|
||||
namin, namax = axis_limits(sp, near_letter)
|
||||
famin, famax = axis_limits(sp, far_letter)
|
||||
n0, n1 = letter === :y ? (namax, namin) : (namin, namax)
|
||||
n0, n1 = isy ? (namax, namin) : (namin, namax)
|
||||
|
||||
# find out which axes we are dealing with
|
||||
i = findfirst(==(letter), (:x, :y, :z))
|
||||
@@ -1601,27 +1628,57 @@ function gr_label_ticks_3d(sp, letter, ticks)
|
||||
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)
|
||||
elseif letter === :y
|
||||
(sp[:yaxis][:mirror] ? -1 : 1) * 1e-2 * (sp[:yaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||
else
|
||||
(sp[:zaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:zaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||
end
|
||||
yoffset = if letter === :x
|
||||
(sp[:xaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:xaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||
elseif letter === :y
|
||||
(sp[:yaxis][:mirror] ? 1 : -1) * 1e-2 * (sp[:yaxis][:tick_direction] == :out ? 1.5 : 1)
|
||||
else
|
||||
0
|
||||
end
|
||||
rot = mod(ax[:rotation], 360)
|
||||
sgn = ax[:mirror] ? -1 : 1
|
||||
|
||||
cvs, dvs = ticks
|
||||
ax[:flip] && reverse!(cvs)
|
||||
|
||||
axisθ = isz ? 270 : mod(gr_get_3d_axis_angle(cvs, nt, ft, letter), 360) # issue: doesn't work with 1 tick
|
||||
axisϕ = mod(axisθ - 90, 360)
|
||||
|
||||
out_factor = ifelse(ax[:tick_direction] === :out, 1.5, 1)
|
||||
axisoffset = out_factor * 1.2e-2
|
||||
x_base_offset = axisoffset * cosd(axisϕ)
|
||||
y_base_offset = axisoffset * sind(axisϕ)
|
||||
|
||||
sgn2a = sgn2b = sgn3 = 0
|
||||
if axisθ != 0 || rot % 90 != 0
|
||||
sgn2a =
|
||||
(axisθ != 90) && (axisθ == 0 && (rot < 90 || 180 ≤ rot < 270)) ||
|
||||
(axisθ == 270) ||
|
||||
(axisθ < 90 && (axisθ < rot < 90 || axisθ + 180 < rot < 270)) ||
|
||||
(axisθ > 270 && (rot < 90 || axisθ - 180 < rot < 270 || rot > axisθ)) ? -1 : 1
|
||||
end
|
||||
|
||||
if (axisθ - 90) % 180 != 0 || (rot - 90) % 180 != 0
|
||||
sgn2b =
|
||||
axisθ == 0 ||
|
||||
(axisθ == 90 && (90 ≤ rot < 180 || 270 ≤ rot < 360)) ||
|
||||
(axisθ == 270 && (rot < 90 || 180 ≤ rot < 270)) ||
|
||||
(axisθ < 90 && (axisθ < rot < 180 || axisθ + 180 < rot)) ||
|
||||
(axisθ > 270 && (rot < axisθ - 180 || 180 ≤ rot < axisθ)) ? -1 : 1
|
||||
end
|
||||
|
||||
if !(axisθ == 0 && rot % 180 == 0) && ((rot - 90) % 180 != 0)
|
||||
sgn3 =
|
||||
(axisθ == 0 && 90 < rot < 270) ||
|
||||
(axisθ == 90 && rot < 180) ||
|
||||
(axisθ == 270 && rot > 180) ||
|
||||
(axisθ < 90 && (rot < axisθ || 90 ≤ rot < 180 || axisθ + 180 < rot < 270)) ||
|
||||
(axisθ > 270 && (90 ≤ rot < axisθ - 180 || 180 ≤ rot < 270 || rot > axisθ)) ?
|
||||
-1 : 1
|
||||
end
|
||||
|
||||
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)
|
||||
sz_rot = gr_text_size(dv, rot)
|
||||
sz = gr_text_size(dv)
|
||||
x_offset =
|
||||
x_base_offset + sgn2a * first(sz_rot) / 2 + sgn3 * last(sz) * sind(rot) / 2
|
||||
y_offset =
|
||||
y_base_offset + sgn2b * last(sz_rot) / 2 + sgn3 * last(sz) * cosd(rot) / 2
|
||||
gr_text(xi + sgn * x_offset, yi + sgn * y_offset, dv)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1981,14 +2038,42 @@ function gr_draw_surface(series, x, y, z, clims)
|
||||
GR.setfillcolorind(0)
|
||||
GR.surface(x, y, z, get(e_kwargs, :display_option, GR.OPTION_FILLED_MESH))
|
||||
elseif st === :mesh3d
|
||||
@warn "GR: mesh3d is experimental (no face colors)"
|
||||
gr_set_line(
|
||||
get_linewidth(series),
|
||||
get_linestyle(series),
|
||||
get_linecolor(series),
|
||||
series,
|
||||
)
|
||||
GR.polyline3d(mesh3d_triangles(x, y, z, series[:connections])...)
|
||||
if series[:connections] isa AbstractVector{<:AbstractVector{Int}}
|
||||
# Combination of any polygon types
|
||||
cns = [[length(polyinds), polyinds...] for polyinds in series[:connections]]
|
||||
elseif series[:connections] isa AbstractVector{NTuple{N,Int}} where {N}
|
||||
# Only N-gons - connections have to be 1-based (indexing)
|
||||
N = length(series[:connections][1])
|
||||
cns = [[N, polyinds...] for polyinds in series[:connections]]
|
||||
elseif series[:connections] isa NTuple{3,<:AbstractVector{Int}}
|
||||
# Only triangles - connections have to be 0-based (indexing)
|
||||
ci, cj, ck = series[:connections]
|
||||
if !(length(ci) == length(cj) == length(ck))
|
||||
throw(
|
||||
ArgumentError(
|
||||
"Argument connections must consist of equally sized arrays.",
|
||||
),
|
||||
)
|
||||
end
|
||||
cns = [([3, ci[i] + 1, cj[i] + 1, ck[i] + 1]) for i in eachindex(ci)]
|
||||
else
|
||||
throw(
|
||||
ArgumentError(
|
||||
"Unsupported `:connections` type $(typeof(series[:connections])) for seriestype=$st",
|
||||
),
|
||||
)
|
||||
end
|
||||
fillalpha = get_fillalpha(series)
|
||||
n_polygons = length(cns)
|
||||
facecolor = if series[:fillcolor] isa AbstractArray
|
||||
series[:fillcolor]
|
||||
else
|
||||
fill(series[:fillcolor], n_polygons)
|
||||
end
|
||||
facecolor = map(fc -> set_RGBA_alpha(fillalpha, fc), facecolor)
|
||||
GR.setborderwidth(get_linewidth(series))
|
||||
GR.setbordercolorind(gr_getcolorind(get_linecolor(series)))
|
||||
GR.polygonmesh3d(x, y, z, vcat(cns...), signed.(gr_color.(facecolor)))
|
||||
else
|
||||
throw(ArgumentError("Not handled !"))
|
||||
end
|
||||
|
||||
+20
-17
@@ -141,6 +141,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
title_loc = sp[:titlelocation]
|
||||
bgc_inside = plot_color(sp[:background_color_inside])
|
||||
bgc_inside_a = alpha(bgc_inside)
|
||||
update_clims(sp)
|
||||
axis_opt = PGFPlotsX.Options(
|
||||
"point meta max" => get_clims(sp)[2],
|
||||
"point meta min" => get_clims(sp)[1],
|
||||
@@ -203,7 +204,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||
|
||||
if hascolorbar(sp)
|
||||
cticks = get_colorbar_ticks(sp)[2]
|
||||
colorbar_style = PGFPlotsX.Options("title" => sp[:colorbar_title])
|
||||
colorbar_style = PGFPlotsX.Options("ylabel" => sp[:colorbar_title])
|
||||
if sp[:colorbar] === :top
|
||||
push!(
|
||||
colorbar_style,
|
||||
@@ -518,10 +519,13 @@ function pgfx_add_series!(::Val{:mesh3d}, axis, series_opt, series, series_func,
|
||||
[string(i, " ", j, " ", k, "\\\\") for (i, j, k) in zip(opt[:connections]...)],
|
||||
"\n ",
|
||||
)
|
||||
elseif typeof(opt[:connections]) <: AbstractVector{NTuple{3, Int}}
|
||||
elseif typeof(opt[:connections]) <: AbstractVector{NTuple{3,Int}}
|
||||
# 1-based indexing
|
||||
ptable = join(
|
||||
[string(i-1, " ", j-1, " ", k-1, "\\\\") for (i, j, k) in opt[:connections]],
|
||||
[
|
||||
string(i - 1, " ", j - 1, " ", k - 1, "\\\\") for
|
||||
(i, j, k) in opt[:connections]
|
||||
],
|
||||
"\n ",
|
||||
)
|
||||
else
|
||||
@@ -966,21 +970,20 @@ function pgfx_font(fontsize::Nothing, thickness_scaling = 1, font = "\\selectfon
|
||||
end
|
||||
|
||||
function pgfx_should_add_to_legend(series::Series)
|
||||
series.plotattributes[:primary] &&
|
||||
!(
|
||||
series.plotattributes[:seriestype] in (
|
||||
:hexbin,
|
||||
:bins2d,
|
||||
:histogram2d,
|
||||
:hline,
|
||||
:vline,
|
||||
:contour,
|
||||
:contourf,
|
||||
:contour3d,
|
||||
:heatmap,
|
||||
:image,
|
||||
)
|
||||
series.plotattributes[:primary] && !(
|
||||
series.plotattributes[:seriestype] in (
|
||||
:hexbin,
|
||||
:bins2d,
|
||||
:histogram2d,
|
||||
:hline,
|
||||
:vline,
|
||||
:contour,
|
||||
:contourf,
|
||||
:contour3d,
|
||||
:heatmap,
|
||||
:image,
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
function pgfx_marker(plotattributes, i = 1)
|
||||
|
||||
+11
-7
@@ -362,6 +362,7 @@ end
|
||||
|
||||
function plotly_legend_pos(pos::Symbol)
|
||||
xleft = 0.07
|
||||
xright = 1.0
|
||||
ybot = 0.07
|
||||
ytop = 1.0
|
||||
xcenter = 0.55
|
||||
@@ -372,14 +373,14 @@ function plotly_legend_pos(pos::Symbol)
|
||||
xouterright = 1.05
|
||||
xouterleft = -0.15
|
||||
plotly_legend_position_mapping = (
|
||||
right = (coords = [1.0, ycenter], xanchor = "right", yanchor = "middle"),
|
||||
right = (coords = [xright, ycenter], xanchor = "right", yanchor = "middle"),
|
||||
left = (coords = [xleft, ycenter], xanchor = "left", yanchor = "middle"),
|
||||
top = (coords = [xcenter, ytop], xanchor = "center", yanchor = "top"),
|
||||
bottom = (coords = [xcenter, ybot], xanchor = "center", yanchor = "bottom"),
|
||||
bottomleft = (coords = [xleft, ybot], xanchor = "left", yanchor = "bottom"),
|
||||
bottomright = (coords = [1.0, ybot], xanchor = "right", yanchor = "bottom"),
|
||||
topright = (coords = [1.0, 1.0], xanchor = "right", yanchor = "top"),
|
||||
topleft = (coords = [xleft, 1.0], xanchor = "left", yanchor = "top"),
|
||||
bottomright = (coords = [xright, ybot], xanchor = "right", yanchor = "bottom"),
|
||||
topright = (coords = [xright, ytop], xanchor = "right", yanchor = "top"),
|
||||
topleft = (coords = [xleft, ytop], xanchor = "left", yanchor = "top"),
|
||||
outertop = (coords = [center, youtertop], xanchor = "upper", yanchor = "middle"),
|
||||
outerbottom = (coords = [center, youterbot], xanchor = "lower", yanchor = "middle"),
|
||||
outerleft = (coords = [xouterleft, center], xanchor = "left", yanchor = "top"),
|
||||
@@ -400,7 +401,7 @@ function plotly_legend_pos(pos::Symbol)
|
||||
xanchor = "lower",
|
||||
yanchor = "right",
|
||||
),
|
||||
default = (coords = [1.0, 1.0], xanchor = "auto", yanchor = "auto"),
|
||||
default = (coords = [xright, ytop], xanchor = "auto", yanchor = "auto"),
|
||||
)
|
||||
|
||||
legend_position =
|
||||
@@ -690,9 +691,12 @@ function plotly_series(plt::Plot, series::Series)
|
||||
plotattributes_out[:i] = i
|
||||
plotattributes_out[:j] = j
|
||||
plotattributes_out[:k] = k
|
||||
elseif typeof(series[:connections]) <: AbstractVector{NTuple{3, Int}}
|
||||
elseif typeof(series[:connections]) <: AbstractVector{NTuple{3,Int}}
|
||||
# 1-based indexing
|
||||
i, j, k = broadcast(i -> [ inds[i]-1 for inds in series[:connections]], (1, 2, 3))
|
||||
i, j, k = broadcast(
|
||||
i -> [inds[i] - 1 for inds in series[:connections]],
|
||||
(1, 2, 3),
|
||||
)
|
||||
plotattributes_out[:i] = i
|
||||
plotattributes_out[:j] = j
|
||||
plotattributes_out[:k] = k
|
||||
|
||||
+32
-25
@@ -702,29 +702,37 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
polygons = if series[:connections] isa AbstractVector{<:AbstractVector{Int}}
|
||||
# Combination of any polygon types
|
||||
broadcast(inds -> broadcast(i -> [x[i], y[i], z[i]], inds), series[:connections])
|
||||
elseif series[:connections] isa AbstractVector{NTuple{N, Int}} where N
|
||||
elseif series[:connections] isa AbstractVector{NTuple{N,Int}} where {N}
|
||||
# Only N-gons - connections have to be 1-based (indexing)
|
||||
broadcast(inds -> broadcast(i -> [x[i], y[i], z[i]], inds), series[:connections])
|
||||
elseif series[:connections] isa NTuple{3,<:AbstractVector{Int}}
|
||||
# Only triangles - connections have to be 0-based (indexing)
|
||||
ci, cj, ck = series[:connections]
|
||||
ci, cj, ck = series[:connections]
|
||||
if !(length(ci) == length(cj) == length(ck))
|
||||
throw(
|
||||
ArgumentError("Argument connections must consist of equally sized arrays."),
|
||||
ArgumentError(
|
||||
"Argument connections must consist of equally sized arrays.",
|
||||
),
|
||||
)
|
||||
end
|
||||
broadcast(j -> broadcast(i -> [x[i], y[i], z[i]], [ci[j]+1, cj[j]+1, ck[j]+1]), eachindex(ci))
|
||||
broadcast(
|
||||
j -> broadcast(i -> [x[i], y[i], z[i]], [ci[j] + 1, cj[j] + 1, ck[j] + 1]),
|
||||
eachindex(ci),
|
||||
)
|
||||
else
|
||||
throw(
|
||||
ArgumentError("Unsupported `:connections` type $(typeof(series[:connections])) for seriestype=$st"),
|
||||
ArgumentError(
|
||||
"Unsupported `:connections` type $(typeof(series[:connections])) for seriestype=$st",
|
||||
),
|
||||
)
|
||||
end
|
||||
col = mplot3d.art3d.Poly3DCollection(polygons,
|
||||
linewidths = py_thickness_scale(plt, series[:linewidth]),
|
||||
col = mplot3d.art3d.Poly3DCollection(
|
||||
polygons,
|
||||
linewidths = py_thickness_scale(plt, series[:linewidth]),
|
||||
edgecolor = py_color(get_linecolor(series)),
|
||||
facecolor = py_color(series[:fillcolor]),
|
||||
alpha = get_fillalpha(series),
|
||||
zorder = series[:series_plotindex]
|
||||
zorder = series[:series_plotindex],
|
||||
)
|
||||
handle = ax."add_collection3d"(col)
|
||||
# Fix for handle: https://stackoverflow.com/questions/54994600/pyplot-legend-poly3dcollection-object-has-no-attribute-edgecolors2d
|
||||
@@ -734,7 +742,6 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
push!(handles, handle)
|
||||
end
|
||||
|
||||
|
||||
if st == :image
|
||||
xmin, xmax = ignorenan_extrema(series[:x])
|
||||
ymin, ymax = ignorenan_extrema(series[:y])
|
||||
@@ -974,7 +981,7 @@ end
|
||||
|
||||
function py_set_spine_color(spines, color)
|
||||
for loc in spines
|
||||
spines[loc]."set_color"(color)
|
||||
getproperty(spines, loc)."set_color"(color)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1199,7 +1206,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
if !ispolar(sp) && !RecipesPipeline.is3d(sp)
|
||||
for pos in ("left", "right", "top", "bottom")
|
||||
# Scale all axes by default first
|
||||
ax.spines[pos]."set_linewidth"(py_thickness_scale(plt, 1))
|
||||
getproperty(ax.spines, pos)."set_linewidth"(py_thickness_scale(plt, 1))
|
||||
end
|
||||
|
||||
# Then set visible some of them
|
||||
@@ -1207,28 +1214,28 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
intensity = 0.5
|
||||
|
||||
spine = sp[:yaxis][:mirror] ? "left" : "right"
|
||||
ax.spines[spine]."set_alpha"(intensity)
|
||||
ax.spines[spine]."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||
getproperty(ax.spines, spine)."set_alpha"(intensity)
|
||||
getproperty(ax.spines, spine)."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||
|
||||
spine = sp[:xaxis][:mirror] ? "bottom" : "top"
|
||||
ax.spines[spine]."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||
ax.spines[spine]."set_alpha"(intensity)
|
||||
getproperty(ax.spines, spine)."set_linewidth"(py_thickness_scale(plt, intensity))
|
||||
getproperty(ax.spines, spine)."set_alpha"(intensity)
|
||||
elseif sp[:framestyle] == :box
|
||||
ax.tick_params(top = true) # Add ticks too
|
||||
ax.tick_params(right = true) # Add ticks too
|
||||
elseif sp[:framestyle] in (:axes, :origin)
|
||||
sp[:xaxis][:mirror] ? ax.spines["bottom"]."set_visible"(false) :
|
||||
ax.spines["top"]."set_visible"(false)
|
||||
sp[:yaxis][:mirror] ? ax.spines["left"]."set_visible"(false) :
|
||||
ax.spines["right"]."set_visible"(false)
|
||||
sp[:xaxis][:mirror] ? ax.spines."bottom"."set_visible"(false) :
|
||||
ax.spines."top"."set_visible"(false)
|
||||
sp[:yaxis][:mirror] ? ax.spines."left"."set_visible"(false) :
|
||||
ax.spines."right"."set_visible"(false)
|
||||
if sp[:framestyle] == :origin
|
||||
ax.spines["bottom"]."set_position"("zero")
|
||||
ax.spines["left"]."set_position"("zero")
|
||||
ax.spines."bottom"."set_position"("zero")
|
||||
ax.spines."left"."set_position"("zero")
|
||||
end
|
||||
elseif sp[:framestyle] in (:grid, :none, :zerolines)
|
||||
if PyPlot.version >= v"3.4.1" # that is one where it worked, the API change may have some other value
|
||||
for spine in ax.spines
|
||||
ax.spines[string(spine)]."set_visible"(false)
|
||||
getproperty(ax.spines, string(spine))."set_visible"(false)
|
||||
end
|
||||
else
|
||||
for (loc, spine) in ax.spines
|
||||
@@ -1399,11 +1406,11 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
if !sp[:xaxis][:showaxis]
|
||||
kw = KW()
|
||||
if ispolar(sp)
|
||||
ax.spines["polar"].set_visible(false)
|
||||
ax.spines."polar".set_visible(false)
|
||||
end
|
||||
for dir in (:top, :bottom)
|
||||
if !ispolar(sp)
|
||||
ax.spines[string(dir)].set_visible(false)
|
||||
getproperty(ax.spines, string(dir)).set_visible(false)
|
||||
end
|
||||
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
||||
end
|
||||
@@ -1413,7 +1420,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
kw = KW()
|
||||
for dir in (:left, :right)
|
||||
if !ispolar(sp)
|
||||
ax.spines[string(dir)].set_visible(false)
|
||||
getproperty(ax.spines, string(dir)).set_visible(false)
|
||||
end
|
||||
kw[dir] = kw[get_attr_symbol(:label, dir)] = false
|
||||
end
|
||||
|
||||
@@ -115,11 +115,14 @@ function addUnicodeSeries!(
|
||||
return UnicodePlots.spy(series[:z].surf; kw...)
|
||||
end
|
||||
|
||||
series_kw = (;)
|
||||
|
||||
# now use the ! functions to add to the plot
|
||||
if st in (:path, :straightline, :shape)
|
||||
func = UnicodePlots.lineplot!
|
||||
elseif st == :scatter || series[:markershape] != :none
|
||||
func = UnicodePlots.scatterplot!
|
||||
series_kw = (; marker = series[:markershape])
|
||||
else
|
||||
error("Series type $st not supported by UnicodePlots")
|
||||
end
|
||||
@@ -129,7 +132,14 @@ function addUnicodeSeries!(
|
||||
for (n, segment) in enumerate(series_segments(series, st; check = true))
|
||||
i, rng = segment.attr_index, segment.range
|
||||
lc = get_linecolor(series, i)
|
||||
up = func(up, x[rng], y[rng]; color = up_color(lc), name = n == 1 ? label : "")
|
||||
up = func(
|
||||
up,
|
||||
x[rng],
|
||||
y[rng];
|
||||
color = up_color(lc),
|
||||
name = n == 1 ? label : "",
|
||||
series_kw...,
|
||||
)
|
||||
end
|
||||
|
||||
for (xi, yi, str, fnt) in EachAnn(series[:series_annotations], x, y)
|
||||
|
||||
+37
-28
@@ -5,50 +5,58 @@ process_clims(s::Union{Symbol,Nothing,Missing}) = ignorenan_extrema
|
||||
# don't specialize on ::Function otherwise python functions won't work
|
||||
process_clims(f) = f
|
||||
|
||||
function get_clims(sp::Subplot, op = process_clims(sp[:clims]))::Tuple{Float64, Float64}
|
||||
const sp_clims = IdDict{Subplot, Tuple{Float64, Float64}}()
|
||||
const series_clims = IdDict{Series, Tuple{Float64, Float64}}()
|
||||
|
||||
get_clims(sp::Subplot)::Tuple{Float64,Float64} = haskey(sp_clims, sp) ? sp_clims[sp] : update_clims(sp)
|
||||
get_clims(series::Series)::Tuple{Float64,Float64} = haskey(series_clims, series) ? series_clims[series] : update_clims(series)
|
||||
|
||||
get_clims(sp::Subplot, series::Series)::Tuple{Float64,Float64} =
|
||||
series[:colorbar_entry] ? get_clims(sp) : get_clims(series)
|
||||
|
||||
function update_clims(sp::Subplot, op = process_clims(sp[:clims]))::Tuple{Float64,Float64}
|
||||
zmin, zmax = Inf, -Inf
|
||||
for series in series_list(sp)
|
||||
if series[:colorbar_entry]
|
||||
zmin, zmax = _update_clims(zmin, zmax, get_clims(series, op)...)
|
||||
zmin, zmax = _update_clims(zmin, zmax, update_clims(series, op)...)
|
||||
else
|
||||
update_clims(series, op)
|
||||
end
|
||||
end
|
||||
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||
end
|
||||
|
||||
function get_clims(sp::Subplot, series::Series, op = process_clims(sp[:clims]))::Tuple{Float64, Float64}
|
||||
zmin, zmax = if series[:colorbar_entry]
|
||||
get_clims(sp, op)
|
||||
else
|
||||
get_clims(series, op)
|
||||
end
|
||||
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||
return sp_clims[sp] = zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||
end
|
||||
|
||||
"""
|
||||
get_clims(::Series, op=Plots.ignorenan_extrema)
|
||||
|
||||
update_clims(::Series, op=Plots.ignorenan_extrema)
|
||||
Finds the limits for the colorbar by taking the "z-values" for the series and passing them into `op`,
|
||||
which must return the tuple `(zmin, zmax)`. The default op is the extrema of the finite
|
||||
values of the input.
|
||||
values of the input. The value is stored as a series property, which is retrieved by `get_clims`.
|
||||
"""
|
||||
function get_clims(series::Series, op = ignorenan_extrema)::Tuple{Float64, Float64}
|
||||
function update_clims(series::Series, op = ignorenan_extrema)::Tuple{Float64,Float64}
|
||||
zmin, zmax = Inf, -Inf
|
||||
z_colored_series = (:contour, :contour3d, :heatmap, :histogram2d, :surface, :hexbin)
|
||||
for vals in (
|
||||
series[:seriestype] in z_colored_series ? series[:z] : nothing,
|
||||
series[:line_z],
|
||||
series[:marker_z],
|
||||
series[:fill_z],
|
||||
)
|
||||
if (typeof(vals) <: AbstractSurface) && (eltype(vals.surf) <: Union{Missing,Real})
|
||||
zmin, zmax = _update_clims(zmin, zmax, op(vals.surf)...)
|
||||
elseif (vals !== nothing) && (eltype(vals) <: Union{Missing,Real})
|
||||
zmin, zmax = _update_clims(zmin, zmax, op(vals)...)
|
||||
end
|
||||
|
||||
# keeping this unrolled has higher performance
|
||||
if series[:seriestype] ∈ z_colored_series && series[:z] !== nothing
|
||||
zmin, zmax = update_clims(zmin, zmax, series[:z], op)
|
||||
end
|
||||
return zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||
if series[:line_z] !== nothing
|
||||
zmin, zmax = update_clims(zmin, zmax, series[:line_z], op)
|
||||
end
|
||||
if series[:marker_z] !== nothing
|
||||
zmin, zmax = update_clims(zmin, zmax, series[:marker_z], op)
|
||||
end
|
||||
if series[:fill_z] !== nothing
|
||||
zmin, zmax = update_clims(zmin, zmax, series[:fill_z], op)
|
||||
end
|
||||
|
||||
return series_clims[series] = zmin <= zmax ? (zmin, zmax) : (NaN, NaN)
|
||||
end
|
||||
|
||||
update_clims(zmin, zmax, vals::AbstractSurface, op)::Tuple{Float64, Float64} = update_clims(zmin, zmax, vals.surf, op)
|
||||
update_clims(zmin, zmax, vals::Any, op)::Tuple{Float64, Float64} = _update_clims(zmin, zmax, op(vals)...)
|
||||
update_clims(zmin, zmax, ::Nothing, ::Any)::Tuple{Float64, Float64} = zmin, zmax
|
||||
|
||||
_update_clims(zmin, zmax, emin, emax) = NaNMath.min(zmin, emin), NaNMath.max(zmax, emax)
|
||||
|
||||
@enum ColorbarStyle cbar_gradient cbar_fill cbar_lines
|
||||
@@ -94,4 +102,5 @@ end
|
||||
|
||||
function _update_subplot_colorbars(sp::Subplot)
|
||||
# Dynamic callback from the pipeline if needed
|
||||
update_clims(sp)
|
||||
end
|
||||
|
||||
@@ -1255,7 +1255,6 @@ _backend_skips = Dict(
|
||||
:unicodeplots => [
|
||||
5, # limits issue
|
||||
6, # embedded images unsupported
|
||||
13, # markers unsupported
|
||||
16, # nested layout unsupported
|
||||
21, # custom markers unsupported
|
||||
22, # contours unsupported
|
||||
@@ -1269,7 +1268,6 @@ _backend_skips = Dict(
|
||||
43, # heatmap with DateTime
|
||||
45, # error bars
|
||||
47, # mesh3D unsupported
|
||||
48, # markershapes unsupported
|
||||
49, # polar heatmap
|
||||
50, # 3D surface unsupported
|
||||
51, # embedded images unsupported
|
||||
|
||||
@@ -416,4 +416,5 @@ function _add_the_series(plt, sp, plotattributes)
|
||||
push!(plt.series_list, series)
|
||||
push!(sp.series_list, series)
|
||||
_series_added(plt, series)
|
||||
_update_subplot_colorbars(sp)
|
||||
end
|
||||
|
||||
@@ -7,9 +7,10 @@ ismultiversion = false
|
||||
@static if !should_precompile
|
||||
# nothing
|
||||
elseif !ismultios && !ismultiversion
|
||||
@static if isfile(
|
||||
joinpath(@__DIR__, "../deps/SnoopCompile/precompile/precompile_Plots.jl"),
|
||||
)
|
||||
@static if isfile(joinpath(
|
||||
@__DIR__,
|
||||
"../deps/SnoopCompile/precompile/precompile_Plots.jl",
|
||||
))
|
||||
include("../deps/SnoopCompile/precompile/precompile_Plots.jl")
|
||||
_precompile_()
|
||||
end
|
||||
|
||||
+7
-1
@@ -1042,7 +1042,13 @@ export lens!
|
||||
series_plotindex := backup[:series_plotindex]
|
||||
seriestype := :path
|
||||
primary := false
|
||||
linecolor := :lightgray
|
||||
linecolor := get(backup, :linecolor, :lightgray)
|
||||
if haskey(backup, :linestyle)
|
||||
linestyle := backup[:linestyle]
|
||||
end
|
||||
if haskey(backup, :linewidth)
|
||||
linewidth := backup[:linewidth]
|
||||
end
|
||||
bbx_mag = (x1 + x2) / 2
|
||||
bby_mag = (y1 + y2) / 2
|
||||
xi_lens, yi_lens =
|
||||
|
||||
+2
-4
@@ -1184,9 +1184,7 @@ _document_argument(S::AbstractString) =
|
||||
function mesh3d_triangles(x, y, z, cns::Tuple{Array,Array,Array})
|
||||
ci, cj, ck = cns
|
||||
if !(length(ci) == length(cj) == length(ck))
|
||||
throw(
|
||||
ArgumentError("Argument connections must consist of equally sized arrays."),
|
||||
)
|
||||
throw(ArgumentError("Argument connections must consist of equally sized arrays."))
|
||||
end
|
||||
X = zeros(eltype(x), 4length(ci))
|
||||
Y = zeros(eltype(y), 4length(cj))
|
||||
@@ -1211,7 +1209,7 @@ function mesh3d_triangles(x, y, z, cns::Tuple{Array,Array,Array})
|
||||
end
|
||||
return X, Y, Z
|
||||
end
|
||||
function mesh3d_triangles(x, y, z, cns::AbstractVector{NTuple{3, Int}})
|
||||
function mesh3d_triangles(x, y, z, cns::AbstractVector{NTuple{3,Int}})
|
||||
X = zeros(eltype(x), 4length(cns))
|
||||
Y = zeros(eltype(y), 4length(cns))
|
||||
Z = zeros(eltype(z), 4length(cns))
|
||||
|
||||
Reference in New Issue
Block a user