<commit_before>## Synopsis

kplot is an open source Cairo plotting library.
This is the README file for display with
[GitHub](https://www.github.com), which hosts a read-only source
repository of the project. 
To keep up to date with the current stable release of kplot, visit the
[kplot website](http://kristaps.bsd.lv/kplot).

## Code Example

Interfacing with kplot is fairly easy.
One creates a data source and a plot, fills the data source with points,
connects the source to the plot, the plots.
The data source can have its values changed, the plot can be re-plotted,
etc.
The following example creates [this
graph](http://kristaps.bsd.lv/kplot/example0.png).

	#include <cairo.h>
	#include <math.h>
	#include <stdio.h>
	#include <stdlib.h>
	#include <kplot.h>
	 
	int
	main(void)
	{
		struct kpair	 points1[50], points2[50];
		struct kdata	*d1, *d2;
		struct kplot	*p;
		cairo_surface_t	*surf;
		size_t		 i;
		cairo_t		*cr;
	 
		for (i = 0; i < 50; i++) {<commit_msg>Update README with embedded image.<commit_after>## Synopsis

kplot is an open source Cairo plotting library.
This is the README file for display with
[GitHub](https://www.github.com), which hosts a read-only source
repository of the project. 
To keep up to date with the current stable release of kplot, visit the
[kplot website](http://kristaps.bsd.lv/kplot).

## Code Example

Interfacing with kplot is fairly easy.
One creates a data source and a plot, fills the data source with points,
connects the source to the plot, the plots.
The data source can have its values changed, the plot can be re-plotted,
etc.

![log-scale](http://kristaps.bsd.lv/kplot/example0.png)

The above graph is created by the following.
Note that there is little error-checking!

	#include <cairo.h>
	#include <math.h>
	#include <stdio.h>
	#include <stdlib.h>
	#include <kplot.h>
	 
	int
	main(void)
	{
		struct kpair	 points1[50], points2[50];
		struct kdata	*d1, *d2;
		struct kplot	*p;
		cairo_surface_t	*surf;
		size_t		 i;
		cairo_t		*cr;
	 
		for (i = 0; i < 50; i++) {
{'fraction_non_alphanumeric': 0.10399211434204042, 'fraction_numerical': 0.011828486939379004, 'mean_word_length': 3.844868735083532, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7089483', 'n_tokens_mistral': 757, 'n_tokens_neox': 699, 'n_words': 271}