All Projects β†’ Mandarancio β†’ charter

Mandarancio / charter

Licence: GPL-3.0 license
DSL and C Library to generate SVG Plot

Programming Languages

c
50402 projects - #5 most used programming language
Meson
512 projects

Projects that are alternatives of or similar to charter

Uplot
πŸ“ˆ A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+17356.41%)
Mutual labels:  plot, plotting
Proc
Display and analyze ROC curves in R and S+
Stars: ✭ 85 (+117.95%)
Mutual labels:  plot, plotting
Scottplot
Interactive Plotting Library for .NET
Stars: ✭ 736 (+1787.18%)
Mutual labels:  plot, plotting
sr graph
A simple, one-file, header-only, C++ utility for graphs, curves and histograms.
Stars: ✭ 67 (+71.79%)
Mutual labels:  plot, plotting
Implot
Immediate Mode Plotting
Stars: ✭ 2,014 (+5064.1%)
Mutual labels:  plot, plotting
Termplotlib
Plotting on the command line
Stars: ✭ 294 (+653.85%)
Mutual labels:  plot, plotting
Ggthemes
Additional themes, scales, and geoms for ggplot2
Stars: ✭ 1,107 (+2738.46%)
Mutual labels:  plot, plotting
Go Chartjs
golang library to make https://chartjs.org/ plots (this is vanilla #golang, not gopherjs)
Stars: ✭ 42 (+7.69%)
Mutual labels:  plot, plotting
Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (+148.72%)
Mutual labels:  plot, plotting
Ggplotnim
A port of ggplot2 for Nim
Stars: ✭ 95 (+143.59%)
Mutual labels:  plot, plotting
Jkqtplotter
an extensive Qt5 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Stars: ✭ 246 (+530.77%)
Mutual labels:  plot, plotting
Hep
hep is the mono repository holding all of go-hep.org/x/hep packages and tools
Stars: ✭ 146 (+274.36%)
Mutual labels:  plot, plotting
svg plot
Plot data in SVG format using C++ (header only) library .
Stars: ✭ 20 (-48.72%)
Mutual labels:  plot, plotting
Adjusttext
A small library for automatically adjustment of text position in matplotlib plots to minimize overlaps.
Stars: ✭ 731 (+1774.36%)
Mutual labels:  plot, plotting
PyCORN
A script to extract data from Γ„KTA/UNICORN result-files (.res)
Stars: ✭ 30 (-23.08%)
Mutual labels:  plotting, plotting-scripts
Plotters
A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely πŸ¦€ πŸ“ˆπŸš€
Stars: ✭ 1,287 (+3200%)
Mutual labels:  plot, plotting
Nim Plotly
plotting library for nim-lang
Stars: ✭ 121 (+210.26%)
Mutual labels:  plot, plotting
Scikit Plot
An intuitive library to add plotting functionality to scikit-learn objects.
Stars: ✭ 2,162 (+5443.59%)
Mutual labels:  plot, plotting
rush
R One-Liners from the Shell
Stars: ✭ 44 (+12.82%)
Mutual labels:  plot
Dython
A set of data tools in Python
Stars: ✭ 200 (+412.82%)
Mutual labels:  plot

CHARTER

A simple markdown DSL and C Library to generate svg and pgfplot (LaTeX) plot from a minimal syntax.

Example

Few examples are available in the gallery page of the wiki.

Simple syntax example:

title: reconstruction error vs compression
x-axis:
	label: compression
	mode: log
y-axis:
	label: mse
plot:
	x: 1 10    100
	y: 0 0.01  0.05
	label: f_avg
 	marker: s
 	ls: --

Resutls in:

result

Note: as the image is an svg the rendering of it is browser dependent.

DSL Syntax

syntax description
plot create a new line plot
scatter create a new scatter plot
bar create a new bar plot
x-axis parameters for the x axis
y-axis parameters for the y axis
label label for axis or plot
x x values of a plot
y y values of a plot
color colour of a plot
line-width or lw plot line width
line-style or ls plot line style ('--' or 'dashed', '-' or 'normal', ':' or dotted, '/' or 'none')
bar-width or bw bar plot width
line-color bar plot line color
marker marker style of a plot ('o', 'x', '+', 's', ' ')
range min and max value for an axis
mode axis mode ('linear' or 'log')
title plot title
width plot width
height plot height
csv://file_path#tag load a csv and use column tag as values
range: min max nstep linear range to use as values
logrange: min max nstep log range to use as values
math: f(x) math expression based on x to use as y value

commas and spaces are valid separator for arrays and the sytax in general. For the definitions spaces, tabs and : are equivalents. So x: 1 2 3 is equal to x 1,2,3.

Use as a library

if you want to include charter as a library here a simple example

#include "charter/parser.h"
#include "charter/renderer.h"

\***
 * YOUR CODE
 ***\
 chart * parsed = parse_chart(string_to_parse);
 /* chart is the structure you can also create it programmatically in your code
    and render it to svg using chart_to_svg */
 char * svg = chart_to_svg(parsed);
 chart_free(parsed);
\***\

Use as SVG generator

The build process generate as well an executable: charter. It is capable of generate an svg plot from a charter dsl file:

charter your_dsl_file > output.svg

Build and install

Use meson and ninja:

mkdir build
cd build
meson ..
ninja 
sudo ninja install

Future improvements

In the next future I will improve the svg quality, the memory performance, and the look and feel of the output plus the following features:

  • more options on grid
  • more styling options
  • better typesettings

Marker integration

At the moment charter is integrated in Marker!

marker and charter

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].