With Jupyter new figures keeps the print of the former figure

Hi all,

I’m testing scatter plots from Plots GR. I made three differents plots changing the size and colormap properties to have a look on their impact.That’s ok.

But I realize that the second plot add the new plot to the first and then the third plot add its own plot to the second and first one.
How do I avoid that If I want to keep the same document (i.e the joint picture).

scatter! appends to the last figure (or the one you provide as a first argument)
use scatter to start a new figure.

edit: Was not so easy to find for scatter but is explained for plot here Basics · Plots in the very beginning, both plot! and scatter! add to current() by default.

1 Like

This is great thank you. I ssume that ! has the same use for all plot function then.

E.F

Yes, that is a unified design principle.

Oh – and since I just saw that – Weolcome to the Julia Discourse Forum! :wave:

1 Like