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

set with vector<pair<float, cvplot::Point2>> does not work as expected. #12

Open
copark86 opened this issue Sep 21, 2019 · 1 comment
Open

Comments

@copark86
Copy link

It seems like set function does not handle cvplot::Circle data properly.

    std::vector<std::pair<float, cvplot::Point2>> pole({
      std::pair<float, cvplot::Point2>(5.0f,{X(0),Y(0)})    // Expected usage of set with vector<pair<float, Point2>>
      std::pair<float, cvplot::Point2>(X(0),{Y(0),5.0f})    // The code actually works.  
    });
    figure.series("South Pole")    
    .type(cvplot::Circle)
    .color(cvplot::Red)
    .set( pole);    
    figure.show(false); 
@leovandriel
Copy link
Owner

I agree, it is a little confusing. FWIW, the idea is plotting y and radius against x, therefore grouping y and radius in the second argument. I am open to a rewrite of some of this logic. The balance between expressiveness and ease of use depends on the kinds of plots (dimensionality of data) cvplot should be supporting.

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

No branches or pull requests

2 participants