# Plotting image data in Julia is much slower than MATLAB

**URL:** <https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660>\
**Category:** General Usage\
**Tags:** images, matlab\
**Created:** [April 18, 2022, 9:36pm UTC](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660 "2022-04-18T21:36:58Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [April 20, 2022, 3:11pm UTC](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660/21 "2022-04-20T15:11:10Z")

</div>

Not bad in GMT

```julia
using GMT
@time gmtwrite("test.png", mat2img(rand(UInt8, 20_000, 20_000)))
 21.020054 seconds (139 allocations: 763.254 MiB, 0.23% gc time)

@time gmtwrite("test.png", mat2img(rand(UInt8, 20_000, 20_000, 3)))
 64.790045 seconds (139 allocations: 2.235 GiB, 0.12% gc time)
# test.png size ~1.11 GB

```

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [April 24, 2022, 5:59pm UTC](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660/22 "2022-04-24T17:59:23Z")

</div>

Perhaps try ImageView again, v0.11 should support this fairly well. If it doesn’t, please file an issue with the package.

[Previous page](https://discourse.julialang.org/t/plotting-image-data-in-julia-is-much-slower-than-matlab/79660.md?page=1)
