View on

Example: linecharts/lines_with_labels

Output File:

Source File:

width: 1200px;
height: 480px;

scale-x-padding: 0.6;

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

lines {
  xs: csv('tests/testdata/city_temperatures_london.csv', month);
  ys: csv('tests/testdata/city_temperatures_london.csv', temperature);
  colors: #06c;
}

points {
  xs: csv('tests/testdata/city_temperatures_london.csv', month);
  ys: csv('tests/testdata/city_temperatures_london.csv', temperature);
  colors: #06c;
  labels: csv('tests/testdata/city_temperatures_london.csv', temperature_str);
}

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

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

legend {
  position: bottom left inside;
  items: "London";
  colors: #4572a7, #aa4643, #89a54e, #80699b;
}

Run this example:

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