From 705526043f643f0312e382c59fe738b0a5c80243 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Mon, 25 Oct 2021 12:48:05 -0400 Subject: [PATCH] Moved const to args --- src/args.jl | 2 ++ src/colorbars.jl | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/args.jl b/src/args.jl index 89b8b858..389cbb68 100644 --- a/src/args.jl +++ b/src/args.jl @@ -89,6 +89,8 @@ const _allTypes = vcat( _3dTypes, ) +const _z_colored_series = [:contour, :contour3d, :heatmap, :histogram2d, :surface, :hexbin] + const _typeAliases = Dict{Symbol,Symbol}( :n => :none, :no => :none, diff --git a/src/colorbars.jl b/src/colorbars.jl index e453b42d..5131e269 100644 --- a/src/colorbars.jl +++ b/src/colorbars.jl @@ -25,8 +25,6 @@ function update_clims(sp::Subplot, op = process_clims(sp[:clims]))::Tuple{Float6 return sp[:clims_calculated] = zmin <= zmax ? (zmin, zmax) : (NaN, NaN) end -const z_colored_series = [:contour, :contour3d, :heatmap, :histogram2d, :surface, :hexbin] - """ 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`, @@ -37,7 +35,7 @@ function update_clims(series::Series, op = ignorenan_extrema)::Tuple{Float64,Flo zmin, zmax = Inf, -Inf # keeping this unrolled has higher performance - if series[:seriestype] ∈ z_colored_series && series[:z] !== nothing + if series[:seriestype] ∈ _z_colored_series && series[:z] !== nothing zmin, zmax = update_clims(zmin, zmax, series[:z], op) end if series[:line_z] !== nothing