# Polar heatmap with PyPlot works in REPL but not in IJulia

**URL:** <https://discourse.julialang.org/t/polar-heatmap-with-pyplot-works-in-repl-but-not-in-ijulia/35328>\
**Category:** Visualization\
**Created:** [February 29, 2020, 5:21pm UTC](https://discourse.julialang.org/t/polar-heatmap-with-pyplot-works-in-repl-but-not-in-ijulia/35328 "2020-02-29T17:21:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [February 29, 2020, 5:21pm UTC](https://discourse.julialang.org/t/polar-heatmap-with-pyplot-works-in-repl-but-not-in-ijulia/35328/1 "2020-02-29T17:21:53Z")

</div>

Plotting polar heatmap works in REPL but not in IJulia, here’s the MWE:

```julia
using PyPlot
r = [rd for rd = range(0.0, 10, length = 100), theta = range(0, 2π, length = 100)]
th = [theta for rd = range(0.0, 10, length = 100), theta = range(0, 2π, length = 100)]
subplot(projection="polar");
pcolormesh(th, r, r)

```

REPL produces the correct result:  
 ![repl](https://global.discourse-cdn.com/julialang/original/3X/7/0/70fcf125e15b61ac81559dd973de547fc1cbe03c.png)

and IJulia a rectangular heatmap:  
 ![IJulia](https://global.discourse-cdn.com/julialang/original/3X/9/7/9735ab8f86615ff6c74f2af3e55a79a0d2e57dc1.png)

Is there any tricks to solve this?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [February 29, 2020, 6:21pm UTC](https://discourse.julialang.org/t/polar-heatmap-with-pyplot-works-in-repl-but-not-in-ijulia/35328/2 "2020-02-29T18:21:36Z")

</div>

Agh. Putting all plotting commands to the same IJulia cell fixed the problem

Of course…
