View on

Example: barcharts/horizontal_bars

Output File:

Source File:

width: 1280px;
height: 400px;

scale-y: invert;
scale-y-padding: 0.6;
scale-x-min: 0;
scale-x-max: 22;

bars {
  xs: csv(tests/testdata/gdp_per_capita_2010.csv, gdp);
  ys: csv(tests/testdata/gdp_per_capita_2010.csv, rank);
  size: 1.2em;
  color: #4572a7;
  direction: horizontal;
  labels: csv(tests/testdata/gdp_per_capita_2010.csv, gdp_label);
}

axis {
  position: left;
  layout: linear(1, align 1);
  labels: csv(tests/testdata/gdp_per_capita_2010.csv, country);
}

Run this example:

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