## 6.1 CairoMakie.jl

Let’s start with our first plot, a not so boring example but still simple enough, e.g. a line and some scatter points:

using CairoMakie
CairoMakie.activate!()
scatterlines(1:10, 1:10)

The previous plot is the default output, which we probably need to tweak by using axis names and labels.

Also note that every plotting function like scatterlines creates and returns a new Figure, Axis and plot object in a collection called FigureAxisPlot. These are known as the non-mutating methods. On the other hand, the mutating methods (e.g. scatterlines!, note the !) just return a plot object which can be appended into a given axis or the current_figure().

The next question that one might have is: how do I change the color or the marker type? This can be done via attributes, which we do in the next section.

CC BY-NC-SA 4.0 Jose Storopoli, Rik Huijzer and Lazaro Alonso