Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix legend in the way of performance plots #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/ui/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ function performances_plot(rep::Report.Iteration)
push!(global_content, rep.perfs_learning.time)
glob = Plots.pie(global_labels, global_content,
title="Global",
legend=:right)
legend=:outerright)
# Self-play details
self_play =
let gcratio = rep.perfs_self_play.gc_time / rep.perfs_self_play.time
Plots.pie(
["MCTS and Inference", "GC"],
[1 - gcratio, gcratio],
title="Self Play")
title="Self Play",
legend=:outerright)
end
# Learning details
learning = Plots.pie(
Expand All @@ -75,8 +76,9 @@ function performances_plot(rep::Report.Iteration)
rep.learning.time_loss,
rep.learning.time_train,
rep.learning.time_eval],
title="Learning")
return Plots.plot(glob, self_play, learning)
title="Learning",
legend=:outerright)
return Plots.plot(glob, self_play, learning, size = [1000, 400])
end

function plot_iteration(
Expand Down