<commit_before>/**
*
*	FIGURE: generator
*
*
*
*	DESCRIPTION:
*		- 
*
*
*	API:
*		- 
*
*
*	NOTES:
*		[1] 
*
*
*	TODO:
*		[1] 
*
*
*	HISTORY:
*		- 2014/06/02: Created. [AReines].
*
*
*	DEPENDENCIES:
*		[1] 
*
*
*	LICENSE:
*		
*
*	Copyright (c) 2014. <NAME>.
*
*
*	AUTHOR:
*		<NAME>. <EMAIL>. 2014.
*
*
*/

(function() {
	'use strict';

	// MODULES //

	var // xfig figure library:
		xfig = require( 'figure.io' ),

		// Module to decode dataset:
		mapping = require( './../../utils/mapping.js' ),

		// Chart generators:
		Multipanel = require( './charts/multipanel.js' );


	// GENERATOR //

	/**
	* FUNCTION: generator( document, selection, data, clbk )
	*
	*/
	var generator = function( document, selection, data, clbk ) {
		var figure, datasets, labels = [], canvas;

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

		// Create the figure:
		figure.create( document, selection );

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

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

		// [3] Decode the datasets:
		datasets = Object.keys( data );
		for ( var i = 0; i < datasets.length; i++ ) {
			labels.push( mapping[ datasets[ i ] ] );
		}

		// [4] Create a new Multipanel chart:
		Multipanel( canvas, data, 11900, 7900, 90, 80, labels );

		// Finished:
		clbk();

	}; // end GENERATOR


	// EXPORTS //

	module.exports = generator;

})();<commit_msg>[UPDATE] hack to resize matrix figure based on dataset number.<commit_after>/**
*
*	FIGURE: generator
*
*
*
*	DESCRIPTION:
*		- 
*
*
*	API:
*		- 
*
*
*	NOTES:
*		[1] 
*
*
*	TODO:
*		[1] 
*
*
*	HISTORY:
*		- 2014/06/02: Created. [AReines].
*
*
*	DEPENDENCIES:
*		[1] 
*
*
*	LICENSE:
*		
*
*	Copyright (c) 2014. <NAME>.
*
*
*	AUTHOR:
*		<NAME>. <EMAIL>. 2014.
*
*
*/

(function() {
	'use strict';

	// MODULES //

	var // xfig figure library:
		xfig = require( 'figure.io' ),

		// Module to decode dataset:
		mapping = require( './../../utils/mapping.js' ),

		// Chart generators:
		Multipanel = require( './charts/multipanel.js' );


	// GENERATOR //

	/**
	* FUNCTION: generator( document, selection, data, clbk )
	*
	*/
	var generator = function( document, selection, data, clbk ) {
		var figure, canvas,
			labels = [],
			datasets = Object.keys( data ),
			ratio = datasets.length / 22;

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

		// Create the figure:
		figure.create( document, selection );

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

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

		// [3] Decode the datasets:
		for ( var i = 0; i < datasets.length; i++ ) {
			labels.push( mapping[ datasets[ i ] ] );
		}

		// [4] Create a new Multipanel chart:
		Multipanel( canvas, data, 11900*ratio, 7900*ratio, 90, 80, labels );

		// Finished:
		clbk();

	}; // end GENERATOR


	// EXPORTS //

	module.exports = generator;

})();
{'fraction_non_alphanumeric': 0.18587608261159227, 'fraction_numerical': 0.0313124583610926, 'mean_word_length': 2.5665083135391926, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '7565167', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1160, 'n_words': 287}