teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

コードの変更

2020/05/14 04:33

投稿

maku_cyan
maku_cyan

スコア2

title CHANGED
File without changes
body CHANGED
@@ -219,12 +219,12 @@
219
219
  import matplotlib.pyplot as plt
220
220
  import numpy as np
221
221
 
222
- x = np.linspace(0, 10, 10000) #わからない1
222
+ x = np.linspace(0, 10, 10000)
223
223
 
224
224
  plt.figure()
225
225
 
226
- plt.plot(x, np.sin(x)) #同じfigureの中に追加
226
+ plt.plot(x, np.sin(x))
227
- plt.plot(x, np.cos(x)) #同じfigureの中に追加
227
+ plt.plot(x, np.cos(x))
228
228
  plt.show()
229
229
 
230
230
  ```

3

実験の追加

2020/05/14 04:32

投稿

maku_cyan
maku_cyan

スコア2

title CHANGED
File without changes
body CHANGED
@@ -228,5 +228,9 @@
228
228
  plt.show()
229
229
 
230
230
  ```
231
- 簡単なグラフでれば、表示できます
231
+ 簡単なグラフを、別ファイルれば、グラフは表示できますが、
232
+ 該当のコードに、このコードを書いた場合、グラフは表示されません。
233
+ 何故、ファイルによって、plt.show()が表示できないのでしょうか。
234
+ (全て同じディレクトリ内で試しました。)
235
+
232
236
  パイソンに詳しい方、どうか教えていただけないでしょうか。

2

コードの変更

2020/05/14 04:31

投稿

maku_cyan
maku_cyan

スコア2

title CHANGED
File without changes
body CHANGED
@@ -166,8 +166,7 @@
166
166
  # ------------------------
167
167
  # Visualizetion
168
168
  print("--Visualizetion--")
169
- fig = plt.figure()
169
+ plt.figure()
170
- ax = plt.axes()
171
170
  plt.subplot(2, 1, 1)
172
171
  plt.plot(time, x, marker="o", label="x")
173
172
  plt.plot(time, y, marker="o", label="y")

1

ダウンロード元のリンクの追加

2020/05/14 04:26

投稿

maku_cyan
maku_cyan

スコア2

title CHANGED
File without changes
body CHANGED
@@ -7,6 +7,13 @@
7
7
  https://github.com/istellartech/OpenGoddard/blob/master/examples/10_Low_Thrust_Orbit_Transfer.py
8
8
  のオープンソースを自分のパソコンで試しているだけで、コード自体に問題はないと思っております。
9
9
 
10
+ このコードはOpenGoddardと呼ばれる、最適化問題に使われているコードだそうで、
11
+ https://github.com/istellartech/OpenGoddard
12
+ から、
13
+ $ pip install OpenGoddard
14
+
15
+ にて、ダウンロードをして使っています。
16
+
10
17
  ### 発生している問題・エラーメッセージ
11
18
 
12
19
  ```