Python 在三维中反转y轴的matplotlib将丢失标签。需要解决这个已知的bug吗
matplotlib中有一个问题尚未解决 考虑这个代码片段。通过反转y轴,记号将消失,z轴上的填充也将更改Python 在三维中反转y轴的matplotlib将丢失标签。需要解决这个已知的bug吗,python,3d,matplotlib,Python,3d,Matplotlib,matplotlib中有一个问题尚未解决 考虑这个代码片段。通过反转y轴,记号将消失,z轴上的填充也将更改 import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.set_xlim3d(0,1) ax.set_ylim3d(0,1) ax.set_ylim3d(1,0) plt
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.set_xlim3d(0,1)
ax.set_ylim3d(0,1)
ax.set_ylim3d(1,0)
plt.show()
在这段时间里,有人有解决办法吗
谢谢 也许您可以将数据带到[0,1]范围(或[yourmin,yourmax],其中yourmin
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.set_xlim3d(0,1)
ax.set_ylim3d(0,1)
# setting ticks positions
ax.set_xticks(np.arange(0,1.1,0.2))
ax.set_yticks(np.arange(0,1.1,0.2))
# setting ticks labels
ax.set_xticklabels(np.arange(1, -.1,-.2,).round(1))
ax.set_yticklabels(np.arange(1, -.1,-.2,).round(1))
plt.show()