analyze: fix graph legends

This commit is contained in:
Gyu-Ho Lee 2017-02-07 01:23:06 -08:00
parent 33f1fa4a05
commit 63ddf40924
No known key found for this signature in database
GPG Key ID: 1DDD39C7EB70C24C
1 changed files with 5 additions and 5 deletions

View File

@ -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...)