<commit_before>#' Pretty plotting module

export = import('./export', attach = 'export_from')

gg = import_package('ggplot2')
export_from(gg)

#
# Set a very minimal theme. Avoid chartjunk.
#

fonts = import('./fonts')
fonts$register_font('Roboto')
fonts$register_font('Roboto Condensed', 'RobotoCondensed')

.theme_basic = theme_minimal() + theme(panel.grid = element_blank())

theme_fancy = .theme_basic +
    theme(text = element_text(family = 'Roboto Condensed'))

theme_publication = .theme_basic +
    theme(text = element_text(family = 'Helvetica'))

theme_set(theme_fancy)
<commit_msg>Make themes into functions<commit_after>#' Pretty plotting module

export = import('./export', attach = 'export_from')

gg = import_package('ggplot2')
export_from(gg)

#
# Set a very minimal theme. Avoid chartjunk.
#

fonts = import('./fonts')
fonts$register_font('Roboto')
fonts$register_font('Roboto Condensed', 'RobotoCondensed')

.theme_basic = function () {
    theme_minimal() + theme(panel.grid = element_blank())
}

theme_fancy = function () {
    .theme_basic() + theme(text = element_text(family = 'Roboto Condensed'))
}

theme_publication = function () {
    .theme_basic() + theme(text = element_text(family = 'Helvetica'))
}

theme_set(theme_fancy())

{'fraction_non_alphanumeric': 0.14638027048528243, 'fraction_numerical': 0.0015910898965791568, 'mean_word_length': 5.691489361702128, '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': '1712397', 'n_tokens_mistral': 423, 'n_tokens_neox': 408, 'n_words': 86}