Midez
December 21, 2023, 9:25pm
1
Hello everyone,
After a long run and installing the newest version of Julia (1.9) I still get a frustrating error (that I have written in the title) when trying to save a figure
Here is my plain code (minimal example)
using Makie, GLMakie
f = Figure(resolution = (1920, 1280), fontsize = 36)
ax = Axis(f[1, 1], aspect = DataAspect(), backgroundcolor = "white")
display(f)
savefig(f, "test.png")
I’m running it in Visual Studio
Anyone made it working? I spend a lot of time on this. Also I didn’t seem to find another function for saving a figure, else I had tried it.
Makie
does not provide a function called savefig
. You likely mean save
.
Midez
December 21, 2023, 10:27pm
4
Thanks, I looked the whole time for saving figures in Julia generally.
Now this is not related to the question anymore, but while we are at it -
How to set the fontsize of the title and the figure individually?
If I rund
f = Figure(resolution = (1920, 1280),fontsize = 42)
ax = Axis(f[1, 1], aspect = DataAspect(), backgroundcolor = "white", spinewidth=2,
xticks=1:10,
yticks=1:10,
xlabel = "xlabel", xlabelsize=34,
ylabel = "ylabel",ylabelsize=34, title = "myTitle", titlefontsize = 12)
x = 1:10; y = x;
lines!(x,y)
The global fontsize is set to 42 even if I specified for the title size 12
jules
December 21, 2023, 10:28pm
5
Pretty sure it’s titlesize
, doesn’t it error with the wrong keyword?
Midez
December 21, 2023, 10:30pm
6
okay great thanks, that immediately does the trick