How to create layouts in Julia plotting packages?

I would appreciate an explanation of what does each command mean for those not familiar with matlab.

Julia by itself doesn’t plot, so you first must pick one of the different plotting packages and then we can discuss how to use them. Some that come to mind are Makie.jl, Plots.jl, GR.jl, PyPlot.jl, Gadfly.jl and VegaLite.jl.

For example, in Makie, you could do something like:

using GLMakie
fig = Figure()
ax = Axis(fig[1,1]) #create an axis in positiion 1,1
lines!(ax,rand(10),rand(10)) # plot a line into that axis
ax2 = Axis(fig[1,2]) #create new axis, now in position 1,2
scatter!(ax2,rand(10),rand(10)) #do a scatter line in the second axis

And this will give you something like:

You can see a layouting tutorial for Makie here Layout Tutorial

For other packages, the syntax and layouting will be different.

2 Likes