# Help with plotting using record in Makie.jl

**URL:** https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283
**Category:** New to Julia
**Created:** [June 23, 2022, 11:58pm UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283 "2022-06-23T23:58:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)
#### Post date: [June 23, 2022, 11:58pm UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283/1 "2022-06-23T23:58:19Z")

</div>

Hello everyone,

I was trying to create an animation using the record function in Makie.jl. I am able to successfully create a recording (a mp4 file).

However the image that I am plotting in the animation doesnt seem to update. Throughout the duration of the animation the same image seems to be there.

I have attached an image of my code below for your reference.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/f/9f7a19e44380df8951150ddf9aa5950ff15bee7d.png)

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [June 24, 2022, 5:26am UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283/2 "2022-06-24T05:26:47Z")

</div>

Check this page [Animations](https://makie.juliaplots.org/stable/documentation/animation/index.html)

You should modify one heatmap, not plot a new one over the old ones in each frame. That’s not very performant.

Also `rotl90(rotr90(` doesn’t do anything 🙂

---

<div class="post-metadata">

### Author: ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)
#### Post date: [June 24, 2022, 4:40pm UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283/3 "2022-06-24T16:40:26Z")

</div>

Hi again @jules,

Thanks for your response!

I do understand that I need to change the existing image, however I cant figure out how to do it.  
The example in the animations page changes the color of the lineplot. However I need to change the entire image.

Also the `rotl90(rotr90(` was very stupid, thanks for pointing that out!

---

<div class="post-metadata">

### Author: ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)
#### Post date: [June 24, 2022, 8:46pm UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283/4 "2022-06-24T20:46:04Z")

</div>

You need to pass an observable of a matrix into heatmap and update that. Maybe this page helps to understand the concepts even though it doesn’t show this specific action [Observables & Interaction](https://makie.juliaplots.org/stable/documentation/nodes/)

---

<div class="post-metadata">

### Author: ![Adi\_Rai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adi_rai/32/34413_2.png) [@Adi\_Rai](https://discourse.julialang.org/u/Adi_Rai)
#### Post date: [June 25, 2022, 3:32am UTC](https://discourse.julialang.org/t/help-with-plotting-using-record-in-makie-jl/83283/5 "2022-06-25T03:32:35Z")

</div>

Thanks for directing me to Observables, it was exactly what I needed. Thanks for your help again @jules!
