Skip to content

Semilogy Plot

1
semilogy(x,y);

example_semilogy_1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include <cmath>
#include <matplot/matplot.h>

int main() {
    using namespace matplot;

    std::vector<double> x = iota(0, 0.1, 10);
    std::vector<double> y = transform(x, [](auto x) { return exp(x); });
    semilogy(x, y);

    show();
    return 0;
}