Skip to content

Commit

Permalink
Minor bugfixes for benchmark plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Apr 25, 2024
1 parent 01b77ab commit f69cde9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions benchmarks/benchmark_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ function plot_trials(
end

tag_attrs = capture_tag_attrs(results.tags)
tag_theme = merge(theme, tag_attrs)

lp = if legend_position isa Makie.Automatic
gp.layout[gp.span.rows, gp.span.cols, TopRight()]
Expand All @@ -101,12 +100,15 @@ function plot_trials(
error()
end

return Makie.with_theme(tag_theme) do
ax = Makie.with_theme(theme) do
ax = Axis(
gp;
tag_attrs.Axis...,
xlabel = "Number of points", ylabel = "Time to calculate",
xscale = log10, yscale = log10, ytickformat = _prettytime,
xticksvisible = true, xticklabelsvisible = true,
yticks = Makie.LogTicks(Makie.WilkinsonTicks(7; k_min = 4)),
ygridwidth = 0.75,
)
plots = [scatterlines!(ax, x, y; label = label) for (x, y, label) in zip(xs, ys, labels)]
setproperty!.(getindex.(getproperty.(plots, :plots), 1), :alpha, 0.1)
Expand All @@ -118,13 +120,11 @@ function plot_trials(
valign = legend_valign,
orientation = legend_orientation
)
ax.xticksvisible[] = true
ax.xtickcolor[] = ax.xgridcolor[]
ax.xticklabelsvisible[] = true
ax.yticks[] = Makie.LogTicks(Makie.WilkinsonTicks(7; k_min = 4))
ax.ygridwidth[] = 0.75
return ax
ax
end

return ax
end

const _tag_includelist = ["title", "subtitle"]
Expand Down

0 comments on commit f69cde9

Please sign in to comment.