私はこのコードを持っています:
ax = fig.add_axes([0.1, 0.1, 0.55, 0.8])
args.avg_window
ax の x 軸に の下限を設定したいと思います。xlim、set_xlim、set_xbound を使用してみましxrange=(args.avg_window, args.posts_limit)
たが、その関数呼び出しに追加しましたが、何も機能していないようです:
と
ax = fig.add_axes([0.1, 0.1, 0.55, 0.8], xrange=(args.avg_window, args.posts_limit))
次のエラーが表示されます。
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/d3admin6/python_phpBB_scraper/analysis/liwc/plot_forum_emos.py", line 334, in <module>
.format(args.xattr, args.yattr, window_str))
File "/Users/d3admin6/python_phpBB_scraper/analysis/liwc/plot_forum_emos.py", line 247, in plot_emos_line
ax = fig.add_axes([0.1, 0.1, 0.55, 0.8], xrange=(args.avg_window, args.posts_limit))
File "/Library/Python/2.7/site-packages/matplotlib/figure.py", line 806, in add_axes
a = projection_class(self, rect, **kwargs)
File "/Library/Python/2.7/site-packages/matplotlib/axes.py", line 499, in __init__
martist.setp(self, **kwargs)
File "/Library/Python/2.7/site-packages/matplotlib/artist.py", line 1229, in setp
func = getattr(o, funcName)
AttributeError: 'Axes' object has no attribute 'set_xrange'
と
ax.set_xlim(left = args.avg_window)
次のエラーが表示されます。
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/d3admin6/python_phpBB_scraper/analysis/liwc/plot_forum_emos.py", line 335, in <module>
.format(args.xattr, args.yattr, window_str))
File "/Users/d3admin6/python_phpBB_scraper/analysis/liwc/plot_forum_emos.py", line 256, in plot_emos_line
ax.set_xbound(lower=args.avg_window)
File "/Library/Python/2.7/site-packages/matplotlib/axes.py", line 2477, in set_xbound
self.set_xlim(upper, lower, auto=None)
File "/Library/Python/2.7/site-packages/matplotlib/axes.py", line 2553, in set_xlim
left, right = mtransforms.nonsingular(left, right, increasing=False)
File "/Library/Python/2.7/site-packages/matplotlib/transforms.py", line 2567, in nonsingular
if (not np.isfinite(vmin)) or (not np.isfinite(vmax)):
NotImplementedError: Not implemented for this type
軸の境界を設定するにはどうすればよいですか?