View on

Example: other/demo2

Output File:

Source File:

width: 1730px;
height: 950px;

box {
  position: top;
  height: 480px;

  plot {
    width: 800px;
    height: 400px;

    position: left;

    scale-x-min: 0;
    scale-x-max: 400;

    scale-y-min: 0;
    scale-y-max: 200;

    background-color: #eee;

    gridlines {
      color: #fff;
      stroke: 2pt;
      layout-x: linear(40);
      layout-y: linear(40);
    }

    gridlines {
      color: #fff;
      stroke: 1pt;
      layout-x: linear(20);
      layout-y: linear(20);
    }

    points {
      xs: csv(tests/testdata/gauss2d.csv, x);
      ys: csv(tests/testdata/gauss2d.csv, y);
      size: 2pt;
    }

    axis {
      position: bottom;
      layout: linear(40);
    }

    axis {
      position: left;
      layout: linear(40);
    }

    legend {
      position: top right inside;
      items: "Random Data";
    }
  }

  plot {
    width: 800px;
    height: 400px;

    position: right;

    scale-x-min: 0;
    scale-x-max: 8000;

    scale-y-min: -10;
    scale-y-max: 10;

    background-color: #eee;

    gridlines {
      color: #fff;
      stroke: 2pt;
      layout-x: linear(800);
      layout-y: linear(4);
    }

    gridlines {
      color: #fff;
      stroke: 1pt;
      layout-x: linear(400);
      layout-y: linear(2);
    }

    lines {
      xs: csv(tests/testdata/measurement2.csv, time);
      ys: csv(tests/testdata/measurement2.csv, value1);
      size: 2pt;
    }

    axis {
      position: bottom;
      layout: linear(1200);
      format: datetime("%H:%M:%S");
    }

    axis {
      position: right;
      layout: linear(2);
    }

    legend {
      position: top right inside;
      items: "Random Data";
    }
  }

}

box {
  position: top;

  plot {
    width: 800px;
    height: 400px;

    position: left;

    scale-x-min: 0;
    scale-x-max: 400;

    scale-y-min: 0;
    scale-y-max: 200;

    background-color: #eee;

    gridlines {
      color: #fff;
      stroke: 2pt;
      layout-x: linear(40);
      layout-y: linear(40);
    }

    gridlines {
      color: #fff;
      stroke: 1pt;
      layout-x: linear(20);
      layout-y: linear(20);
    }

    points {
      xs: csv(tests/testdata/gauss2d.csv, x);
      ys: csv(tests/testdata/gauss2d.csv, y);
      size: 2pt;
    }

    axis {
      position: bottom;
      layout: linear(40);
    }

    axis {
      position: left;
      layout: linear(100);
    }

    legend {
      position: top right inside;
      items: "Random Data";
    }
  }

  plot {
    width: 800px;
    height: 400px;

    position: right;

    scale-x-min: 0;
    scale-x-max: 400;

    scale-y-min: 0;
    scale-y-max: 200;

    background-color: #eee;

    gridlines {
      color: #fff;
      stroke: 2pt;
      layout-x: linear(40);
      layout-y: linear(40);
    }

    gridlines {
      color: #fff;
      stroke: 1pt;
      layout-x: linear(20);
      layout-y: linear(20);
    }

    points {
      xs: csv(tests/testdata/gauss2d.csv, x);
      ys: csv(tests/testdata/gauss2d.csv, y);
      size: 2pt;
    }

    axis {
      position: bottom;
      layout: linear(40);
    }

    axis {
      position: right;
      layout: linear(100);
    }

    legend {
      position: top right inside;
      items: "Random Data";
    }
  }
}

Run this example:

$ plotfx --in examples/other/demo2.ptx --out output.svg
Edit this page on GitHub