<commit_before>ruby-graph
==========
An experiment in graphing equations using pure Ruby.

Usage
=====
Edit the `fn()` function in `graph.rb` and run `ruby graph.rb` to generate `graph.png`.

Screenshot
==========
This is an example of graph the equation `y = x`.

<img src="graph.png" alt="graph of y=x" />
<commit_msg>Updated documentation to include the new method of creating graphs.<commit_after>ruby-graph
==========
An experiment in graphing equations using pure Ruby.

Usage
=====
To graph, for example, `y = x^2`, setup a `RubyGraph` object and call the `graph` method.

    rg = RubyGraph.new
    rg.x_pos_offset = 20
    rg.x_neg_offset = 20
    rg.y_pos_offset = 200
    rg.y_neg_offset = 20
    rg.out_file = "graph.png"
    rg.graph { |x| (x ** 2).round }

Screenshot
==========
This is an example of graph the equation `y = x^2`.

<img src="graph.png" alt="graph of y=x^2" />

{'fraction_non_alphanumeric': 0.16161616161616163, 'fraction_numerical': 0.014590347923681257, 'mean_word_length': 3.795698924731183, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3448665', 'n_tokens_mistral': 324, 'n_tokens_neox': 291, 'n_words': 105}