pyplot hexbin (#2679)

* pyplot hexbin

* pyplot hexbin changes
This commit is contained in:
isentropic 2020-05-09 20:07:32 +09:00 committed by GitHub
parent 32c725e770
commit 4a00018f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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)...)