Letterswap (#2979)

* Fix vline, histogram, barhist, stephist axis letter

* Fix vspan + move vline y values to shorthands

* Fix histograms with @one_arg_shorthands + fix vspan

* Add tests for axis letter

* move swap to _plot

* use RecipesBase approach

* restore formatters

* fix and format pgfx-tests

* update compat

* Update precompile_*.jl file (#2982)

Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>

Co-authored-by: Benoit Pasquier <briochemc@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: BeastyBlacksmith <BeastyBlacksmith@users.noreply.github.com>
This commit is contained in:
Simon Christ 2020-09-16 14:37:26 +02:00 committed by GitHub
parent 0425f656ae
commit 49555ecc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 138 additions and 45 deletions

View File

@ -45,7 +45,7 @@ PGFPlotsX = "1.2.0"
PlotThemes = "2"
PlotUtils = "1"
RecipesBase = "1"
RecipesPipeline = "0.1.12"
RecipesPipeline = "0.1.13"
Reexport = "0.2"
Requires = "1"
Showoff = "0.3.1"

View File

@ -62,7 +62,6 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1},Array{Float64,1}},Tuple{Int64,Int64}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots._make_hist)),NamedTuple{(:normed, :weights),Tuple{Bool,Nothing}},typeof(Plots._make_hist),Tuple{Array{Float64,1}},Symbol})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:flip,),Tuple{Bool}},typeof(attr!),Plots.Axis})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{Symbol}},typeof(attr!),Plots.Axis})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:formatter,),Tuple{typeof(RecipesPipeline.datetimeformatter)}},typeof(attr!),Plots.Axis})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims),Tuple{Bool,Tuple{Int64,Int64}}},typeof(attr!),Plots.Axis})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.attr!)),NamedTuple{(:grid, :lims, :flip),Tuple{Bool,Tuple{Int64,Int64},Bool}},typeof(attr!),Plots.Axis})
@ -93,23 +92,25 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.mesh3d)),NamedTuple{(:connections,),Tuple{Tuple{Array{Int64,1},Array{Int64,1},Array{Int64,1}}}},typeof(mesh3d),Array{Int64,1},Vararg{Array{Int64,1},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.pie)),NamedTuple{(:title, :l),Tuple{String,Float64}},typeof(pie),Array{String,1},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:alpha, :seriestype),Tuple{Float64,Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:annotation,),Tuple{Array{Tuple{Int64,Float64,Plots.PlotText},1}}},typeof(plot!)})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:line, :seriestype),Tuple{Tuple{Int64,Symbol,Float64,Array{Symbol,2}},Symbol}},typeof(plot!),Array{Float64,2}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:marker, :series_annotations, :seriestype),Tuple{Tuple{Int64,Float64,Symbol},Array{Any,1},Symbol}},typeof(plot!),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:markersize, :c, :seriestype),Tuple{Int64,Symbol,Symbol}},typeof(plot!),Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype, :inset),Tuple{Symbol,Tuple{Int64,Measures.BoundingBox{Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}},Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}}}}}},typeof(plot!),Array{Int64,1},Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype, :inset),Tuple{Symbol,Tuple{Int64,Measures.BoundingBox{Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}},Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}}}}}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Int64,1},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype, :inset),Tuple{Symbol,Tuple{Int64,Measures.BoundingBox{Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}},Tuple{Measures.Length{:w,Float64},Measures.Length{:h,Float64}}}}}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Int64,1},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot!),Array{Int64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:seriestype,),Tuple{Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Int64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:title,),Tuple{String}},typeof(plot!)})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot!),Array{Float64,1},Array{Float64,1},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:w,),Tuple{Int64}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Float64,1},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:xgrid,),Tuple{Tuple{Symbol,Symbol,Int64,Symbol,Float64}}},typeof(plot!),Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:yaxis,),Tuple{Tuple{String,Symbol}}},typeof(plot!)})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Plots.Plot{Plots.GRBackend},Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot!)),NamedTuple{(:zcolor, :m, :ms, :lab, :seriestype),Tuple{Array{Float64,1},Tuple{Symbol,Float64,Plots.Stroke},Array{Float64,1},String,Symbol}},typeof(plot!),Plots.Plot{Plots.PlotlyBackend},Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:annotations, :leg),Tuple{Tuple{Int64,Float64,Plots.PlotText},Bool}},typeof(plot),Array{Float64,1}})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.plot)),NamedTuple{(:arrow,),Tuple{Int64}},typeof(plot),Array{Float64,1},Array{Float64,1}})
@ -169,13 +170,20 @@ function _precompile_()
Base.precompile(Tuple{Core.kwftype(typeof(Plots.scatter)),NamedTuple{(:m, :lab, :bg, :xlim, :ylim),Tuple{Tuple{Int64,Symbol},Array{String,2},Symbol,Tuple{Int64,Int64},Tuple{Int64,Int64}}},typeof(scatter),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.scatter)),NamedTuple{(:marker_z, :color, :legend),Tuple{typeof(+),Symbol,Bool}},typeof(scatter),Array{Float64,1},Vararg{Array{Float64,1},N} where N})
Base.precompile(Tuple{Core.kwftype(typeof(Plots.test_examples)),NamedTuple{(:skip,),Tuple{Array{Int64,1}}},typeof(test_examples),Symbol})
Base.precompile(Tuple{Type{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Axes,F,Args} where Args<:Tuple where F where Axes},typeof(Plots.get_z_normalized),Tuple{Array{Float64,1},Float64,Float64}})
Base.precompile(Tuple{Type{Plots.GridLayout},Int64,Vararg{Int64,N} where N})
Base.precompile(Tuple{Type{Shape},Array{Tuple{Float64,Float64},1}})
Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{PlotUtils.ContinuousColorGradient,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}}}},Base.OneTo{Int64},Int64,Int64})
Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{PlotUtils.ContinuousColorGradient,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linecolor),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}},Base.RefValue{Tuple{Float64,Float64}}}},Base.OneTo{Int64},Int64,Int64})
Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.contour_levels),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}},Base.RefValue{Tuple{Float64,Float64}}}},Base.OneTo{Int64},Int64,Int64})
Base.precompile(Tuple{typeof(Base.Broadcast.copyto_nonleaf!),Array{Symbol,1},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linestyle),Tuple{Base.Broadcast.Extruded{Array{Any,1},Tuple{Bool},Tuple{Int64}}}},Base.OneTo{Int64},Int64,Int64})
Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.contour_levels),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}})
Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_linecolor),Tuple{Array{Any,1},Base.RefValue{Tuple{Float64,Float64}}}}})
Base.precompile(Tuple{typeof(Base.Broadcast.materialize),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(Plots.get_z_normalized),Tuple{Array{Float64,1},Float64,Float64}}})
Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.bottompad)}})
Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.leftpad)}})
Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.rightpad)}})
Base.precompile(Tuple{typeof(Base.collect_similar),Array{AbstractLayout,1},Base.Generator{Array{AbstractLayout,1},typeof(Plots.toppad)}})
Base.precompile(Tuple{typeof(Base.deepcopy_internal),Array{Plots.Series,1},IdDict{Any,Any}})
Base.precompile(Tuple{typeof(Base.vect),Tuple{Int64,Float64,Plots.PlotText},Vararg{Tuple{Int64,Float64,Plots.PlotText},N} where N})
Base.precompile(Tuple{typeof(Plots._cbar_unique),Array{Int64,1},String})
@ -189,14 +197,18 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots._cycle),Base.OneTo{Int64},Array{Int64,1}})
Base.precompile(Tuple{typeof(Plots._cycle),StepRange{Int64,Int64},Array{Int64,1}})
Base.precompile(Tuple{typeof(Plots._heatmap_edges),Array{Float64,1},Bool})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Complex{Float64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Dates.DateTime,1},UnitRange{Int64},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Float64,1},Array{Float64,1},UnitRange{Int64}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Function,1},Array{Float64,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Function,1},Float64,Float64}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Int64,1},Array{Float64,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{String,1},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{Array{Union{Missing, Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{StepRange{Int64,Int64},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.GRBackend},Dict{Symbol,Any},Tuple{typeof(log),Int64}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{AbstractArray{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Array{Float64,1},1},Array{Array{Float64,1},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Array{T,1} where T,1},Array{Float64,2}}})
@ -211,6 +223,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{OHLC,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{Float64,1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{String,1},Array{String,1},Array{Float64,2}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Tuple{Int64,Real},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Array{Union{Missing, Int64},1}}})
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{Plots.PortfolioComposition}})
@ -222,13 +235,18 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots._plot!),Plots.Plot{Plots.PlotlyBackend},Dict{Symbol,Any},Tuple{UnitRange{Int64}}})
Base.precompile(Tuple{typeof(Plots._replace_markershape),Array{Symbol,1}})
Base.precompile(Tuple{typeof(Plots._update_min_padding!),Plots.GridLayout})
Base.precompile(Tuple{typeof(Plots._update_plot_args),Plots.Plot{Plots.PlotlyBackend},RecipesPipeline.DefaultsDict})
Base.precompile(Tuple{typeof(Plots._update_plot_args),Plots.Plot{Plots.GRBackend},RecipesPipeline.DefaultsDict})
Base.precompile(Tuple{typeof(Plots._update_subplot_args),Plots.Plot{Plots.GRBackend},Plots.Subplot{Plots.GRBackend},Dict{Symbol,Any},Int64,Bool})
Base.precompile(Tuple{typeof(Plots._update_subplot_periphery),Plots.Subplot{Plots.GRBackend},Array{Any,1}})
Base.precompile(Tuple{typeof(Plots.build_layout),Plots.GridLayout,Int64})
Base.precompile(Tuple{typeof(Plots.convertLegendValue),Symbol})
Base.precompile(Tuple{typeof(Plots.convert_to_polar),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Int64,Float64}})
Base.precompile(Tuple{typeof(Plots.create_grid),Expr})
Base.precompile(Tuple{typeof(Plots.error_coords),Array{Float64,1},Array{Float64,1},Array{Float64,1},Vararg{Array{Float64,1},N} where N})
Base.precompile(Tuple{typeof(Plots.fakedata),Int64,Vararg{Int64,N} where N})
Base.precompile(Tuple{typeof(Plots.get_clims),Plots.Subplot{Plots.GRBackend},Plots.Series,Function})
Base.precompile(Tuple{typeof(Plots.get_linecolor),Plots.Series,Tuple{Float64,Float64},Int64})
Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Float64,1},Array{Any,1}}})
Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Float64,1},Array{String,1}}})
Base.precompile(Tuple{typeof(Plots.get_minor_ticks),Plots.Subplot{Plots.GRBackend},Plots.Axis,Tuple{Array{Int64,1},Array{String,1}}})
Base.precompile(Tuple{typeof(Plots.get_series_color),Array{Symbol,1},Plots.Subplot{Plots.GRBackend},Int64,Symbol})
@ -237,6 +255,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.gr_display),Plots.Subplot{Plots.GRBackend},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.gr_draw_colorbar),Plots.GRColorbar,Plots.Subplot{Plots.GRBackend},Tuple{Float64,Float64},Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Float64,1},Tuple{Float64,Float64}})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Array{Int64,1},Array{Int64,1},Tuple{Float64,Float64}})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,Base.OneTo{Int64},Array{Float64,1},Tuple{Float64,Float64}})
Base.precompile(Tuple{typeof(Plots.gr_draw_markers),Plots.Series,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Tuple{Float64,Float64}})
Base.precompile(Tuple{typeof(Plots.gr_get_ticks_size),Tuple{Array{Float64,1},Array{Any,1}},Int64})
@ -246,6 +265,8 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.gr_polaraxes),Int64,Float64,Plots.Subplot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},Function})
Base.precompile(Tuple{typeof(Plots.gr_set_gradient),PlotUtils.ContinuousColorGradient})
Base.precompile(Tuple{typeof(Plots.gr_text),Float64,Float64,String})
Base.precompile(Tuple{typeof(Plots.gr_viewport_from_bbox),Plots.Subplot{Plots.GRBackend},Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.heatmap_edges),Array{Float64,1},Symbol})
Base.precompile(Tuple{typeof(Plots.heatmap_edges),Base.OneTo{Int64},Symbol,Base.OneTo{Int64},Symbol,Tuple{Int64,Int64}})
Base.precompile(Tuple{typeof(Plots.heatmap_edges),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Symbol})
@ -254,6 +275,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.is_uniformly_spaced),Array{Float64,1}})
Base.precompile(Tuple{typeof(Plots.layout_args),Int64})
Base.precompile(Tuple{typeof(Plots.make_fillrange_side),UnitRange{Int64},LinRange{Float64}})
Base.precompile(Tuple{typeof(Plots.make_fillrange_side),UnitRange{Int64},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}})
Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,StepRange{Int64,Int64}})
Base.precompile(Tuple{typeof(Plots.optimal_ticks_and_labels),Plots.Subplot{Plots.GRBackend},Plots.Axis,UnitRange{Int64}})
Base.precompile(Tuple{typeof(Plots.processFontArg!),Dict{Symbol,Any},Symbol,String})
@ -264,6 +286,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Int64})
Base.precompile(Tuple{typeof(Plots.processLineArg),Dict{Symbol,Any},Symbol})
Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Array{Symbol,2}})
Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Float64})
Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Plots.Stroke})
Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},RGBA{Float64}})
Base.precompile(Tuple{typeof(Plots.processMarkerArg),Dict{Symbol,Any},Shape})
@ -271,9 +294,11 @@ function _precompile_()
Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.GRBackend},Int64,Float64,Plots.PlotText})
Base.precompile(Tuple{typeof(Plots.process_annotation),Plots.Subplot{Plots.PlotlyBackend},Int64,Float64,Plots.PlotText})
Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},StepRange{Int64,Int64},Symbol})
Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},String,Symbol})
Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Symbol,Symbol})
Base.precompile(Tuple{typeof(Plots.process_axis_arg!),Dict{Symbol,Any},Tuple{Int64,Int64},Symbol})
Base.precompile(Tuple{typeof(Plots.reset_axis_defaults_byletter!)})
Base.precompile(Tuple{typeof(Plots.slice_arg),Array{Float64,2},Int64})
Base.precompile(Tuple{typeof(Plots.slice_arg),Array{Measures.Length{:mm,Float64},2},Int64})
Base.precompile(Tuple{typeof(Plots.slice_arg),Array{PlotUtils.ContinuousColorGradient,2},Int64})
Base.precompile(Tuple{typeof(Plots.slice_arg),Array{RGBA{Float64},2},Int64})
@ -286,7 +311,10 @@ function _precompile_()
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{GeometryBasics.Point{2,Float64},1}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Array{OHLC,1}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Plots.PortfolioComposition})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:path}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:heatmap}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:pie}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:scatter}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),Dict{Symbol,Any},Type{Val{:wireframe}},Plots.Plot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:barbins}},StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:barhist}},Base.OneTo{Int64},Array{Float64,1},Nothing})
Base.precompile(Tuple{typeof(RecipesBase.apply_recipe),RecipesPipeline.DefaultsDict,Type{Val{:bar}},Array{Float64,1},Array{Float64,1},Nothing})
@ -427,8 +455,10 @@ function _precompile_()
Base.precompile(Tuple{typeof(RecipesPipeline.warn_on_recipe_aliases!),Plots.Plot{Plots.PlotlyBackend},RecipesPipeline.DefaultsDict,Symbol,Symbol})
Base.precompile(Tuple{typeof(annotate!),Array{Tuple{Int64,Float64,Plots.PlotText},1}})
Base.precompile(Tuple{typeof(backend),Plots.PlotlyBackend})
Base.precompile(Tuple{typeof(bar),Array{Float64,1}})
Base.precompile(Tuple{typeof(bbox),Float64,Float64,Float64,Float64})
Base.precompile(Tuple{typeof(bbox),Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}})
Base.precompile(Tuple{typeof(contour),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_colorgradient),Tuple{Array{Any,1}}}})
Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_fillalpha),Tuple{Array{Any,1}}}})
Base.precompile(Tuple{typeof(copy),Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(Plots.get_linealpha),Tuple{Array{Any,1}}}})
@ -440,9 +470,9 @@ function _precompile_()
Base.precompile(Tuple{typeof(font),String,Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(heatmap),Array{Dates.DateTime,1},Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1},UnitRange{Int64}})
Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},Array{Float64,1}})
Base.precompile(Tuple{typeof(iter_segments),Base.OneTo{Int64},UnitRange{Int64}})
Base.precompile(Tuple{typeof(ohlc),Array{OHLC,1}})
Base.precompile(Tuple{typeof(plot!),Array{Float64,2}})
Base.precompile(Tuple{typeof(plot!),Array{Tuple{Int64,Real},1}})
@ -455,9 +485,9 @@ function _precompile_()
Base.precompile(Tuple{typeof(plot),Plots.Plot{Plots.PlotlyBackend},Plots.Plot{Plots.PlotlyBackend}})
Base.precompile(Tuple{typeof(plot),StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Function})
Base.precompile(Tuple{typeof(push!),Plots.Plot{Plots.GRBackend},Float64,Array{Float64,1}})
Base.precompile(Tuple{typeof(setindex!),Dict{Any,Plots.Subplot},Plots.Subplot{Plots.GRBackend},Symbol})
Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.GRBackend}})
Base.precompile(Tuple{typeof(setindex!),Dict{Plots.Subplot,Any},Dict{Symbol,Any},Plots.Subplot{Plots.PlotlyBackend}})
Base.precompile(Tuple{typeof(setindex!),Dict{Symbol,Any},Plots.Arrow,Symbol})
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})
@ -468,6 +498,7 @@ function _precompile_()
Base.precompile(Tuple{typeof(xgrid!),Plots.Plot{Plots.GRBackend},Symbol,Vararg{Any,N} where N})
Base.precompile(Tuple{typeof(xlims),Plots.Subplot{Plots.PlotlyBackend}})
Base.precompile(Tuple{typeof(yaxis!),String,Symbol})
isdefined(Plots, Symbol("#150#151")) && Base.precompile(Tuple{getfield(Plots, Symbol("#150#151")),Tuple{Int64,Symbol}})
let fbody = try __lookup_kwbody__(which(Plots.gr_polyline, (Array{Float64,1},Array{Float64,1},typeof(GR.fillarea),))) catch missing end
if !ismissing(fbody)
precompile(fbody, (Symbol,Symbol,typeof(Plots.gr_polyline),Array{Float64,1},Array{Float64,1},typeof(GR.fillarea),))

View File

@ -993,9 +993,9 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
end
end
# vline accesses the y argument but actually maps it to the x axis.
# vline and others accesses the y argument but actually maps it to the x axis.
# Hence, we have to swap formatters
if get(plotattributes, :seriestype, :path) == :vline
if treats_y_as_x(get(plotattributes, :seriestype, :path))
xformatter = get(plotattributes, :xformatter, :auto)
yformatter = get(plotattributes, :yformatter, :auto)
plotattributes[:xformatter] = yformatter
@ -1145,7 +1145,6 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
if st in (:boxplot, :violin, :density) && !isdefined(Main, :StatsPlots)
@warn("seriestype $st has been moved to StatsPlots. To use: \`Pkg.add(\"StatsPlots\"); using StatsPlots\`")
end
return
end

View File

@ -55,6 +55,17 @@ end
## Preprocessing attributes
function RecipesPipeline.preprocess_axis_args!(plt::Plot, plotattributes, letter)
# Fix letter for seriestypes that are x only but data gets passed as y
if treats_y_as_x(get(plotattributes, :seriestype, :path))
if get(plotattributes, :orientation, :vertical) == :vertical
letter = :x
end
end
plotattributes[:letter] = letter
RecipesPipeline.preprocess_axis_args!(plt, plotattributes)
end
RecipesPipeline.preprocess_attributes!(plt::Plot, plotattributes) =
RecipesPipeline.preprocess_attributes!(plotattributes) # in src/args.jl

View File

@ -122,11 +122,10 @@ end
@deps hline straightline
@recipe function f(::Type{Val{:vline}}, x, y, z)
n = length(y)
newx = vec(Float64[yi for i = 1:3, yi in y])
newy = repeat(Float64[1, 2, NaN], n)
n = length(x)
newx = vec(Float64[xi for i = 1:3, xi in x])
x := newx
y := newy
y := repeat(Float64[1, 2, NaN], n)
seriestype := :straightline
()
end
@ -145,8 +144,8 @@ end
@deps hspan shape
@recipe function f(::Type{Val{:vspan}}, x, y, z)
n = div(length(y), 2)
newx = vcat([[y[2i - 1], y[2i - 1], y[2i], y[2i], NaN] for i = 1:n]...)
n = div(length(x), 2)
newx = vcat([[x[2i - 1], x[2i - 1], x[2i], x[2i], NaN] for i = 1:n]...)
newy = repeat([-Inf, Inf, Inf, -Inf, NaN], outer = n)
linewidth --> 0
x := newx
@ -765,7 +764,7 @@ end
@recipe function f(::Type{Val{:barhist}}, x, y, z)
h = _make_hist(
(y,),
tuple(y),
plotattributes[:bins],
normed = plotattributes[:normalize],
weights = plotattributes[:weights],
@ -779,7 +778,7 @@ end
@recipe function f(::Type{Val{:stephist}}, x, y, z)
h = _make_hist(
(y,),
tuple(y),
plotattributes[:bins],
normed = plotattributes[:normalize],
weights = plotattributes[:weights],
@ -793,7 +792,7 @@ end
@recipe function f(::Type{Val{:scatterhist}}, x, y, z)
h = _make_hist(
(y,),
tuple(y),
plotattributes[:bins],
normed = plotattributes[:normalize],
weights = plotattributes[:weights],

View File

@ -69,7 +69,7 @@ Make a histogram bar plot. See `histogram`.
"""
stephist(x)
stephist(x)
stephist!(x)
Make a histogram step plot (bin counts are represented using horizontal lines
instead of bars). See `histogram`.

View File

@ -1,4 +1,6 @@
function treats_y_as_x(seriestype)
return seriestype in (:vline, :vspan, :histogram, :barhist, :stephist, :scatterhist)
end
function replace_image_with_heatmap(z::Array{T}) where T<:Colorant
n, m = size(z)
colors = palette(vec(z))

View File

@ -9,8 +9,10 @@ using Gtk
using LibGit2
import GeometryTypes, GeometryBasics
using Dates
using RecipesBase
include("test_axes.jl")
include("test_axis_letter.jl")
include("test_recipes.jl")
include("test_hdf5plots.jl")
include("test_pgfplotsx.jl")

25
test/test_axis_letter.jl Normal file
View File

@ -0,0 +1,25 @@
using Plots, Test
@testset "axis letter" begin
using Plots, RecipesBase
# a custom type for dispacthing the axis-letter-testing recipe
struct MyType <: Number
val::Float64
end
value(m::MyType) = m.val
data = MyType.(sort(randn(20)))
# A recipe that puts the axis letter in the title
@recipe function f(::Type{T}, m::T) where T <: AbstractArray{<:MyType}
title --> string(plotattributes[:letter])
value.(m)
end
@testset "$f (orientation = $o)" for f in [histogram, barhist, stephist, scatterhist], o in [:vertical, :horizontal]
@test f(data, orientation=o).subplots[1].attr[:title] == (o == :vertical ? "x" : "y")
end
@testset "$f" for f in [hline, hspan]
@test f(data).subplots[1].attr[:title] == "y"
end
@testset "$f" for f in [vline, vspan]
@test f(data).subplots[1].attr[:title] == "x"
end
end

View File

@ -21,12 +21,12 @@ end
@test !haskey(axis.contents[1].options.dict, "fill")
@testset "Legends" begin
legends_plot = plot( rand(5,2), lab = ["1" ""] )
scatter!(legends_plot, rand(5) )
legends_plot = plot(rand(5, 2), lab = ["1" ""])
scatter!(legends_plot, rand(5))
Plots._update_plot_object(legends_plot)
axis_contents = Plots.pgfx_axes(legends_plot.o)[1].contents
leg_entries = filter( x -> x isa PGFPlotsX.LegendEntry, axis_contents )
series = filter( x -> x isa PGFPlotsX.Plot, axis_contents )
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
@test length(leg_entries) == 2
@test !haskey(series[1].options.dict, "forget plot")
@test haskey(series[2].options.dict, "forget plot")
@ -91,8 +91,8 @@ end
scatter!(pic, rand(100), markersize = 6, c = :orange)
Plots._update_plot_object(pic)
axis_contents = Plots.pgfx_axes(pic.o)[1].contents
leg_entries = filter( x -> x isa PGFPlotsX.LegendEntry, axis_contents )
series = filter( x -> x isa PGFPlotsX.Plot, axis_contents )
leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents)
series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)
@test length(leg_entries) == 2
@test length(series) == 4
@test haskey(series[1].options.dict, "forget plot")
@ -106,7 +106,7 @@ end
end), Plots._shape_keys)
markers = reshape(markers, 1, length(markers))
n = length(markers)
x = (range(0, stop = 10, length = n + 2))[2:(end - 1)]
x = (range(0, stop = 10, length = n + 2))[2:(end-1)]
y = repeat(reshape(reverse(x), 1, :), n, 1)
scatter(
x,
@ -231,7 +231,7 @@ end
# TODO: support :semi
end # testset
@testset "Quiver" begin
x = (-2pi):0.2:(2 * pi)
x = (-2pi):0.2:(2*pi)
y = sin.(x)
u = ones(length(x))
@ -255,7 +255,7 @@ end
nodes = filter(x -> !isa(x, PGFPlotsX.Plot), axis_content)
@test length(nodes) == 1
mktempdir() do path
file_path =joinpath(path,"annotations.tex")
file_path = joinpath(path, "annotations.tex")
@test_nowarn savefig(pgfx_plot, file_path)
open(file_path) do io
lines = readlines(io)
@ -271,7 +271,7 @@ end
nodes = filter(x -> !isa(x, PGFPlotsX.Plot), axis_content)
@test length(nodes) == 3
mktempdir() do path
file_path =joinpath(path,"annotations.tex")
file_path = joinpath(path, "annotations.tex")
@test_nowarn savefig(pgfx_plot, file_path)
open(file_path) do io
lines = readlines(io)
@ -296,14 +296,14 @@ end
nodes = filter(x -> !isa(x, PGFPlotsX.Plot), axis_content)
@test length(nodes) == 9
mktempdir() do path
file_path =joinpath(path,"annotations.tex")
file_path = joinpath(path, "annotations.tex")
@test_nowarn savefig(annotation_plot, file_path)
open(file_path) do io
lines = readlines(io)
@test count(s -> occursin("node", s), lines) == 9
end
# test .tikz extension
file_path =joinpath(path,"annotations.tikz")
file_path = joinpath(path, "annotations.tikz")
@test_nowarn savefig(annotation_plot, file_path)
@test_nowarn open(file_path) do io
end
@ -327,9 +327,12 @@ end
@test ribbon_plot.o.the_plot !== nothing
end # testset
@testset "Markers and Paths" begin
pl = plot(5 .- ones(9), markershape = [:utriangle, :rect],
pl = plot(
5 .- ones(9),
markershape = [:utriangle, :rect],
markersize = 8,
color = [:red, :black])
color = [:red, :black],
)
Plots._update_plot_object(pl)
axis = Plots.pgfx_axes(pl.o)[1]
plots = filter(x -> x isa PGFPlotsX.Plot, axis.contents)
@ -344,27 +347,44 @@ end # testset
@test pl[1].attr[:extra_kwargs][:test] == "me"
pl = plot(1:5, test = "me", extra_kwargs = :plot)
@test pl.attr[:extra_plot_kwargs][:test] == "me"
pl = plot(1:5, extra_kwargs = Dict(:plot => Dict(:test => "me"), :series => Dict(:and => "me too")))
pl = plot(
1:5,
extra_kwargs = Dict(
:plot => Dict(:test => "me"),
:series => Dict(:and => "me too"),
),
)
@test pl.attr[:extra_plot_kwargs][:test] == "me"
@test pl[1][1].plotattributes[:extra_kwargs][:and] == "me too"
pl = plot(
plot(1:5, title="Line"),
scatter(1:5, title="Scatter", extra_kwargs=Dict(:subplot=>Dict("axis line shift" => "10pt")))
plot(1:5, title = "Line"),
scatter(
1:5,
title = "Scatter",
extra_kwargs = Dict(:subplot => Dict("axis line shift" => "10pt")),
),
)
Plots._update_plot_object(pl)
axes = Plots.pgfx_axes(pl.o)
@test !haskey(axes[1].options.dict, "axis line shift")
@test haskey(axes[2].options.dict, "axis line shift")
pl = plot(x->x, -1:1; add = raw"\node at (0,0.5) {\huge hi};", extra_kwargs = :subplot)
pl = plot(
x -> x,
-1:1;
add = raw"\node at (0,0.5) {\huge hi};",
extra_kwargs = :subplot,
)
@test pl[1][:extra_kwargs] == Dict(:add => raw"\node at (0,0.5) {\huge hi};")
Plots._update_plot_object(pl)
axes = Plots.pgfx_axes(pl.o)
@test filter(x->x isa String, axes[1].contents)[1] == raw"\node at (0,0.5) {\huge hi};"
@test filter(x -> x isa String, axes[1].contents)[1] ==
raw"\node at (0,0.5) {\huge hi};"
plot!(pl)
@test pl[1][:extra_kwargs] == Dict(:add => raw"\node at (0,0.5) {\huge hi};")
Plots._update_plot_object(pl)
axes = Plots.pgfx_axes(pl.o)
@test filter(x->x isa String, axes[1].contents)[1] == raw"\node at (0,0.5) {\huge hi};"
@test filter(x -> x isa String, axes[1].contents)[1] ==
raw"\node at (0,0.5) {\huge hi};"
end # testset
@testset "Titlefonts" begin
@ -380,7 +400,11 @@ end # testset
@test pl[:plot_title] == "Test me"
@test pl[:plot_titlefontsize] == 2
@test pl[:plot_titlefonthalign] == :left
pl = heatmap(rand(3,3), colorbar_title = "Test me", colorbar_titlefont = (12, :right))
pl = heatmap(
rand(3, 3),
colorbar_title = "Test me",
colorbar_titlefont = (12, :right),
)
@test pl[1][:colorbar_title] == "Test me"
@test pl[1][:colorbar_titlefontsize] == 12
@test pl[1][:colorbar_titlefonthalign] == :right