# What is the best practice plotting workflow in julia?

**URL:** <https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288>\
**Category:** Visualization\
**Tags:** question, plotting, pluto, makie\
**Created:** [April 22, 2025, 9:59am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288 "2025-04-22T09:59:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hz-xiaxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hz-xiaxz/32/209585_2.png) [@hz-xiaxz](https://discourse.julialang.org/u/hz-xiaxz)\
**Post date:** [April 22, 2025, 9:59am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288/1 "2025-04-22T09:59:30Z")

</div>

Hi, don’t know if this is a duplicated question.

Using Makie.jl to plot in Julia has been a wonderful experience. But I’m wondering if there is a more convenient way to plot like using Matplotlib in python? In plotting there’s always plenty of work on frequently changing linewidth, color, etc. It is a bit unconvenient since in Pluto, the `fig=Figure()` code should be re-run after each approach (don’t quite understand how Pluto deals with the cell execution logic here) to avoid duplicated lines on the same figure. In python, I simply use a JupyterNotebook and change can be applied to the figure object, pretty fast and convenient.

Is there a best practice for plotting in Julia’s ecosystem? I mean I want a interactive environment like the awesome Pluto.jl. Also I would like figures being fast updated.

or wrap up

```julia
begin
    fig =Figure()
    ax = Axis(fig[1,1])
    lines!(ax,...)

```

in a single cell is an ideal enough solution? Not so sure. Thanks for any comment!

---

<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:** [April 22, 2025, 10:05am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288/2 "2025-04-22T10:05:13Z")

</div>

Pluto does not track mutations to variables, just assignments. So if you define `fig` in one cell and do `Axis(fig[1, 1])` in another, then Pluto doesn’t know that this mutates `fig`, and if the second cell is changed, it will run multiple times against the same figure.

That’s why you’re on the right track with the `begin` block, you wrap the whole cell making a single figure in one block and if you change anything, the figure is recreated. Unless you plot huge amounts of data, recreating a `Figure` should be pretty fast, on the order of milliseconds.

In Makie itself, you can of course also make changes to an existing plot and see the changes immediately with WGLMakie or GLMakie, but Pluto itself is not geared towards that workflow.

---

<div class="post-metadata">

**Author:** ![frankier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/frankier/32/35101_2.png) [@frankier](https://discourse.julialang.org/u/frankier)\
**Post date:** [April 23, 2025, 6:41am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288/3 "2025-04-23T06:41:03Z")

</div>

It’s worth noting that you don’t have to use Pluto when its execution model isn’t what you want. You can just use Jupyter with IJulia. IJulia also works well from VSCode.

---

<div class="post-metadata">

**Author:** ![hz-xiaxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hz-xiaxz/32/209585_2.png) [@hz-xiaxz](https://discourse.julialang.org/u/hz-xiaxz)\
**Post date:** [April 23, 2025, 7:02am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288/4 "2025-04-23T07:02:46Z")

</div>

thanks! I think I’ve tried jupyter but have run into some constantly compiling issue. Anyway I’ll check again.

---

<div class="post-metadata">

**Author:** ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Post date:** [April 23, 2025, 7:40am UTC](https://discourse.julialang.org/t/what-is-the-best-practice-plotting-workflow-in-julia/128288/5 "2025-04-23T07:40:59Z")

</div>

> [@hz-xiaxz](#):
>
> some constantly compiling issue

Hard to tell if it’s the same issue, but I’ve had similar problems and found that completely removing and re-installing the Julia kernel helped in my case.
