sort plot labels by score
This commit is contained in:
parent
304a16b98b
commit
5365272e27
11
scripts/plot
11
scripts/plot
|
@ -97,9 +97,14 @@
|
|||
(set-pts! mid now pts))
|
||||
|
||||
(plot-x-ticks (date-ticks))
|
||||
(plot (for/list ([(mid data) (in-hash point-tls)])
|
||||
(lines data
|
||||
#:label (hash-ref member-names mid)
|
||||
(define ordered-mids
|
||||
(sort (hash-keys point-tls)
|
||||
(lambda (a b)
|
||||
(>= (get-last-pts (hash-ref point-tls a)) (get-last-pts (hash-ref point-tls b))))))
|
||||
(plot (for/list ([mid (in-list ordered-mids)])
|
||||
(lines (hash-ref point-tls mid)
|
||||
#:label (format "~a (~a pts)" (hash-ref member-names mid)
|
||||
(get-last-pts (hash-ref point-tls mid)))
|
||||
#:color mid
|
||||
#:style mid
|
||||
#:width 2))
|
||||
|
|
Loading…
Reference in New Issue