How to set logarithmic x-axis in 3d plot?

Hello everyone,
I want to creat some 2d netron energy spectrum graphs in different planes. So I follow the example to write the following code:

fig = plt.figure(figsize=(10,10))
ax = fig.add_subplot(projection='3d')
for i in np.arange(len(optmized_spc_absolutely[0])):
    ax.plot(x,optmized_spc_absolutely[0][i],i,zdir='y')
#ax.set_xscale('log')
ax.set_xlabel('Energy [eV]')
ax.set_ylabel('zone')
ax.set_zlabel('flux')


But I want to set x-axis to log, graph become strange

Can someone tell me how to set up so that the make the logarithmic X-axis displayed correctly?

I’m not too sure that this is possible; I think the work in ENH: 3D Transforms by AnsonTran · Pull Request #28098 · matplotlib/matplotlib · GitHub will make it so though.

In the meantime, the workaround would be to apply the log transform yourself first, and then modify the ticks to match.

Thank you very much! I set the np.log(x) as x axis and graphs looks great.