Skip to content

Hope to add more types as input of coordinates #474

@PangYanze

Description

@PangYanze

First of all, thanks for your efforts, which has brought great convenience to my project. However, I still encountered some minor problems. For example, when I use plot(x,y), the types supported by x/y seem not to be enough.
For example, std::span and std::range added after C++20 are not supported. For example, I use the Eigen::Vector as X and Y, and I have to copy all the data into std::vector and then invoke the plot function. While if std::span is supported, I can:

Eigen::VectorXd x = Eigen::VectorXd::LinSpaced(1001, 1, 100);
Eigen::VectorXd y=2*x;
matplot::plot(
std::span<const double>(x.data(),x.size()),
std::span<const double>(y.data(), y.size())
);

Of course, this may not be the optimal solution, but I still hope to support more input types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions