# Partially empty 2d histogram Plots.jl

**URL:** https://discourse.julialang.org/t/partially-empty-2d-histogram-plots-jl/36828
**Category:** Visualization
**Created:** [April 1, 2020, 5:28am UTC](https://discourse.julialang.org/t/partially-empty-2d-histogram-plots-jl/36828 "2020-04-01T05:28:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![isentropic](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/isentropic/32/11894_2.png) [@isentropic](https://discourse.julialang.org/u/isentropic)
#### Post date: [April 1, 2020, 5:28am UTC](https://discourse.julialang.org/t/partially-empty-2d-histogram-plots-jl/36828/1 "2020-04-01T05:28:44Z")

</div>

Attempting plotting a small circle in 2d histogram (with custom bins and limits), gives a natural result in pyplot:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/f/bfec9ec94c0eb10909b3b41dee7e8461543adc58.png)

However, Plots for some reason gives blank pixels (same image):  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/1/713b139c310c227fdb1bf7be18a7bc82fefb302f.png)

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [April 1, 2020, 6:52am UTC](https://discourse.julialang.org/t/partially-empty-2d-histogram-plots-jl/36828/2 "2020-04-01T06:52:00Z")

</div>

It depends what you think is a “natural result”. Do you show empty bins or not?  
You can join the discussion here: [Histogram2d's default colors with transparent background considered harmful · Issue #2053 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues/2053)

---

<div class="post-metadata">

### Author: ![isentropic](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/isentropic/32/11894_2.png) [@isentropic](https://discourse.julialang.org/u/isentropic)
#### Post date: [April 1, 2020, 7:48am UTC](https://discourse.julialang.org/t/partially-empty-2d-histogram-plots-jl/36828/3 "2020-04-01T07:48:05Z")

</div>

I see,

```julia
Plots.histogram2d(beam[:,1], beam[:,2], show_empty=true)

```

fixes it

Or,  
using any of these aliases is also valid

```julia
:show_empty_bins, :showemptybins, :showempty, :show_empty, :show_zeros, :showzeros

```

Hope this would help some users.
