<commit_before>import matplotlib.pyplot as plt
import csv
import datetime 


def displaygraphs(user_input='Meas_Test.csv'):
        #Create Lists to store values from CSV
    spec_weight_list = []
    temp_list = []
    press_list = []
    datetime_list = []
        #Read in values from CSV
    with open('Meas_Test.csv', 'r') as csvfile:
        datareader = csv.reader(csvfile)
        for row in datareader:
            if row == []:
                pass
            else:
                num = row[0].strip('[')
                spec_weight_list.append(float(num))     #Create List of Spec Weight
                    #Convert from imported csv format back into datetime object
                dt = datetime.datetime(int(2016), int(row[-6]), int(row[-5]), 
                    int(row[-4]), int(row[-3]), int(row[-2]))
                    #Create a list of datetime objects
                datetime_list.append(dt)
                    #create a list of temperature objects
                temp_list.append(float(row[1]))
                press_list.append(float(row[2]))
    """
    #Code Commented Out to develop new graph of specific weight/temp
        #Create SubPlots for specific weight and temperature
    plt.subplot(2, 1, 1)
    plt.plot(datetime_list, spec_weight_list)
    plt.title('Measurement of Specific Weight')
    plt.ylabel('Specific Weight, kg/m**3')

    plt.subplot(2, 1, 2)
    plt.plot(datetime_list, temp_list)
    plt.title('Measurement of Temperature')
    plt.ylabel('Temperature - Celcius')
    plt.show()
    """
    fig, host = plt.subplots()
    fig.subplots_adjust(right=0.75)
    
    par1 = host.twinx()
    par2 = host.twinx()
    par2.spines["right"].set_position(("axes", 1.2))
    make_patch_spines_invisible(par2)
    par2.spines["right"].set_visible(True)
    
    p1, = host.plot(datetime_list, spec_weight_list, "b-", label="Specific Weight")
    p2, = par1.plot(datetime_list, temp_list, "r-", label="Temperature")
    p3, = par2.plot(datetime_list, press_list, "g-", label="Pressure")
<commit_msg>Added Metric Unit Labels<commit_after>import matplotlib.pyplot as plt
import csv
import datetime 


def displaygraphs(user_input='Meas_Test.csv'):
        #Create Lists to store values from CSV
    spec_weight_list = []
    temp_list = []
    press_list = []
    datetime_list = []
        #Read in values from CSV
    with open('Meas_Test.csv', 'r') as csvfile:
        datareader = csv.reader(csvfile)
        for row in datareader:
            if row == []:
                pass
            else:
                num = row[0].strip('[')
                spec_weight_list.append(float(num))     #Create List of Spec Weight
                    #Convert from imported csv format back into datetime object
                dt = datetime.datetime(int(2016), int(row[-6]), int(row[-5]), 
                    int(row[-4]), int(row[-3]), int(row[-2]))
                    #Create a list of datetime objects
                datetime_list.append(dt)
                    #create a list of temperature objects
                temp_list.append(float(row[1]))
                press_list.append(float(row[2]))
    """
    #Code Commented Out to develop new graph of specific weight/temp
        #Create SubPlots for specific weight and temperature
    plt.subplot(2, 1, 1)
    plt.plot(datetime_list, spec_weight_list)
    plt.title('Measurement of Specific Weight')
    plt.ylabel('Specific Weight, kg/m**3')

    plt.subplot(2, 1, 2)
    plt.plot(datetime_list, temp_list)
    plt.title('Measurement of Temperature')
    plt.ylabel('Temperature - Celcius')
    plt.show()
    """
    fig, host = plt.subplots()
    fig.subplots_adjust(right=0.75)
    
    par1 = host.twinx()
    par2 = host.twinx()
    par2.spines["right"].set_position(("axes", 1.2))
    make_patch_spines_invisible(par2)
    par2.spines["right"].set_visible(True)
    
    p1, = host.plot(datetime_list, spec_weight_list, "b-", label="Specific Weight (kg/m^3)")
    p2, = par1.plot(datetime_list, temp_list, "r-", label="Temperature (C)")
    p3, = par2.plot(datetime_list, press_list, "g-", label="Pressure (kPa)")

{'fraction_non_alphanumeric': 0.12578921806702284, 'fraction_numerical': 0.016755706653715396, 'mean_word_length': 2.4325, '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': '3312954', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1279, 'n_words': 302}