#include #include int main() { using namespace matplot; std::vector x = logspace(-1, 2, 10000); std::vector y1 = transform(x, [](auto x) { return 5 + 3 * sin(x / 4); }); std::vector y2 = transform(x, [](auto x) { return 5 - 3 * sin(x / 4); }); loglog(x, y1, x, y2, "--"); ::matplot::legend({"Signal 1", "Signal 2"}) ->location(legend::general_alignment::topleft); axis({0.1, 100, 2, 8}); show(); return 0; }