From 4a00018f25c67919943ca2dc57c60daa16cf15fc Mon Sep 17 00:00:00 2001 From: isentropic Date: Sat, 9 May 2020 20:07:32 +0900 Subject: [PATCH] pyplot hexbin (#2679) * pyplot hexbin * pyplot hexbin changes --- src/backends/pyplot.jl | 2 +- src/recipes.jl | 2 +- src/utils.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 97cfbef5..89662b43 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -612,7 +612,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series) alpha = series[:fillalpha], cmap = py_fillcolormap(series), # applies to the pcolorfast object zorder = series[:series_plotindex], - # extrakw... # for some reason vmin and vmax are NaN??? + # extrakw... # We are not supporting clims for hexbin as calculation of bins is not trivial ) push!(handles, handle) end diff --git a/src/recipes.jl b/src/recipes.jl index 804cd63d..e7bdb7ac 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -460,7 +460,7 @@ end @deps plots_heatmap shape is_3d(::Type{Val{:plots_heatmap}}) = true RecipesPipeline.is_surface(::Type{Val{:plots_heatmap}}) = true - +RecipesPipeline.is_surface(::Type{Val{:hexbin}}) = true # --------------------------------------------------------------------------- # Histograms diff --git a/src/utils.jl b/src/utils.jl index a33c82ea..e83a9f86 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -448,7 +448,7 @@ values of the input. """ function get_clims(series::Series, op=ignorenan_extrema) zmin, zmax = Inf, -Inf - z_colored_series = (:contour, :contour3d, :heatmap, :histogram2d, :surface) + 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)...)