# Issues with Plots.contourf and logarithmic axes

**URL:** <https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185>\
**Category:** General Usage\
**Tags:** plotting, plots\
**Created:** [January 7, 2022, 11:23am UTC](https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185 "2022-01-07T11:23:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leapsheep](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@leapsheep](https://discourse.julialang.org/u/leapsheep)\
**Post date:** [January 7, 2022, 11:23am UTC](https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185/1 "2022-01-07T11:23:12Z")

</div>

The `contourf` function behaves very strangely when plotting data points on a logarithmic grid. Supplying the x- and y-positions of the data points and setting `scale=:log10` completely messes up the plot. Here is a minimal example:

```julia
using Plots

xs = [10^i for i in range(-5, 5, length=50)]
data = [log(i*j) for i in xs, j in xs]

p1 = contourf(data, title="actual data")
p2 = contourf(xs, xs, data, scale=:log10, title="messed up data")
plot(p1, p2)

```

![contourf_issue](https://global.discourse-cdn.com/julialang/original/3X/3/5/3594c2edaacd1a971a257571e0167f58e61565d1.png)

Am I am not sure if I am doing something wrong or if there is an issue with `contourf`. Thanks for help!

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [January 7, 2022, 12:11pm UTC](https://discourse.julialang.org/t/issues-with-plots-contourf-and-logarithmic-axes/74185/2 "2022-01-07T12:11:15Z")

</div>

There seems to be a bug with the default `gr()` backend.  
`contourf()` with `scale=:log10` works fine with the other `Plots.jl` backends: `plotly()`, `pyplot()` or `pgfplotsx()` for instance
