{"id":350324,"date":"2023-07-16T03:00:32","date_gmt":"2023-07-16T03:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=350324"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=350324","title":{"rendered":"<span>Python: \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0431\u044b\u043b \u0412\u0423\u0417(\u043e\u0432\u0446\u043e\u043c) \u043d\u0430\u043c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u0443\u0440\u0441\u0435 \u043d\u0430 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u043e \u0424\u0438\u0437\u0438\u043a\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043e\u0442 \u0440\u0443\u043a\u0438 \u043d\u0430 \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u043e\u0432\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435. \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430 PC. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 LapTop(\u0435). \u041f\u0440\u0438\u0447\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u0430\u044f \u043a\u0443\u0447\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430 PC. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 Google Spreadsheets, MatLab, MathCAD, GNUOctave,  MS Excel. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 Python.<\/p>\n<p><strong>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b LiLog.csv.  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a:<\/p>\n<pre><code>  14,   0.833,  22.25, 22:43:09, 9\/7\/2023, 1517544445   15,   0.833,  22.25, 22:43:29, 9\/7\/2023, 1517544465   16,   0.000,  22.25, 22:43:49, 9\/7\/2023, 1517544485   17,   0.833,  22.25, 22:44:09, 9\/7\/2023, 1517544505<\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c 2D \u0433\u0440\u0430\u0444\u0438\u043a, \u0433\u0434\u0435 \u043f\u043e \u043e\u0441\u0438 \u0425 n-\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0430 \u043f\u043e \u043e\u0441\u0438 Y &#8212; k-\u0442\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p><strong>\u0427\u0442\u043e \u043d\u0430\u0434\u043e \u0438\u0437 \u0441\u043e\u0444\u0442\u0432\u0435\u0440\u0430?<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\"><strong>\u2116<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">Python.exe<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">matplotlib<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">csv<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 *.CSV \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">NotePad++.exe<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f Python \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u043e\u0442 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u0440\u0435\u0442 *.csv \u0444\u0430\u0439\u043b \u0438 \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e 4\u043c\u0443 \u0438 2\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443.<\/p>\n<pre><code class=\"python\">import matplotlib.pyplot as plt import csv  X = [] Y = []  with open('LiLog.csv', 'r') as datafile:     plotting = csv.reader(datafile, delimiter=';')          for ROWS in plotting:         X.append(float(ROWS[5]))         Y.append(float(ROWS[1]))  plt.plot(X, Y) plt.title('Line Graph using CSV') plt.xlabel('X') plt.ylabel('Y') plt.show()<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 2 \u0441\u043f\u0438\u0441\u043a\u0430: X Y. \u0412 \u0441\u043f\u0438\u0441\u043e\u043a X \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 4\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a Y \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043d\u0430 \u043a\u0430\u043d\u0432\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/184\/092\/1e4\/1840921e4391e1897ae2806f7c009647.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" width=\"1303\" height=\"480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/184\/092\/1e4\/1840921e4391e1897ae2806f7c009647.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f (\u043b\u0435\u0433\u0435\u043d\u0434\u0443).<\/p>\n<pre><code class=\"python\">import matplotlib.pyplot as plt import csv  X = [] Y = []  with open('LiLog.csv', 'r') as datafile:     plotting = csv.reader(datafile, delimiter=';')          for ROWS in plotting:         X.append(float(ROWS[5]))         #X.append('{} {}'.format(ROWS[3], ROWS[4]))         Y.append(float(ROWS[1]))  print ('X {} Nums'.format(len(X))) print ('Y {} Nums'.format(len(Y)))  threshold=63.0 T=[threshold]*len(Y)  print ('Type X {} '.format(type(X))) print ('Type Y {} '.format(type(Y))) print ('Type T {} '.format(type(T)))  plt.plot(X, Y) plt.plot(X, T) plt.title('Illumination change') plt.xlabel('Time,[s]') plt.ylabel('Light level, [Lx]') plt.grid() plt.xticks(rotation=-90) plt.legend(['illumination', 'threshold {} Lx'.format(threshold)]) plt.show()<\/code><\/pre>\n<p>\u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u044f\u043c\u0430\u044f \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 63 \u041b\u044e\u043a\u0441.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21d\/3a1\/306\/21d3a13060d730676a144059d8eba04a.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\" width=\"856\" height=\"480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21d\/3a1\/306\/21d3a13060d730676a144059d8eba04a.png\"\/><\/p>\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0432 matplotlib \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0438  \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u043e\u043a\u043d\u0430. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/28c\/7a6\/ef0\/28c7a6ef04c7cb6ab43d8a0c387d066e.png\" alt=\"\u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0430 1:24:41\" title=\"\u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0430 1:24:41\" width=\"1170\" height=\"560\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28c\/7a6\/ef0\/28c7a6ef04c7cb6ab43d8a0c387d066e.png\"\/><\/p>\n<div><figcaption>\u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0430 1:24:41<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u043d\u0430 Python<\/strong><\/p>\n<p>1&#8212;\u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 MatLab, MathCAD \u0432 Python \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<p>2&#8212;\u0415\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430. \u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 *.png \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431, \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u043f\u043e\u043b\u0435\u0439, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0448\u043a\u0430\u043b\u0443, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u043a\u0443.<\/p>\n<p>3&#8212;\u041f\u043e Python \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c *.exe \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u044b\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p>4&#8212;\u041d\u0435\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 *.o *.ld \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u043e\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c \u043d\u0430 \u0421++. \u0415\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e *.py \u0444\u0430\u0439\u043b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>5&#8212;\u0412\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e \u043a\u043e\u0434\u043e\u043c. \u0412\u0430\u043c \u0434\u0430\u0436\u0435 \u043c\u044b\u0448\u043a\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<p>6&#8212;\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Python \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: Windows, Linux \u0438 \u043f\u0440\u043e\u0447.<\/p>\n<p><strong>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432 Python<\/strong><\/p>\n<p>1&#8212;\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u044f\u0441\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0435\u0442\u044b \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441 \u0443\u043b\u0438\u0446\u044b \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e COM \u043f\u043e\u0442\u0430 \u0438\u043b\u0438 TCP \u0441\u043e\u043a\u0435\u0442\u0430.<\/p>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong><\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Matplotlib  \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e *.csv \u0444\u0430\u0439\u043b\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\"><strong>\u0410\u043a\u0440\u043e\u043d\u0438\u043c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\">CSV <\/p>\n<\/td>\n<td>\n<p align=\"left\">Comma-Separated Values  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\">PC<\/p>\n<\/td>\n<td>\n<p align=\"left\">personal computer<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>Links<\/strong><\/p>\n<p><a href=\"https:\/\/translated.turbopages.org\/proxy_u\/en-ru.ru.769a89e5-64b314a2-b8a40da2-74722d776562\/https\/www.geeksforgeeks.org\/how-to-plot-data-from-a-text-file-using-matplotlib\/\" rel=\"noopener noreferrer nofollow\">https:\/\/translated.turbopages.org\/proxy_u\/en-ru.ru.769a89e5-64b314a2-b8a40da2-74722d776562\/https\/www.geeksforgeeks.org\/how-to-plot-data-from-a-text-file-using-matplotlib\/<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll-container\">\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/748282\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0412\u044b \u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430 Python?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             25%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0434\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             1           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:25%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             75%           <\/span> <span class=\"tm-article-poll__answer-label\">\u043d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             3           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:75%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.           \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.      <\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/748282\/\"> https:\/\/habr.com\/ru\/articles\/748282\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0431\u044b\u043b \u0412\u0423\u0417(\u043e\u0432\u0446\u043e\u043c) \u043d\u0430\u043c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043a\u0443\u0440\u0441\u0435 \u043d\u0430 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u043e \u0424\u0438\u0437\u0438\u043a\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043e\u0442 \u0440\u0443\u043a\u0438 \u043d\u0430 \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u043e\u0432\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435. \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043d\u0430\u0432\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430 PC. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 LapTop(\u0435). \u041f\u0440\u0438\u0447\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u0430\u044f \u043a\u0443\u0447\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u043d\u0430 PC. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 Google Spreadsheets, MatLab, MathCAD, GNUOctave,  MS Excel. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 Python.<\/p>\n<p><strong>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438:<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u0444\u0430\u0439\u043b LiLog.csv.  \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a:<\/p>\n<pre><code>  14,   0.833,  22.25, 22:43:09, 9\/7\/2023, 1517544445   15,   0.833,  22.25, 22:43:29, 9\/7\/2023, 1517544465   16,   0.000,  22.25, 22:43:49, 9\/7\/2023, 1517544485   17,   0.833,  22.25, 22:44:09, 9\/7\/2023, 1517544505<\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c 2D \u0433\u0440\u0430\u0444\u0438\u043a, \u0433\u0434\u0435 \u043f\u043e \u043e\u0441\u0438 \u0425 n-\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0430 \u043f\u043e \u043e\u0441\u0438 Y &#8212; k-\u0442\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p><strong>\u0427\u0442\u043e \u043d\u0430\u0434\u043e \u0438\u0437 \u0441\u043e\u0444\u0442\u0432\u0435\u0440\u0430?<\/strong><\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\"><strong>\u2116<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\"><strong>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">Python.exe<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Python<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">matplotlib<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">csv<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 *.CSV \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"146\" width=\"146\">\n<p align=\"left\">NotePad++.exe<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f Python \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u043e\u0442 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0435\u0440\u0435\u0442 *.csv \u0444\u0430\u0439\u043b \u0438 \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e 4\u043c\u0443 \u0438 2\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443.<\/p>\n<pre><code class=\"python\">import matplotlib.pyplot as plt import csv  X = [] Y = []  with open('LiLog.csv', 'r') as datafile:     plotting = csv.reader(datafile, delimiter=';')          for ROWS in plotting:         X.append(float(ROWS[5]))         Y.append(float(ROWS[1]))  plt.plot(X, Y) plt.title('Line Graph using CSV') plt.xlabel('X') plt.ylabel('Y') plt.show()<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 2 \u0441\u043f\u0438\u0441\u043a\u0430: X Y. \u0412 \u0441\u043f\u0438\u0441\u043e\u043a X \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 4\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a Y \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430. \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u043d\u0430 \u043a\u0430\u043d\u0432\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432 \u0433\u0440\u0430\u0444\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f (\u043b\u0435\u0433\u0435\u043d\u0434\u0443).<\/p>\n<pre><code class=\"python\">import matplotlib.pyplot as plt import csv  X = [] Y = []  with open('LiLog.csv', 'r') as datafile:     plotting = csv.reader(datafile, delimiter=';')          for ROWS in plotting:         X.append(float(ROWS[5]))         #X.append('{} {}'.format(ROWS[3], ROWS[4]))         Y.append(float(ROWS[1]))  print ('X {} Nums'.format(len(X))) print ('Y {} Nums'.format(len(Y)))  threshold=63.0 T=[threshold]*len(Y)  print ('Type X {} '.format(type(X))) print ('Type Y {} '.format(type(Y))) print ('Type T {} '.format(type(T)))  plt.plot(X, Y) plt.plot(X, T) plt.title('Illumination change') plt.xlabel('Time,[s]') plt.ylabel('Light level, [Lx]') plt.grid() plt.xticks(rotation=-90) plt.legend(['illumination', 'threshold {} Lx'.format(threshold)]) plt.show()<\/code><\/pre>\n<p>\u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u044f\u043c\u0430\u044f \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 63 \u041b\u044e\u043a\u0441.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u0432 matplotlib \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0438  \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u043c\u0435\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u043e\u043a\u043d\u0430. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0441\u0432\u0435\u0442\u0430 1:24:41<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u043d\u0430 Python<\/strong><\/p>\n<p>1&#8212;\u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 MatLab, MathCAD \u0432 Python \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e.<\/p>\n<p>2&#8212;\u0415\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430. \u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 *.png \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431, \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u0443 \u043f\u043e\u043b\u0435\u0439, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0448\u043a\u0430\u043b\u0443, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u043a\u0443.<\/p>\n<p>3&#8212;\u041f\u043e Python \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c *.exe \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u044b\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p>4&#8212;\u041d\u0435\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 *.o *.ld \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u043e\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c \u043d\u0430 \u0421++. \u0415\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e *.py \u0444\u0430\u0439\u043b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>5&#8212;\u0412\u0441\u0451 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e \u043a\u043e\u0434\u043e\u043c. \u0412\u0430\u043c \u0434\u0430\u0436\u0435 \u043c\u044b\u0448\u043a\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a.<\/p>\n<p>6&#8212;\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Python \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043b\u044e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: Windows, Linux \u0438 \u043f\u0440\u043e\u0447.<\/p>\n<p><strong>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0432 Python<\/strong><\/p>\n<p>1&#8212;\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u044f\u0441\u043d\u043e \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0442\u0441\u0447\u0435\u0442\u044b \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441 \u0443\u043b\u0438\u0446\u044b \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e COM \u043f\u043e\u0442\u0430 \u0438\u043b\u0438 TCP \u0441\u043e\u043a\u0435\u0442\u0430.<\/p>\n<p><strong>\u0412\u044b\u0432\u043e\u0434<\/strong><\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 Python \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Matplotlib  \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e *.csv \u0444\u0430\u0439\u043b\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\"><strong>\u0410\u043a\u0440\u043e\u043d\u0438\u043c<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\">CSV <\/p>\n<\/td>\n<td>\n<p align=\"left\">Comma-Separated Values  <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"107\" width=\"107\">\n<p align=\"left\">PC<\/p>\n<\/td>\n<td>\n<p align=\"left\">personal computer<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>Links<\/strong><\/p>\n<p><a href=\"https:\/\/translated.turbopages.org\/proxy_u\/en-ru.ru.769a89e5-64b314a2-b8a40da2-74722d776562\/https\/www.geeksforgeeks.org\/how-to-plot-data-from-a-text-file-using-matplotlib\/\" rel=\"noopener noreferrer nofollow\">https:\/\/translated.turbopages.org\/proxy_u\/en-ru.ru.769a89e5-64b314a2-b8a40da2-74722d776562\/https\/www.geeksforgeeks.org\/how-to-plot-data-from-a-text-file-using-matplotlib\/<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll-container\">\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/748282\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u0412\u044b \u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430 Python?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             25%           <\/span> <span class=\"tm-article-poll__answer-label\">\u0434\u0430<\/span> <span class=\"tm-article-poll__answer-votes\">             1           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:25%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             75%           <\/span> <span class=\"tm-article-poll__answer-label\">\u043d\u0435\u0442<\/span> <span class=\"tm-article-poll__answer-votes\">             3           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:75%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 4 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.           \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.      <\/div>\n<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/748282\/\"> https:\/\/habr.com\/ru\/articles\/748282\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-350324","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=350324"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350324\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}