I want to create pie charts with julia and cairomakie with a equal aspect ratio of axis.
When I execute the following code:
using CairoMakie
fig, ax, plt =Makie.pie([5,7,1,4],
color = [:yellow, :orange, :red, :blue],
radius = 4,
inner_radius = 2,
strokecolor = :black,
strokewidth = 2,
)
save("myfigure.png", fig)
I get:
and when I add this line to force the aspect ratio (as show in https://docs.makie.org/stable/examples/plotting_functions/pie/):
fig, ax, plt =Makie.pie([5,7,1,4],
color = [:yellow, :orange, :red, :blue],
radius = 4,
inner_radius = 2,
strokecolor = :black,
strokewidth = 2,
axis = (autolimitaspect = 1) # line added
)
I get the following error:
ERROR: MethodError: Cannot `convert` an object of type Int64 to an object of type Symbol
Closest candidates are:
convert(::Type{T}, ::T) where T at essentials.jl:171
Symbol(::Any...) at strings/basic.jl:227
Do you have an idea of what's going wrong with my command ?

From the documentation you linked to:
Note the trailing comma after the number
1. This comma is necessary to create a named tuple, when the tuple has only a single element, otherwise, it is just equal to writingwhich again is equivalent to writing
And now you see why
autolimitaspectis suddenly anInt.The trailing comma is also necessary when creating single-element tuples: