Skip to content

Instantly share code, notes, and snippets.

@2357gi
Created January 20, 2019 04:27
Show Gist options
  • Save 2357gi/913118502a8d1f9c97326c129d858502 to your computer and use it in GitHub Desktop.
Save 2357gi/913118502a8d1f9c97326c129d858502 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
import os, re
speed = 0.001
conts = []
x = []
for i in range(18): # ファイル 0.001 ~ 0.01
x = x.append(i)
dir = 'stop-data' + str(speed) + '/'
num_lines = 0
for j in range(1, 10357):
num_lines += sum(1 for line in open(dir + str(j) + '-stopped.txt'))
conts = conts.append(num_lines)
y = conts
plt.plot(x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment