Merge 07b90f9dc8dfeff7c24fae8b6f5ae4604d17fbeb into 648c5ac587df6399d9a79208c91089f1b93829cb

This commit is contained in:
David Nies 2020-02-24 20:06:58 +00:00 committed by GitHub
commit b9dbb93805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -779,6 +779,24 @@ end
@deps histogram2d bins2d @deps histogram2d bins2d
@recipe function f(::Type{Val{:histogram2d_log10}}, x, y, z)
h = _make_hist((x, y), plotattributes[:bins], normed = plotattributes[:normalize], weights = plotattributes[:weights])
x := h.edges[1]
y := h.edges[2]
transform(x) = x == 0 ? NaN : log10(x)
z := Surface(transform.(h.weights))
# TODO: doc
legend := false
seriestype := :bins2d
()
end
@shorthands histogram2d_log10
@deps histogram2d_log10 bins2d
@recipe function f(h::StatsBase.Histogram{T, 2, E}) where {T, E} @recipe function f(h::StatsBase.Histogram{T, 2, E}) where {T, E}
seriestype --> :bins2d seriestype --> :bins2d
(h.edges[1], h.edges[2], Surface(h.weights)) (h.edges[1], h.edges[2], Surface(h.weights))