Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on plotutil functions should describe behavior on multiple calls #166

Open
eaburns opened this issue Mar 17, 2015 · 2 comments
Open

Comments

@eaburns
Copy link
Member

eaburns commented Mar 17, 2015

Original issue 138 created by eaburns on 2014-02-03T00:24:33.000Z:

For example, each call to plotutil.AddLines will restart the color pallet. If you want to cycle through the colors, you have to add all lines in a single call.

@thinkski
Copy link

Agree. I found it unintuitive that using the code below, only the last plot is visible:

    p, _ := plot.New()

    for i := 0; i < 5; i++ {
        p.Add(plotter.NewFunction(func(x float64) float64 { return x + float64(i) }))
    }

    p.X.Min = -1
    p.X.Max = 1
    p.Y.Min = -10
    p.Y.Max = 10

    if err := p.Save(4*vg.Inch, 4*vg.Inch, "functions.png"); err != nil {
        panic(err)
    }

@eaburns
Copy link
Member Author

eaburns commented Sep 18, 2019

Looks like this is a slightly different issue. This bug is about the plotutil package specifically, but if I understand correctly, you are comment about the plot package's Plot.Save function. I think it's still a fair comment, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants