From 63ddf40924ca3d0d41234f757fd49f73495f8dcf Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 7 Feb 2017 01:23:06 -0800 Subject: [PATCH] analyze: fix graph legends --- analyze/05_plot.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/analyze/05_plot.go b/analyze/05_plot.go index e8b8134a..a279693f 100644 --- a/analyze/05_plot.go +++ b/analyze/05_plot.go @@ -76,7 +76,7 @@ func (all *allAggregatedData) draw(cfg dbtester.Plot, pairs ...pair) error { l.Dashes = plotutil.Dashes(i) ps = append(ps, l) - plt.Legend.Add(all.headerToDatabaseID[p.y.Header()], l) + plt.Legend.Add(all.headerToDatabaseDescription[p.y.Header()], l) } plt.Add(ps...) @@ -115,7 +115,7 @@ func (all *allAggregatedData) drawXY(cfg dbtester.Plot, pairs ...pair) error { l.Dashes = plotutil.Dashes(i) ps = append(ps, l) - plt.Legend.Add(all.headerToDatabaseID[p.y.Header()], l) + plt.Legend.Add(all.headerToDatabaseDescription[p.y.Header()], l) } plt.Add(ps...) @@ -153,7 +153,7 @@ func (all *allAggregatedData) drawXYWithErrorPoints(cfg dbtester.Plot, triplets l.Color = getRGBII(all.headerToDatabaseID[triplet.avgCol.Header()], i) l.Dashes = plotutil.Dashes(i) ps = append(ps, l) - plt.Legend.Add(all.headerToDatabaseID[triplet.avgCol.Header()]+" MIN", l) + plt.Legend.Add(all.headerToDatabaseDescription[triplet.avgCol.Header()]+" MIN", l) } { pt, err := pointsXY(triplet.x, triplet.avgCol) @@ -167,7 +167,7 @@ func (all *allAggregatedData) drawXYWithErrorPoints(cfg dbtester.Plot, triplets l.Color = getRGB(all.headerToDatabaseID[triplet.avgCol.Header()], i) l.Dashes = plotutil.Dashes(i) ps = append(ps, l) - plt.Legend.Add(all.headerToDatabaseID[triplet.avgCol.Header()], l) + plt.Legend.Add(all.headerToDatabaseDescription[triplet.avgCol.Header()], l) } { pt, err := pointsXY(triplet.x, triplet.maxCol) @@ -181,7 +181,7 @@ func (all *allAggregatedData) drawXYWithErrorPoints(cfg dbtester.Plot, triplets l.Color = getRGBIII(all.headerToDatabaseID[triplet.avgCol.Header()], i) l.Dashes = plotutil.Dashes(i) ps = append(ps, l) - plt.Legend.Add(all.headerToDatabaseID[triplet.avgCol.Header()]+" MAX", l) + plt.Legend.Add(all.headerToDatabaseDescription[triplet.avgCol.Header()]+" MAX", l) } } plt.Add(ps...)