質問編集履歴

5

2018/05/11 04:26

投稿

birem
birem

スコア13

test CHANGED
File without changes
test CHANGED
@@ -28,9 +28,9 @@
28
28
 
29
29
  plt.ion()
30
30
 
31
- pygame.init()
31
+ pygame.init()
32
32
 
33
- sreen = pygame.display.set_mode((200,200))
33
+ sreen = pygame.display.set_mode((200,200))
34
34
 
35
35
 
36
36
 
@@ -42,7 +42,7 @@
42
42
 
43
43
  line = b.readline().rstrip()
44
44
 
45
-     line = b.spit(",")
45
+   line = b.spit(",")
46
46
 
47
47
  x.pop(999)
48
48
 
@@ -54,15 +54,15 @@
54
54
 
55
55
  plt.legend();plt.grid()
56
56
 
57
-     plt.xlim([1,1000]);plt.ylim([0,500])
57
+   plt.xlim([1,1000]);plt.ylim([0,500])
58
58
 
59
-     plt.draw(); plt.clf()
59
+   plt.draw(); plt.clf()
60
60
 
61
-     screen.fill((0,0,0))
61
+   screen.fill((0,0,0))
62
62
 
63
-     screen.blit(text, (10,10))
63
+   screen.blit(text, (10,10))
64
64
 
65
-     pygame.display.flip()
65
+   pygame.display.flip()
66
66
 
67
67
 
68
68
 

4

修正しました

2018/05/11 04:26

投稿

birem
birem

スコア13

test CHANGED
File without changes
test CHANGED
@@ -42,7 +42,7 @@
42
42
 
43
43
  line = b.readline().rstrip()
44
44
 
45
- line = b.spit(",")
45
+     line = b.spit(",")
46
46
 
47
47
  x.pop(999)
48
48
 

3

表記に関する修正

2018/05/10 12:46

投稿

birem
birem

スコア13

test CHANGED
File without changes
test CHANGED
@@ -54,15 +54,15 @@
54
54
 
55
55
  plt.legend();plt.grid()
56
56
 
57
- plt.xlim([1,1000]);plt.ylim([0,500])
57
+     plt.xlim([1,1000]);plt.ylim([0,500])
58
58
 
59
- plt.draw(); plt.clf()
59
+     plt.draw(); plt.clf()
60
60
 
61
- screen.fill((0,0,0))
61
+     screen.fill((0,0,0))
62
62
 
63
- screen.blit(text, (10,10))
63
+     screen.blit(text, (10,10))
64
64
 
65
- pygame.display.flip()
65
+     pygame.display.flip()
66
66
 
67
67
 
68
68
 
@@ -70,15 +70,15 @@
70
70
 
71
71
 
72
72
 
73
- if evet.type == QUIT:
73
+   if evet.type == QUIT:
74
74
 
75
- pygame.quit()
75
+     pygame.quit()
76
76
 
77
- spi.close()
77
+     spi.close()
78
78
 
79
- plt.close()
79
+     plt.close()
80
80
 
81
- sys.exit()
81
+     sys.exit()
82
82
 
83
83
 
84
84
 

2

表記に関する修正

2018/05/10 11:00

投稿

birem
birem

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,5 @@
1
+ ```ここに言語を入力
2
+
1
3
  import numpy as np
2
4
 
3
5
  import matplotlib.pyplot as plt
@@ -84,6 +86,12 @@
84
86
 
85
87
  main()
86
88
 
89
+ ``````ここに言語を入力
90
+
91
+ コード
92
+
93
+ ```
94
+
87
95
 
88
96
 
89
97
  エラー内容

1

プログラムに記入ミスがありました。大変申し訳ございません。

2018/05/10 10:58

投稿

birem
birem

スコア13

test CHANGED
File without changes
test CHANGED
@@ -38,13 +38,15 @@
38
38
 
39
39
  b = (data[0] * 256 + data[1]) & 0x3ff
40
40
 
41
+ line = b.readline().rstrip()
42
+
41
- line = b.spit(",")
43
+ line = b.spit(",")
42
44
 
43
45
  x.pop(999)
44
46
 
45
47
  x.insert(0,float(x))
46
48
 
47
- line, = plt.plot(t,x,"-r")
49
+ line, = plt.plot(t,x,"-r")
48
50
 
49
51
  line.set_ydata(x)
50
52