aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/test_ports/vcpkg-ci-plplot/project/main.c
blob: b2d4cd84cd170d2005a3033f8b1ceb919c74d3ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifdef USING_CMAKE
#include <plplot/plplot.h>
#else
#include <plplot.h>
#endif

int main()
{
    PLFLT x[5], y[5];
    for (int i = 0; i < 5; i++)
    {
        x[i] = 0.25 * (PLFLT)(i);
        y[i] = 2.0 * x[i];
    }

    plinit();
    plenv(0.0, 1.0, 0.0, 2.0, 0, 0);
    pllab("x", "y", "2D line plot");
    plline(5, x, y);
    plend();

    return 0;
}