Numeric string format for Makie plot?

Try

using CairoMakie
using Formatting
using DataFrames

fig = Figure()
update_theme!(fontsize = 30)
axis = fig[1,1] = Axis(fig,
                       title = "An examle",
                       ytickformat = v -> format.(v, commas=true, precision=3)
                        )
dat = DataFrame(x = 1:5, y = [1_000_000.236, 1_000_000.660, 1_000_000.368, 1_000_000.225, 1_000_000.224])
barplot!(axis, dat.x, dat.y)

save("mwe.png", fig)

which gives me

2 Likes