python - python中的3D绘图,x-ticks和标签之间的空间
问题描述
考虑下图。如何创建x 轴编号和标签之间的距离?
该图是按照这些步骤创建的。
代码的结构或多或少是这样的:
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d;
ax = plt.axes(projection='3d')
ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
cmap='viridis')
ax.set_title('surface');
解决方案
You can specify a value of your choice to the labelpad
argument as following. The same can be done for y and z axis labels as well.
ax.set_xlabel('xxxxxxxxx', labelpad=10)
推荐阅读
- android - 当我将 ItemTouchHelper 附加到主 Recycler 时,试图让我的嵌套 recyclerView 可滚动
- javascript - Vuejs 使用 v-model 指令输入输入会以某种方式删除 CSS 类
- python - 在 tkinter 中,当我运行搜索并将结果显示为新标签时,如何从一个函数中删除标签?
- mysql - MySQL - 从其他表插入行时,操作数应包含 1 列
- linux - 将数据包转发到窗口
- haskell - `arr fst` 是如何自然转换的?
- java - 我正在尝试在 java 中制作电话验证程序,为什么会出现“else without if”错误?
- java - 如何使用 Java Apache HttpClient 正确发出 POST 请求?
- ios - 在 Master App 中组合的两个模块之间传递数据
- angular - TypeError:无法读取空 p-treetable 角度的属性“parentElement”