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畫圖
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.