Under Windows in VSCode I have an ipynb file
In this is a small demo code for Makie.
using GLMakie
x = 1:40:360
fig = lines(x, x.^7; label = "Parabola",
axis = (; xlabel = "x", ylabel = "y", title ="Title"),
linestyle = :dashdot,
figure = (; resolution = (1200,800), fontsize = 22))
axislegend(; position = :lt)
fig
When I execute the cell, the result sometimes appears below the cell as an image and sometimes as an extra window which is then also interactive.
But I couldn’t figure out how to consciously control where the output takes place.
You should be able to control that via Makie.inline(true/false).
If youre switching between backends, you can also make the value stick for a particular backend: GLMakie.activate!(inline=false)
This is very helpful, although it doesn’t explain why (if you don’t use GLMakie.activate!(inline=false/true)) this changing behavior sometimes happens.
While I have you on the line:
something else that doesn’t directly belong to this topic but still seems worth asking:
if in the REPL a query for ?lines! comes always only the help for ?lines.
An excerpt from the help text:
lines(positions)
lines(x, y)
lines(x, y, z)
But the important info for the possible integration of “Axis” like lines!(ax, x, y, linewidth = 9, color = y) is not mentioned there.
Couldn’t this be improved?
Not sure either, but it is a global, so maybe something changes that global.
E.g. loading a backend could change it, but re-activating the backend should bring back the the previous inline behaviour!
using GLMakie # has inline false as default
using CairoMakie # changes global to inline!(true)
GLMakie.activate!() # should bring back inline!(false)