import matplotlib.pyplot as plt
import pandas as pd
HOURS_DATA = """
2	0.02571327932370553
4	0.014705882352941176
6	0.01655512504402959
8	0.014705882352941176
10	0.013825290595280029
12	0.012152166255723846
14	0.011271574498062698
16	0.010302923564635434
"""
hours = []
wer = []
for line in HOURS_DATA.split("\n"):
    if "\t" in line:
        parts = line.split("\t")
        hours.append(int(parts[0]))
        wer.append(float(parts[1]) * 100)
df = pd.DataFrame(data={"Hours": hours, "WER": wer})
ax = plt.gca()

df.plot(kind='line',x='Hours',y='WER',ax=ax)
<matplotlib.axes._subplots.AxesSubplot at 0x7fc7ef72add0>
MINS_DATA = """
5	0.05336386051426559
10	0.05309968298696724
15	0.05301162381120113
20	0.03346248679112364
25	0.03355054596688975
30	0.03355054596688975
35	0.03222965833039803
40	0.03126100739697076
45	0.03196548080309968
50	0.028883409651285663
55	0.029059528002817893
60	0.028531172948221203
65	0.02694610778443114
70	0.029411764705882353
75	0.02588939767523776
80	0.027738640366326173
85	0.026681930257132794
90	0.025977456851003874
95	0.02386403663261712
100	0.02536104262064107
105	0.025096865093342725
110	0.02588939767523776
115	0.02712222613596337
120	0.02571327932370553
"""
df
Hours WER
0 2 2.571328
1 4 1.470588
2 6 1.655513
3 8 1.470588
4 10 1.382529
5 12 1.215217
6 14 1.127157
7 16 1.030292
mins = []
wer = []
for line in MINS_DATA.split("\n"):
    if "\t" in line:
        parts = line.split("\t")
        mins.append(int(parts[0]))
        wer.append(float(parts[1]) * 100)
pd.options.display.float_format = '{:,.2f}'.format
df = pd.DataFrame(data={"Minutes": mins, "WER": wer})
df
Minutes WER
0 5 5.34
1 10 5.31
2 15 5.30
3 20 3.35
4 25 3.36
5 30 3.36
6 35 3.22
7 40 3.13
8 45 3.20
9 50 2.89
10 55 2.91
11 60 2.85
12 65 2.69
13 70 2.94
14 75 2.59
15 80 2.77
16 85 2.67
17 90 2.60
18 95 2.39
19 100 2.54
20 105 2.51
21 110 2.59
22 115 2.71
23 120 2.57
import numpy as np
ax = plt.gca()
ax.set_xticks(np.arange(5, 125, 5))
ax.set_xticklabels(labels=mins, minor=True)

df.plot(kind='line', x='Minutes', y='WER', ax=ax, figsize=(12.8, 4.8))
<matplotlib.axes._subplots.AxesSubplot at 0x7f400bffbdd0>
MINS_DATA = """
5	0.05336386051426559
10	0.05309968298696724
15	0.05301162381120113
20	0.03346248679112364
25	0.03355054596688975
30	0.03355054596688975
"""

MINS2 = """
5	4.11
10	4.08
15	3.72
20	3.49
25	3.43
30	3.34
"""
mins = []
wer = []
for line in MINS_DATA.split("\n"):
    if "\t" in line:
        parts = line.split("\t")
        mins.append(int(parts[0]))
        wer.append(float(parts[1]) * 100)
mins2 = []
wer2 = []
for line in MINS2.split("\n"):
    if "\t" in line:
        parts = line.split("\t")
        mins2.append(int(parts[0]))
        wer2.append(float(parts[1]))
len(mins)
12
fig, ax = plt.subplots()
ax.plot(mins, wer)
ax.plot(mins, wer2)


newx = ax.lines[0].get_ydata()
newy = ax.lines[0].get_xdata()

# set new x- and y- data for the line
ax.lines[0].set_xdata(newx)
ax.lines[0].set_ydata(newy)




newx = ax.lines[1].get_ydata()
newy = ax.lines[1].get_xdata()

# set new x- and y- data for the line
ax.lines[1].set_xdata(newx)
ax.lines[1].set_ydata(newy)

ax.set_xlim([0, 10])
ax.set_ylim([0, 10])
(0.0, 10.0)
import numpy as np
import pandas as pd

ax = plt.gca()

df = pd.DataFrame(data={"300": wer, "1000": wer2}, index=mins)
[<matplotlib.lines.Line2D at 0x7f8728e72210>]