import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0.01, 5.0, 0.01)
s = np.exp(-t)
plt.plot(t, s)
plt.xlim(5, 0) # decreasing time
plt.xlabel('decreasing time (s)')
plt.ylabel('voltage (mV)')
plt.title('Should be growing...')
plt.grid(True)
plt.show()
使用递减的x轴参数。你知道吗
在Python中使用Plotly包:
假设我们有一个正规图(实际图,实际yaxis1 left,实际yaxis2 right,实际xaxis),我们需要将实际yaxis1 left放在右侧,将实际yaxis2 right放在左侧,并反转xaxis。 为此,我们使用以下代码:
我希望这会有帮助
相关问题 更多 >
编程相关推荐