# How can I make DensityHistogram obey the lower bound in PlotRange in version 10?

Bug introduced in 10.0.0 and fixed in 10.0.1

In version 9, DensityHistogram worked with PlotRange as expected:

SeedRandom[0]
DensityHistogram[
Transpose[{RandomReal[NormalDistribution[], 1000],
RandomReal[NormalDistribution[], 1000]}],
PlotRange -> {{0, 3}, {0, 3}}
]


In version 10, the upper bound (3) is obeyed (with some new padding) but the lower bound (0) is ignored:

How can I make DensityHistogram obey the lower bound in PlotRange?

Not sure why PlotRange doesn't work (might need to report wolfram technical support), for workaround you could wrap it with Show:

SeedRandom[0]
Show[DensityHistogram[
Transpose[{RandomReal[NormalDistribution[], 1000],
RandomReal[NormalDistribution[], 1000]}]],
PlotRange -> {{0, 3}, {0, 3}}]


To get a plot very similar to the version 9 plot:

SeedRandom[0]
DensityHistogram[
Transpose[{RandomReal[NormalDistribution[], 1000],
RandomReal[NormalDistribution[], 1000]}],
PlotRangePadding -> {{-3.4, -1.4}, {-3.4, 0}}, PlotTheme -> "Classic"]


Looks like a bug.

Specifying bin delimiters is an other option:

SeedRandom[0]
DensityHistogram[
Transpose[{RandomReal[NormalDistribution[], 1000],
RandomReal[NormalDistribution[], 1000]}], {-0.5, 3.5, 0.5}]