View on

Example: linecharts/lines_with_points

Output File:

Source File:

width: 1200px;
height: 480px;

scale-x-padding: 0.6;

scale-y-max: 35;
scale-y-min: -20;

lines {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_nyc);
  colors: #4572a7;
}

points {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_nyc);
  colors: #4572a7;
}

lines {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_beijing);
  colors: #aa4643;
}

points {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_beijing);
  colors: #aa4643;
}

lines {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_moscow);
  colors: #89a54e;
}

points {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_moscow);
  colors: #89a54e;
}

lines {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_berlin);
  colors: #80699b;
}

points {
  xs: csv('tests/testdata/city_temperatures_pivot.csv', month);
  ys: csv('tests/testdata/city_temperatures_pivot.csv', temp_berlin);
  colors: #80699b;
}

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

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

legend {
  position: bottom left inside;
  items: "New York", "北京市   ", "Москва", "Berlin";
  colors: #4572a7, #aa4643, #89a54e, #80699b;
}

Run this example:

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