From c85aa418854eaa9a3d8035abcb6e949c10e62eef Mon Sep 17 00:00:00 2001 From: Bernd_Mac <20151553+bernd1995@users.noreply.github.com> Date: Tue, 18 May 2021 17:26:29 +0200 Subject: [PATCH] Added histogram3d where needed --- src/args.jl | 8 +++++--- src/axes.jl | 2 +- src/subplots.jl | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/args.jl b/src/args.jl index d00cf8b9..9bc00b1d 100644 --- a/src/args.jl +++ b/src/args.jl @@ -51,12 +51,12 @@ const _axesAliases = Dict{Symbol,Symbol}( ) const _3dTypes = [ - :path3d, :scatter3d, :surface, :wireframe, :contour3d, :volume, :mesh3d + :path3d, :scatter3d, :surface, :wireframe, :contour3d, :volume, :mesh3d, :histogram3d ] const _allTypes = vcat([ :none, :line, :path, :steppre, :stepmid, :steppost, :sticks, :scatter, :heatmap, :hexbin, :barbins, :barhist, :histogram, :scatterbins, - :scatterhist, :stepbins, :stephist, :bins2d, :histogram2d, :histogram3d, + :scatterhist, :stepbins, :stephist, :bins2d, :histogram2d, :density, :bar, :hline, :vline, :contour, :pie, :shape, :image ], _3dTypes) @@ -94,13 +94,15 @@ const _typeAliases = Dict{Symbol,Symbol}( :imagesc => :image, :hist => :histogram, :hist2d => :histogram2d, + :hist3d => :histogram3d, + :lego => :histogram3d, :bezier => :curves, :bezier_curves => :curves, ) add_non_underscore_aliases!(_typeAliases) -const _histogram_like = [:histogram, :barhist, :barbins] +const _histogram_like = [:histogram, :barhist, :barbins, :histogram3d] const _line_like = [:line, :path, :steppre, :stepmid, :steppost] const _surface_like = [:contour, :contourf, :contour3d, :heatmap, :surface, :wireframe, :image] diff --git a/src/axes.jl b/src/axes.jl index 3d6236fb..b1cbfd2c 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -501,7 +501,7 @@ function widen(lmin, lmax, scale = :identity) end # figure out if widening is a good idea. -const _widen_seriestypes = (:line, :path, :steppre, :stepmid, :steppost, :sticks, :scatter, :barbins, :barhist, :histogram, :scatterbins, :scatterhist, :stepbins, :stephist, :bins2d, :histogram2d, :bar, :shape, :path3d, :scatter3d) +const _widen_seriestypes = (:line, :path, :steppre, :stepmid, :steppost, :sticks, :scatter, :barbins, :barhist, :histogram, :scatterbins, :scatterhist, :stepbins, :stephist, :bins2d, :histogram2d, :bar, :shape, :path3d, :scatter3d, :histogram3d) function default_should_widen(axis::Axis) should_widen = false diff --git a/src/subplots.jl b/src/subplots.jl index 35167349..ae893a85 100644 --- a/src/subplots.jl +++ b/src/subplots.jl @@ -49,6 +49,7 @@ function should_add_to_legend(series::Series) :hexbin, :bins2d, :histogram2d, + :histogram3d, :hline, :vline, :contour,