<commit_before>

(function () {
	'use strict';

	var _selection,
		figure,
		canvas,
		graph,
		axes,
		data,
		area,
		annotations;

	// [0] Select the element to which to append the figure:
	_selection = document.querySelector( '.main' );

	// [1] Instantiate a new figure generator:
	figure = xfig.figure();

	// Create the figure:
	figure.create( _selection );

	// [2] Instantiate a new canvas generator and configure:
	canvas = xfig.canvas( figure )
		.width( 1200 )
		.height( 1000 );

	// Create the canvas:
	canvas.create();

	// [3] Instantiate a new graph generator and configure:
	graph = xfig.graph( canvas )
		.width( 600 )
		.height( 400 )
		.position({
			'left': 90,
			'right': 20,
			'bottom': 80,
			'top': 80
		})
		.xMin( 0 )
		.xMax( 1 )
		.yMin( 0 );

	// Create the graph:
	graph.create();

	// Get data:
	d3.json( 'data/data.json', function ( error, json ) {

		// [4] Instantiate a new data generator and configure:
		data = xfig.data( json )
			.x( function( d ) { return d[ 0 ]; } )
			.y( function( d ) { return d[ 1 ]; } );

		// Transform the data:
		data.transform( 2 );

		// Bind the data instance to the graph:
		graph.data( data )
			.yMax( data.max( data.data(), function ( d ) {
				return d[ 1 ];
			}));

		// [5] Instantiate a new area generator and configure:
		area = xfig.area( graph )
			.interpolation( 'basis' )
			.labels( [ 'data 0' ] );

		// Create the area:
		area.create();

		// [6] Instantiate a new axes generator and configure:
		axes = xfig.axes( graph );

		// Create the axes:
		axes.create();

		// [7] Instantiate a new annotations generator and configure:
		annotations = xfig.annotations( canvas );

		// Create the annotations element:
		annotations.create();

		// Add a title:
		annotations.title( 'Title' );

	});

})();

<commit_msg>Subtitle demo.<commit_after>

(function () {
	'use strict';

	var _selection,
		figure,
		canvas,
		graph,
		axes,
		data,
		area,
		annotations;

	// [0] Select the element to which to append the figure:
	_selection = document.querySelector( '.main' );

	// [1] Instantiate a new figure generator:
	figure = xfig.figure();

	// Create the figure:
	figure.create( _selection );

	// [2] Instantiate a new canvas generator and configure:
	canvas = xfig.canvas( figure )
		.width( 1200 )
		.height( 1000 );

	// Create the canvas:
	canvas.create();

	// [3] Instantiate a new graph generator and configure:
	graph = xfig.graph( canvas )
		.width( 600 )
		.height( 400 )
		.position({
			'left': 90,
			'right': 20,
			'bottom': 80,
			'top': 80
		})
		.xMin( 0 )
		.xMax( 1 )
		.yMin( 0 );

	// Create the graph:
	graph.create();

	// Get data:
	d3.json( 'data/data.json', function ( error, json ) {

		// [4] Instantiate a new data generator and configure:
		data = xfig.data( json )
			.x( function( d ) { return d[ 0 ]; } )
			.y( function( d ) { return d[ 1 ]; } );

		// Transform the data:
		data.transform( 2 );

		// Bind the data instance to the graph:
		graph.data( data )
			.yMax( data.max( data.data(), function ( d ) {
				return d[ 1 ];
			}));

		// [5] Instantiate a new area generator and configure:
		area = xfig.area( graph )
			.interpolation( 'basis' )
			.labels( [ 'data 0' ] );

		// Create the area:
		area.create();

		// [6] Instantiate a new axes generator and configure:
		axes = xfig.axes( graph );

		// Create the axes:
		axes.create();

		// [7] Instantiate a new annotations generator and configure:
		annotations = xfig.annotations( canvas );

		// Create the annotations element:
		annotations.create();

		// Add a title:
		annotations.title( 'Title' );

		annotations = xfig.annotations( graph );
		annotations.create();
		annotations.title( 'Subtitle' );

	});

})();


{'fraction_non_alphanumeric': 0.15417789757412398, 'fraction_numerical': 0.021024258760107817, 'mean_word_length': 2.696215139442231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4598165', 'n_tokens_mistral': 1495, 'n_tokens_neox': 1241, 'n_words': 407}