# 位移轴指数。如何将它们移回去？

##### 问题描述投票：0回答：0

[使用 MWE 代码更新。]

``plt.show()``

``plt.show()``

``plt.savefig``
）。

``````matplotlib — 3.7.0
python     — 3.10.9
numpy      — 1.24.2
``````

``````# Import statements

import numpy as np
import matplotlib.pyplot as plt

#  Load the data from file

t, x, y, z = rawdata[:, 0],  rawdata[:, 1], rawdata[:, 2], rawdata[:, 3]

# Create the figure, axes, and plot

fig = plt.figure()
ax1 = fig.add_subplot(1, 1, 1, projection="3d")
# also doesn’t work: ax1 = fig.add_subplot(projection="3d")

traj, = ax1.plot3D(x, y, z,)
# also doesn’t work: traj, = ax1.plot(x, y, z,)

# Show plot

plt.show()

``````

``````1122009840.0    -48024.55642854782  -1074283.2518446227 -2957002.498288834  -493.87486260547803 1592.593075547164   -578.5977602861286
1122009850.0    -52962.51675637561  -1058340.3559710935 -2962741.5162975215 -493.7145926446957  1595.97762488453    -569.2029174306579
1122009860.0    -57898.79608710603  -1042363.868994681  -2968386.4986451087 -493.5386644229466  1599.3112800269291  -559.7906769165551
1122009870.0    -62833.23787599742  -1026354.3003377155 -2973937.2728212336 -493.3470855897769  1602.5939451510817  -550.3613320588779
1122009880.0    -67765.68565708105  -1010312.1603731712 -2979393.669250775  -493.1398642501385  1605.8255259518153  -540.9151765892451
1122009890.0    -72695.9830477127   -994237.9604094768  -2984755.521297978  -492.91700896390864 1609.0059296436052  -531.4525046479761
1122009900.0    -77623.97375311954  -978132.2126753118  -2990022.6652705    -492.67852874540085 1612.1350649620858  -521.9736107762334
1122009910.0    -82549.50157094198  -961995.4303043876  -2995194.940423384  -492.42443306286776 1615.212842165528   -512.4787899081681
1122009920.0    -87472.41039577057  -945828.1273202132  -3000272.188962945  -492.1547318379962  1618.2391730362876  -502.9683373630679
1122009930.0    -92392.54422367772  -929630.8186208482  -3005254.2560505844 -491.869435445394   1621.2139708822224  -493.4425488375083

``````

python matplotlib