閲覧ありがとうございます。
以下URLのコードを用いて渦の再現を試みています。
リンク先:GitHub 参考にしたコード
前提・実現したいこと
発生している問題・エラーメッセージ
参考URLにおけるIn[21]
In [21]: plt.quiver(X,Y,X_new,Y_new,XY,pivot='mid',cmap=plt.cm.bwr, clim=[-3.15,3.15]) plt.axis('equal') plt.axis('off') cbar = plt.colorbar(ticks=[-3.14, 0, 3.14]) cbar.ax.set_yticklabels([r"\pi", r"0", r"-\pi"])
を打ちこみ、runすると
FileNotFoundError Traceback (most recent call last)
というエラーが出ました。In[21]までは正常に進んでいます。
#エラー追記
[Text(1,0,'\pi'), Text(1,0,'0'), Text(1,0,'-\pi')] Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x0000021DB4D6F950> (for post_execute): --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\matplotlib\pyplot.py in post_execute() 148 def post_execute(): 149 if matplotlib.is_interactive(): --> 150 draw_all() 151 152 # IPython >= 2 ~\Anaconda3\lib\site-packages\matplotlib\_pylab_helpers.py in draw_all(cls, force) 148 for f_mgr in cls.get_all_fig_managers(): 149 if force or f_mgr.canvas.figure.stale: --> 150 f_mgr.canvas.draw_idle() 151 152 atexit.register(Gcf.destroy_all) ~\Anaconda3\lib\site-packages\matplotlib\backend_bases.py in draw_idle(self, *args, **kwargs) 2059 if not self._is_idle_drawing: 2060 with self._idle_draw_cntx(): -> 2061 self.draw(*args, **kwargs) 2062 2063 def draw_cursor(self, event): ~\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py in draw(self) 428 # if toolbar: 429 # toolbar.set_cursor(cursors.WAIT) --> 430 self.figure.draw(self.renderer) 431 finally: 432 # if toolbar: ~\Anaconda3\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 53 renderer.start_filter() 54 ---> 55 return draw(artist, renderer, *args, **kwargs) 56 finally: 57 if artist.get_agg_filter() is not None: ~\Anaconda3\lib\site-packages\matplotlib\figure.py in draw(self, renderer) 1297 1298 mimage._draw_list_compositing_images( -> 1299 renderer, self, artists, self.suppressComposite) 1300 1301 renderer.close_group('figure')
.
.
.
~\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors) 707 c2pread, c2pwrite, 708 errread, errwrite, --> 709 restore_signals, start_new_session) 710 except: 711 # Cleanup if the child failed starting. ~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session) 995 env, 996 os.fspath(cwd) if cwd is not None else None, --> 997 startupinfo) 998 finally: 999 # Child is launched. Close the parent's copy of those pipe FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。 <matplotlib.figure.Figure at 0x21db4ed06d8>
#エラー追記2
Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x0000021DB4D6F950> (for post_execute): --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\matplotlib\pyplot.py in post_execute() 148 def post_execute(): 149 if matplotlib.is_interactive(): --> 150 draw_all() 151 152 # IPython >= 2 ~\Anaconda3\lib\site-packages\matplotlib\_pylab_helpers.py in draw_all(cls, force) 148 for f_mgr in cls.get_all_fig_managers(): 149 if force or f_mgr.canvas.figure.stale: --> 150 f_mgr.canvas.draw_idle() 151 152 atexit.register(Gcf.destroy_all)
・
・
・
~\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session) 995 env, 996 os.fspath(cwd) if cwd is not None else None, --> 997 startupinfo) 998 finally: 999 # Child is launched. Close the parent's copy of those pipe FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。 <matplotlib.figure.Figure at 0x21db56dd400>
試したこと
参考URLにおけるほかのコードによる計算で「output.data」という計算結果を羅列したファイルが保存される仕組みになっていました。このファイルを使うのか、使うとすればこれをどこにしまっておけば正常に進むかどうかはわかりません。
本当に困っています。よろしくお願い致します。
あなたの回答
tips
プレビュー