I have a list of means and standard deviations, and I would like to make a (log-log) error bar plot using them. This is doable, but I'm confused how to do so without using the plotutil functions to generate them for me. I see there is the YErrorBars type and the YErrorer interface, but I don't quite see how to use them. XY should be the location of the mean, and YErrorer should return the +/- 2 standard deviations for each mean?
Thanks.
--
You received this message because you are subscribed to the Google Groups "plotinum-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plotinum-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Forgot to CC the list.
The first number is always subtracted. This will be included in the future documentation. If you are feeling ambition, I would gladly accept a patch documenting it. Otherwise, I'll get to it this weekend.On Wed May 07 2014 at 7:32:25 PM, Brendan Tracey <tracey....@gmail.com> wrote:Presumably it subtracts one of the values for you (given that they are both positive)? Is it always the first number that is subtracted (your code doesn’t show)?ThanksOn May 7, 2014, at 4:29 PM, Ethan Burns <burns...@gmail.com> wrote:The error values are specified as two positive values that the plotter adds to the center for you:package mainimport ()type XYMeanErr []struct {X float64YMean, YError float64}func (e XYMeanErr) Len() int {return len(e)}func (e XYMeanErr) XY(i int) (x, y float64) {return e[i].X, e[i].YMean}func (e XYMeanErr) YError(i int) (float64, float64) {yerr := e[i].YErrorreturn yerr, yerr}func main() {data := XYMeanErr{{0, 10, 5}, {1, 10, 5}, {2, 20, 10},}p, err := plot.New()if err != nil {panic(err)}line, err := plotter.NewLine(data)if err != nil {panic(err)}yerr, err := plotter.NewYErrorBars(data)if err != nil {panic(err)}p.Add(line, yerr)p.Y.Min = 0if err := p.Save(4, 4, "test.eps"); err != nil {panic(err)}}This needs to be better documented, since it's no clear from any of the godoc. I had to look at how the plotter draws the lines to figure it out. Also, there should be an example. Here's the issue: https://code.google.com/p/plotinum/issues/detail?id=141.EthanOn Wed May 07 2014 at 7:05:10 PM, Brendan Tracey <tracey....@gmail.com> wrote:And here is the plot plotinum is making. The values don’t match up. (at least with the Y axis location, though for this particular run the trend looks okay)
>> To unsubscribe from this group and stop receiving emails from it, send an email to plotinum-discuss+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
---------- Forwarded message ----------
From: Brendan Tracey <tracey....@gmail.com>
To: Ethan Burns <burns...@gmail.com>
Cc:
Date: Wed, 7 May 2014 16:05:07 -0700
Subject: Re: Plot with error barsAnd here is the plot plotinum is making. The values don’t match up. (at least with the Y axis location, though for this particular run the trend looks okay)
---------- Forwarded message ----------
From: Brendan Tracey <tracey....@gmail.com>
To: Ethan Burns <burns...@gmail.com>
Cc:
Date: Wed, 7 May 2014 16:05:07 -0700
Subject: Re: Plot with error bars
Thoughts?
Ethan