8 matplotlib multiple-columns python-3.x axis-labels
如何ylabel将 matplotlib 图形的分割成行?我想保持ylabely 轴上的旋转。例如,到目前为止,这是我的子图,代码的相关部分如下:
plt.ylabel('Spacing of Zeroes of $J_{\\nu}(x)$', rotation=0)
Run Code Online (Sandbox Code Playgroud)
当我尝试这样做时:
plt.ylabel('Spacing of Zeroes of $J_{\\nu}(x)$', rotation=0, ncol=2)
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
AttributeError: Unknown property ncol
Run Code Online (Sandbox Code Playgroud)
我的建议是在字符串中引入换行符。
plt.ylabel('Spacing of\nZeroes of\n$J_{\\nu}(x)$', rotation=0, ha="right")
Run Code Online (Sandbox Code Playgroud)