Skip to content

Semilogx Plot

1
semilogx(x,y);

example_semilogx_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, 1000);
    std::vector<double> y = transform(x, [](auto x) { return log(x); });
    semilogx(x, y);

    show();
    return 0;
}