fviz
fviz is a command line program for creating charts and other data-driven illustrations.
It reads input data and styling information from text and CSV files and produces the output graphic as a SVG or PNG file. All charts are highly customizable using a simple s-expression based syntax.
In addition to the command line program, fviz is available as a software library which can be embedded into any application that can link to C libraries.
BETA: Please note that fviz is pre-1.0 software under active development; It is usable, but things might generally still be a bit rough around the edges. To see what already works, have a look at the Examples page.
Examples · Documentation
Example
Being a highly visual tool, fviz is best explained by example. So here is an input
file that defines a simple scatterplot (example_chart.fvz). Note that this
example is only intended to give you an idea of what the syntax looks like and to
get you started quickly; for an in-depth description of all parameters, please refer
to the documentation.
(chart/scatterplot
data-x (csv tests/testdata/gauss2d.csv x)
data-y (csv tests/testdata/gauss2d.csv y)
limit-x (0 400)
limit-y (0 200)
axes (bottom left)
grid (color #fff)
background #eee
border none)
Here is how you can run the above example file through fviz:
$ fviz --in example_chart.fvz --out example_chart.svg
When running the example locally, you can use your own input CSV file, or you
can download the example CSV file from here.
If everything works, you should get an output file similar to the one below
(example_chart.svg):
More examples can be found on the examples page. For a more detailed introduction to fviz, see the Getting Started page. If you have any questions please don't hesitate to reach out via GitHub issues.
Building
To build fviz, you need an up-to-date C++ compiler, cmake, fmtlib, libharfbuzz, libfreetype and cairo. Run:
$ cmake .
$ make -j
To install the fviz binary into your system, run make install:
$ make install
To run the test suite, run make test:
$ make test
For detailed installation instructions, have a look at the Installation page.
Acknowledgements
Parts of fviz were inspired by ideas from the "Grammar of Graphics" [0] and the ggplot2 project.
[0] Wilkinson, L. (1999). The Grammar of Graphics (Springer)
Example Gallery
Below are more examples to show you what's possible. Each example links to the source code that generated it. Even more examples can be found on the Examples page.
Examples: Scientific Charts
Example: examples/charts-scientific/vectorfield
Example: examples/charts-scientific/line_markers
Example: examples/charts-scientific/errorbars_log
Example: examples/charts-scientific/barchart_ranges
Example: examples/charts-scientific/multiple_y_axes
Example: examples/charts-scientific/scatterplot_colors
Example: examples/charts-scientific/streamgraph
Examples: Editorial Charts
Example: examples/charts-editorial/chart_i18n
Example: examples/charts-editorial/stacked_areas
Example: examples/charts-editorial/linechart_with_labels
Example: examples/charts-editorial/stacked_bars
Example: examples/charts-editorial/barchart_horizontal
Examples: Basic Charts
Example: examples/charts-basic/linechart_timeseries
Example: examples/charts-basic/barchart_groups
Example: examples/charts-basic/scatterplot_with_labels
Example: examples/charts-basic/custom_font
License
fviz -- Open-Source Data Visualization Toolkit
https://fviz.org
Copyright (c) 2018, Paul Asmuth, Laura Schlimmer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.