I’m attempting to create scatter plots of some strange attractors in Julia using GLMakie. I could not find a way of setting the entire background (everything except the points) black. Here is part of my code:
fig = Figure(size=(1500, 1500), backgroundcolor = RGBAf(0, 0, 0, 1))
fig_grid = CartesianIndices((1, 1))
cmap = to_colormap(:BuPu_9)
cmap[1] = RGBAf(1, 1, 1, 1)
let
n_points = 10^6
for (i, arg) in enumerate(cargs)
global points = trajectory(Juan, arg...; n=n_points)
r, c = Tuple(fig_grid[i])
ax, plot = datashader(fig[r, c], points;
colormap=cmap,
async=false,
axis=(; type=Axis, title=join(string.(arg), ", ")))
ax.backgroundcolor = RGBAf(0, 0, 0, 1)
plot.backgroundcolor = RGBAf(0, 0, 0, 1)
hidedecorations!(ax)
hidespines!(ax)
end
end
rowgap!(fig.layout,5)
colgap!(fig.layout,1)
display(fig)
I tried setting the figure background color black and the axis background color black, yet when displayed, only the border of the image has a black background color. Sorry for such a simple question, as I am new to the language. Thanks in advance!
Maxime Jaccon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.