Skip to content
Create high-quality charts from the command line
C++ CMake Other
Branch: master
Clone or download

README.md

fviz

Build Status License

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):

A simple scatterplot

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

vectorfield.svg


Example: examples/charts-scientific/line_markers

line_markers.svg


Example: examples/charts-scientific/errorbars_log

errorbars_log.svg


Example: examples/charts-scientific/barchart_ranges

barchart_ranges.svg


Example: examples/charts-scientific/multiple_y_axes

multiple_y_axes.svg


Example: examples/charts-scientific/scatterplot_colors

scatterplot_colors.svg


Example: examples/charts-scientific/streamgraph

streamgraph.svg

Examples: Editorial Charts


Example: examples/charts-editorial/chart_i18n

chart_i18n.svg


Example: examples/charts-editorial/stacked_areas

stacked_areas.svg


Example: examples/charts-editorial/linechart_with_labels

linechart_with_labels.svg


Example: examples/charts-editorial/stacked_bars

stacked_bars.svg


Example: examples/charts-editorial/barchart_horizontal

barchart_horizontal.svg

Examples: Basic Charts


Example: examples/charts-basic/linechart_timeseries

linechart_timeseries.svg


Example: examples/charts-basic/barchart_groups

barchart_groups.svg


Example: examples/charts-basic/scatterplot_with_labels

scatterplot_with_labels.svg


Example: examples/charts-basic/custom_font

custom_font.svg

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.
You can’t perform that action at this time.