import pylab
xlist = [100,200,300,400,500,600,700,800,900,1000,1100]
ylist0 = [12487, 87261, 323070, 877402, 1710825, 2803942, 4660637, 7086446, 10917062, 17460936, 20980783]
ylist1 = [10096, 73584, 295080, 740559, 1440205, 2419881, 4026656, 6050254, 11743242, 15299259, 16769229]
ylist2 = [4958, 38127, 143416, 371247, 725260, 1225766, 2055465, 3159489, 6186884, 8198448, 9097985]
ylist4 = [3154, 20419, 78110, 198368, 391454, 682984, 1193236, 1786995, 3803490, 4410352, 4845161]
ylist8 = [3085, 14612, 73925, 180969, 373418, 618025, 1038556, 1519762, 2818146, 4057969, 4336579]
ylist16 = [2820, 13163, 78957, 174302, 366733, 608470, 1061302, 1479830, 2669521, 3850097, 4428698]
ylist32 = [1710, 9722, 38184, 124120, 314297, 509392, 1026066, 1231968, 2512534, 3655710, 4167759]

pylab.xlabel('Размерность матрицы, символы')
pylab.ylabel('Время, микросекунды')
pylab.plot(xlist, ylist0, 'ro-', label = 'Нераспараллеленное')
pylab.plot(xlist, ylist1, 'g^-', label = '1 поток')
pylab.plot(xlist, ylist2, 'bs-', label = '2 потока')
pylab.plot(xlist, ylist4, 'b-.', label = '4 потока')
pylab.plot(xlist, ylist8, 'g:', label = '8 потоков')
pylab.plot(xlist, ylist16, 'y-', label = '16 потоков')
pylab.plot(xlist, ylist32, 'r--', label = '32 потока')
pylab.legend(loc='upper left')
pylab.show()

xlist = [101,201,301,401,501,601,701,801,901,1001,1101]
ylist0 = [12895, 88773, 355207, 941469, 1723739, 2826436, 4729530, 7158169, 10305700, 18481958, 19670168]
ylist1 = [10895, 76252, 276693, 745310, 1455289, 2425114, 4061011, 6115835, 9104926, 12541613, 16948418]
ylist2 = [5291, 38851, 141883, 375837, 737896, 1219300, 2078286, 3193703, 5188406, 6985188, 9127234]
ylist4 = [2935, 21492, 75688, 203915, 397945, 678340, 1193131, 1810090, 3340251, 4033563, 4864832]
ylist8 = [3098, 9182, 73789, 182945, 377940, 621124, 1046305, 1531166, 2764730, 4119706, 4307709]
ylist16 = [2708, 12188, 77065, 182195, 362906, 616236, 993826, 1465544, 2636201, 3845861, 4421990]
ylist32 = [1658, 10483, 50258, 124023, 295353, 515662, 1066032, 1318874, 2509345, 3663046, 4195387]

pylab.xlabel('Размерность матрицы, символы')
pylab.ylabel('Время, микросекунды')
pylab.plot(xlist, ylist0, 'ro-', label = 'Нераспараллеленное')
pylab.plot(xlist, ylist1, 'g^-', label = '1 поток')
pylab.plot(xlist, ylist2, 'bs-', label = '2 потока')
pylab.plot(xlist, ylist4, 'b-.', label = '4 потока')
pylab.plot(xlist, ylist8, 'g:', label = '8 потоков')
pylab.plot(xlist, ylist16, 'y-', label = '16 потоков')
pylab.plot(xlist, ylist32, 'r--', label = '32 потока')
pylab.legend(loc='upper left')
pylab.show()
