cvplot
cvplot copied to clipboard
set with vector<pair<float, cvplot::Point2>> does not work as expected.
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);
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.