<commit_before>"""Plotter.

Plot overlain time series for different runs of the Brooks' Law simulator.

Usage:
    plotter [--output=<output-file>] <attribute> <tsv>...

Arguments:
    tsv         One or more TSV file paths or a single dash for stdin.
    attribute   The name(s) of one or more a model state attribute(s) to be charted at each step.

Options:
  --output=<output-file>  Output file: [default: stdout]
  -h --help               Show this screen.
  --version               Show version
"""

import sys
from contextlib import contextmanager
from collections import OrderedDict

from docopt import docopt

import seaborn

def main(argv=None):
    if argv is None:
        argv = sys.argv

    arguments = docopt(__doc__, version="Plotter 0.5")

    tsv_paths = arguments['<tsv>']
    attributes = arguments['<attribute>']

    columns = read_tsvs(tsv_paths)

    ax = seaborn.tsplot(time=columns['elapsed_time'],
                        data=columns['software_development_rate'])

    seaborn.plt.show()

    return 0<commit_msg>A basic, but useless plot is produced.<commit_after>"""Plotter.

Plot overlain time series for different runs of the Brooks' Law simulator.

Usage:
    plotter [--output=<output-file>] <attribute> <tsv>...

Arguments:
    tsv         One or more TSV file paths or a single dash for stdin.
    attribute   The name(s) of one or more a model state attribute(s) to be charted at each step.

Options:
  --output=<output-file>  Output file: [default: stdout]
  -h --help               Show this screen.
  --version               Show version
"""

import sys
from contextlib import contextmanager
from collections import OrderedDict

from docopt import docopt

import pandas
import seaborn
import matplotlib.pyplot as plt

def main(argv=None):
    if argv is None:
        argv = sys.argv

    arguments = docopt(__doc__, version="Plotter 0.5")

    tsv_paths = arguments['<tsv>']
    attributes = arguments['<attribute>']

    # for tsv_path in tsv_paths:
    #     run_frame = pandas.read_table(tsv_path)
    #     print(run_frame)

    run_frame = pandas.read_table(tsv_paths[0], na_values=['None'])
    run_frame = run_frame.fillna(0)
    print(run_frame)

    single_frame = pandas.DataFrame()

    run_frame.plot()


    # ax = seaborn.tsplot(
    #     data=run_frame,
    #     time='elapsed_time',
    #     unit='step_number',
    #     value='software_development_rate',
    #     err_style='unit_traces')

    # columns = read_tsvs(tsv_paths)
    #
    # ax = seaborn.tsplot(time=columns['elapsed_time'],
    #                     data=columns['software_development_rate'])
    #
    #

    #seaborn.plt.show()
    plt.show()

    return 0
{'fraction_non_alphanumeric': 0.10461653015636635, 'fraction_numerical': 0.0029784065524944155, 'mean_word_length': 2.8005657708628005, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5481542', 'n_tokens_mistral': 879, 'n_tokens_neox': 832, 'n_words': 241}