質問編集履歴

7

2019/11/12 10:17

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -202,7 +202,7 @@
202
202
 
203
203
 
204
204
 
205
- File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py", line 39, in <module>
205
+ File "C:/Users/Administartor/Desktop/oosaka /python/表示成功(txt変更)ダブルデータ 改.py", line 39, in <module>
206
206
 
207
207
  plt.xlim(x1_list,z1_list[0], x2_list,z2_list[1])
208
208
 

6

2019/11/12 10:17

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -76,9 +76,9 @@
76
76
 
77
77
 
78
78
 
79
- f1=open(r'C:/Users/Administartor/Desktop/田村/python/wakka.txt')
79
+ f1=open(r'C:/Users/Administartor/Desktop/oosaka/python/wakka.txt')
80
-
80
+
81
- f2=open(r'C:\Users\Administartor\Desktop\田村\python\一部回転B.txt') # プロットしたいデータが入っているファイルをr(読み込み) t(テキスト)モードで読み込む
81
+ f2=open(r'C:\Users\Administartor\Desktop\oosaka \python\一部回転B.txt') # プロットしたいデータが入っているファイルをr(読み込み) t(テキスト)モードで読み込む
82
82
 
83
83
 
84
84
 
@@ -186,7 +186,7 @@
186
186
 
187
187
  File "<ipython-input-6-19e0c1cd85fa>", line 1, in <module>
188
188
 
189
- runfile('C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py', wdir='C:/Users/Administartor/Desktop/田村/python')
189
+ runfile('C:/Users/Administartor/Desktop/oosaka/python/表示成功(txt変更)ダブルデータ 改.py', wdir='C:/Users/Administartor/Desktop/oosaka/python')
190
190
 
191
191
 
192
192
 

5

追記

2019/11/12 10:16

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -12,11 +12,17 @@
12
12
 
13
13
  register_matplotlib_converters()
14
14
 
15
+ df = pd.DataFrame({"date":["2019-01-01", "2019-01-02", "2019-01-04"],
16
+
15
- df = pd.DataFrame({"start":[100, 110, 140], "end":[200, 210, 230]})
17
+ "start":[100, 110, 140], "end":[200, 210, 230]})
18
+
16
-
19
+ df["datetime"] = pd.to_datetime(df["date"], format='%Y-%m-%d')
20
+
17
-
21
+ print(df)
22
+
23
+
24
+
18
-
25
+ xs = list(df["datetime"])
19
-
20
26
 
21
27
 
22
28
 

4

初心者

2019/10/25 09:00

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -234,6 +234,6 @@
234
234
 
235
235
  ちなみにファイルは
236
236
 
237
- (x、z)の配列です。
237
+ (x、z)の二次元配列です。
238
238
 
239
239
  教えていただけると助かります。

3

追記

2019/10/24 05:51

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -102,6 +102,8 @@
102
102
 
103
103
  ### 描画する
104
104
 
105
+ df = pd.DataFrame({"data1":[x1_list,z1_list], "data2":[x2_list,z2_list]})
106
+
105
107
  plt.xlim(x1_list,z1_list[-1], x2_list,z2_list[-1])
106
108
 
107
109
  plt.scatter(x1_list,z1_list,x2_list,z2_list, df["data1"])
@@ -176,7 +178,7 @@
176
178
 
177
179
 
178
180
 
179
- File "<ipython-input-2-19e0c1cd85fa>", line 1, in <module>
181
+ File "<ipython-input-6-19e0c1cd85fa>", line 1, in <module>
180
182
 
181
183
  runfile('C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py', wdir='C:/Users/Administartor/Desktop/田村/python')
182
184
 
@@ -194,9 +196,9 @@
194
196
 
195
197
 
196
198
 
197
- File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py", line 38, in <module>
199
+ File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py", line 39, in <module>
198
-
200
+
199
- plt.xlim(x1_list,z1_list[-1], x2_list,z2_list[-1])
201
+ plt.xlim(x1_list,z1_list[0], x2_list,z2_list[1])
200
202
 
201
203
 
202
204
 
@@ -220,6 +222,12 @@
220
222
 
221
223
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
222
224
 
225
+
226
+
227
+
228
+
229
+
230
+
223
231
  ```
224
232
 
225
233
 

2

誤字

2019/10/24 05:03

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -176,9 +176,9 @@
176
176
 
177
177
 
178
178
 
179
- File "<ipython-input-1-b79bb18b9278>", line 1, in <module>
179
+ File "<ipython-input-2-19e0c1cd85fa>", line 1, in <module>
180
-
180
+
181
- runfile('C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改ざん.py', wdir='C:/Users/Administartor/Desktop/田村/python')
181
+ runfile('C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py', wdir='C:/Users/Administartor/Desktop/田村/python')
182
182
 
183
183
 
184
184
 
@@ -194,7 +194,7 @@
194
194
 
195
195
 
196
196
 
197
- File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改ざん.py", line 38, in <module>
197
+ File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改.py", line 38, in <module>
198
198
 
199
199
  plt.xlim(x1_list,z1_list[-1], x2_list,z2_list[-1])
200
200
 

1

追加

2019/10/24 04:29

投稿

11390
11390

score20

test CHANGED
File without changes
test CHANGED
@@ -172,7 +172,53 @@
172
172
 
173
173
  ```
174
174
 
175
+ Traceback (most recent call last):
176
+
177
+
178
+
179
+ File "<ipython-input-1-b79bb18b9278>", line 1, in <module>
180
+
181
+ runfile('C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改ざん.py', wdir='C:/Users/Administartor/Desktop/田村/python')
182
+
183
+
184
+
185
+ File "C:\Users\Administartor\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
186
+
187
+ execfile(filename, namespace)
188
+
189
+
190
+
191
+ File "C:\Users\Administartor\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
192
+
193
+ exec(compile(f.read(), filename, 'exec'), namespace)
194
+
195
+
196
+
197
+ File "C:/Users/Administartor/Desktop/田村/python/表示成功(txt変更)ダブルデータ 改ざん.py", line 38, in <module>
198
+
199
+ plt.xlim(x1_list,z1_list[-1], x2_list,z2_list[-1])
200
+
201
+
202
+
203
+ File "C:\Users\Administartor\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 1542, in xlim
204
+
205
+ ret = ax.set_xlim(*args, **kwargs)
206
+
207
+
208
+
209
+ File "C:\Users\Administartor\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 2962, in set_xlim
210
+
211
+ left, right = mtransforms.nonsingular(left, right, increasing=False)
212
+
213
+
214
+
215
+ File "C:\Users\Administartor\Anaconda3\lib\site-packages\matplotlib\transforms.py", line 2900, in nonsingular
216
+
217
+ if (not np.isfinite(vmin)) or (not np.isfinite(vmax)):
218
+
219
+
220
+
175
- The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
221
+ ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
176
222
 
177
223
  ```
178
224