import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(2,2,1)
ax.plot(np.random.rand(100))
ticks = ax.set_xticks([0,25,50,75])
labels = ax.set_xticklabels([‘one’,’two’,’three’,’four’])
ax.set_xlabel(‘Stage’)
plt.show()import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(2,2,1)
ax.plot(np.random.rand(10),’k-‘,label=’two’)
ticks = ax.set_xticks([0,25,50,75])
labels = ax.set_xticklabels([‘one’,’two’,’three’,’four’])
ax.set_xlabel(‘Stage’)
ax.legend(loc = ‘best’)
plt.show()
python matplot画图
最新推荐文章于 2024-01-17 00:20:52 发布