Skip to content

plt::plot_surface(x, y, z); #8

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

Open
yingma111 opened this issue Sep 14, 2023 · 1 comment
Open

plt::plot_surface(x, y, z); #8

yingma111 opened this issue Sep 14, 2023 · 1 comment

Comments

@yingma111
Copy link

my environment:
visual studio2022 use qt to draw image by matplotlibcpp, and i can draw all images in your https://github.com/Cryoris/matplotlib-cpp/readme.md except this one:

#include "../matplotlibcpp.h"

namespace plt = matplotlibcpp;

int main()
{
    std::vector<std::vector<double>> x, y, z;
    for (double i = -5; i <= 5;  i += 0.25) {
        std::vector<double> x_row, y_row, z_row;
        for (double j = -5; j <= 5; j += 0.25) {
            x_row.push_back(i);
            y_row.push_back(j);
            z_row.push_back(::std::sin(::std::hypot(i, j)));
        }
        x.push_back(x_row);
        y.push_back(y_row);
        z.push_back(z_row);
    }

    plt::plot_surface(x, y, z);
    plt::show();
}

the error is said there is a not processed error.
please answer me , thakns

@yingma111
Copy link
Author

my system is windows11, and python's version is 3.11.5

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

1 participant