margaid
margaid copied to clipboard
set series title
I just discovered margaid and like it very much. However, I cannot see how to set a series title apart from at creation time. I need to set the series title once values have been accumulated and calculation done on these values. is there a way to achieve that?
pseudo code to illustrate:
for i,d:=range data{
...
series[i] = m.NewSeries()
avg=0
for j:=0;j<len(data.x);j++{
somevalue= f(data.y[i])
avg+=somevalue
series[i].Add(m.MakeValue(data.x[i],somevalue))
}
avg:=avg/float64(len(data.x))
series[i].SetTitle("seriesname "+ strconv.FormatFloat(avg, ...) //how do I achieve this?
}