<commit_before># Gruff Graphs

[![Build Status](https://travis-ci.org/topfunky/gruff.png?branch=master)](https://travis-ci.org/topfunky/gruff)
[![Gem Version](https://badge.fury.io/rb/gruff.png)](http://badge.fury.io/rb/gruff)

A library for making beautiful graphs.

## WARNING

This is beta-quality software. It works well according to our tests,
but the API may change and other features will be added.
We are working to make Gruff production quality software.

## Installation

Add this line to your application's Gemfile:

    gem 'gruff'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install gruff

## Usage

```Ruby
require 'gruff'
g = Gruff::Line.new
g.title = 'Wow!  Look at this!'
g.labels = { 0 => '5/6', 1 => '5/15', 2 => '5/24', 3 => '5/30', 4 => '6/4',
             5 => '6/12', 6 => '6/21', 7 => '6/28' }
g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88]
g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95]
g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57]
g.data :Jane, [95, 95, 95, 90, 85, 80, 88, 100]
g.data :Philip, [90, 34, 23, 12, 78, 89, 98, 88]
g.data :Arthur, [5, 10, 13, 11, 6, 16, 22, 32]
g.write('test/output/line_chart.png')
```

## Examples

You can find many examples in the [test](https://github.com/topfunky/gruff/tree/master/test)
directory along with their resulting charts in the
[output](https://github.com/topfunky/gruff/tree/master/test/output) directory.

You can find older examples here:  http://nubyonrails.com/pages/gruff<commit_msg>* Updated README with concrete code example.  Simpler file name.<commit_after># Gruff Graphs

[![Build Status](https://travis-ci.org/topfunky/gruff.png?branch=master)](https://travis-ci.org/topfunky/gruff)
[![Gem Version](https://badge.fury.io/rb/gruff.png)](http://badge.fury.io/rb/gruff)

A library for making beautiful graphs.

## WARNING

This is beta-quality software. It works well according to our tests,
but the API may change and other features will be added.
We are working to make Gruff production quality software.

## Installation

Add this line to your application's Gemfile:

    gem 'gruff'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install gruff

## Usage

```Ruby
require 'gruff'
g = Gruff::Line.new
g.title = 'Wow!  Look at this!'
g.labels = { 0 => '5/6', 1 => '5/15', 2 => '5/24', 3 => '5/30', 4 => '6/4',
             5 => '6/12', 6 => '6/21', 7 => '6/28' }
g.data :Jimmy, [25, 36, 86, 39, 25, 31, 79, 88]
g.data :Charles, [80, 54, 67, 54, 68, 70, 90, 95]
g.data :Julie, [22, 29, 35, 38, 36, 40, 46, 57]
g.data :Jane, [95, 95, 95, 90, 85, 80, 88, 100]
g.data :Philip, [90, 34, 23, 12, 78, 89, 98, 88]
g.data :Arthur, [5, 10, 13, 11, 6, 16, 22, 32]
g.write('exciting.png')
```

## Examples

You can find many examples in the [test](https://github.com/topfunky/gruff/tree/master/test)
directory along with their resulting charts in the
[output](https://github.com/topfunky/gruff/tree/master/test/output) directory.

You can find older examples here:  http://nubyonrails.com/pages/gruff
{'fraction_non_alphanumeric': 0.1718904651930056, 'fraction_numerical': 0.08248102936324646, 'mean_word_length': 3.6718027734976886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552079', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1132, 'n_words': 372}