Giter VIP home page Giter VIP logo

Comments (5)

Cryoris avatar Cryoris commented on July 18, 2024

That's an interesting failure! It's been a while since I was actively using and maintaining this code, but I think the second signature in your comment is to allow chaining of multiple datasets e.g.

plot(x1, y1, "r*", x2, y2, "b--", ...);

I'm a little confused as to why the compilation fails for you, is there an option you can force the compiler to choose one of the options if there are multiple? Both would work in this case.

If that's not possible, I'd rename or remove the second function. It's just for convenience to allow multiple datasets in a single function call, I think it's justified (and probably cleaner too) to have one line per dataset.

from matplotlib-cpp.

bjornrommel avatar bjornrommel commented on July 18, 2024

No, no chaining involved! The compiler cannot decide between the two overloaded alternatives because one of them defaults missing arguments.

Please, check which function is supposed to catch plot(x, y, string)? The first alternative catches plot(x, y, string, keyword), which works because keyword defaults to {}; so, that's valid. The second alternatives catches plot(x,y,string), which is also valid. Here, string and format are meant to refer to the same argument.

from matplotlib-cpp.

Cryoris avatar Cryoris commented on July 18, 2024

Please, check which function is supposed to catch plot(x, y, string)?

The first one. The second one is only there to enable the chaining which you don't need it seems 🙂

from matplotlib-cpp.

bjornrommel avatar bjornrommel commented on July 18, 2024

from matplotlib-cpp.

bjornrommel avatar bjornrommel commented on July 18, 2024

from matplotlib-cpp.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.