View on

Example: barcharts/barsandlines

Output File:

Source File:

width: 1280px;
height: 480px;

scale-y-min: 0;
scale-y-max: 35;
scale-x-padding: 0.6;

bars {
  xs: csv(tests/testdata/city_temperatures_london.csv, month);
  ys: csv(tests/testdata/city_temperatures_london.csv, temperature);
  size: 2.6em;
  color: #4572a7;
}

lines {
  xs: csv(tests/testdata/city_temperatures_tokyo.csv, month);
  ys: csv(tests/testdata/city_temperatures_tokyo.csv, temperature);
  color: #aa4643;
}

points {
  xs: csv(tests/testdata/city_temperatures_tokyo.csv, month);
  ys: csv(tests/testdata/city_temperatures_tokyo.csv, temperature);
  color: #aa4643;
}

axis {
  position: top;
  layout: linear(1, align 1);
  labels: csv(tests/testdata/city_temperatures_tokyo.csv, month_name);
}

axis {
  position: bottom;
  layout: linear(1, align 1);
  labels: csv(tests/testdata/city_temperatures_tokyo.csv, month_name);
}

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

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

Run this example:

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