- 积分
- 882
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-4-18
- 最后登录
- 1970-1-1
|
发表于 2020-5-16 14:56:49
|
显示全部楼层
请大伽老师指导,执行第3行代码出错,错误信息如下:
>>> fig = cinrad.visualize.PPI(r, dpi=75)
>>> fig.settings['path_customize'] = True
>>> fig('D:\\1.eps')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ryb\Anaconda3\lib\site-packages\cinrad-1.5.1-py3.7-win32.egg\cinrad\visualize\ppi.py", line 95, in __call__
return self._save(fpath)
File "C:\ryb\Anaconda3\lib\site-packages\cinrad-1.5.1-py3.7-win32.egg\cinrad\visualize\ppi.py", line 251, in _save
save(path_string)
File "C:\ryb\Anaconda3\lib\site-packages\cinrad-1.5.1-py3.7-win32.egg\cinrad\visualize\utils.py", line 226, in save
plt.savefig(fpath, pad_inches=0)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 729, in savefig
res = fig.savefig(*args, **kwargs)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\figure.py", line 2180, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 2091, in print_figure
**kwargs)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 530, in print_png
cbook.open_file_cm(filename_or_obj, "wb") as fh:
File "C:\ryb\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 447, in open_file_cm
fh, opened = to_filehandle(path_or_file, mode, True, encoding)
File "C:\ryb\Anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 432, in to_filehandle
fh = open(fname, flag, encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\1.eps\\.png' |
|