<commit_before>from nose.tools import assert_equal, assert_true

from ggplot.tests import image_comparison, cleanup
from ggplot import *

from numpy import linspace
from pandas import DataFrame

df = DataFrame({"blahblahblah": linspace(999, 1111, 9),
                "yadayadayada": linspace(999, 1111, 9)})
simple_gg = ggplot(aes(x="blahblahblah", y="yadayadayada"), data=df) + geom_line()

    
@image_comparison(["all_text"], extensions=["png"], tol=10)
def test_element_text1():
    print(simple_gg + theme(text=element_text(family="serif", face="bold.italic",
                                       size=50, color="red", angle=45)))

@image_comparison(["axis_text"], extensions=["png"], tol=10)
def test_element_text2():
    #print(simple_gg)
    print(simple_gg +
          theme(text=element_text(face="bold", size=50, color="red")) +
          theme(axis_text=element_text(color="green", angle=45)))

@image_comparison(["axis_title"], extensions=["png"], tol=10)
def test_element_text3():
    print (simple_gg +
           theme(text=element_text(face="bold", color="red")) +
           theme(axis_title=element_text(color="purple", size=50)))

@image_comparison(["axis_title_text"], extensions=["png"], tol=15)
def test_element_text4():
    print(simple_gg +
          theme(text=element_text(face="bold", color="red")) +
          theme(axis_text_y=element_text(color="green", size=50)) +
          theme(axis_title=element_text(color="blue", size=50)))
<commit_msg>Remove serif. That styling is silently ignored by matplotlib if unavailable.<commit_after>from nose.tools import assert_equal, assert_true

from ggplot.tests import image_comparison, cleanup
from ggplot import *

from numpy import linspace
from pandas import DataFrame

df = DataFrame({"blahblahblah": linspace(999, 1111, 9),
                "yadayadayada": linspace(999, 1111, 9)})
simple_gg = ggplot(aes(x="blahblahblah", y="yadayadayada"), data=df) + geom_line()

    
@image_comparison(["all_text"], tol=10)
def test_element_text1():
    print(simple_gg + theme(text=element_text(family="serif", face="bold",
                                       size=50, color="red", angle=45)))

@image_comparison(["axis_text"], tol=10)
def test_element_text2():
    #print(simple_gg)
    print(simple_gg +
          theme(text=element_text(face="bold", size=50, color="red")) +
          theme(axis_text=element_text(color="green", angle=45)))

@image_comparison(["axis_title"], tol=10)
def test_element_text3():
    print (simple_gg +
           theme(text=element_text(face="bold", color="red")) +
           theme(axis_title=element_text(color="purple", size=50)))

@image_comparison(["axis_title_text"], tol=15)
def test_element_text4():
    print(simple_gg +
          theme(text=element_text(face="bold", color="red")) +
          theme(axis_text_y=element_text(color="green", size=50)) +
          theme(axis_title=element_text(color="blue", size=50)))

{'fraction_non_alphanumeric': 0.1526639344262295, 'fraction_numerical': 0.028688524590163935, 'mean_word_length': 4.654440154440154, 'pattern_counts': {'":': 4, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4990604', 'n_tokens_mistral': 1036, 'n_tokens_neox': 959, 'n_words': 168}