gpt4 book ai didi

python - 如何创建阿拉伯图表? (x 轴从右到左)与 Plotly

转载 作者:行者123 更新时间:2023-12-05 06:33:19 25 4
gpt4 key购买 nike

我想开始在 x 轴上从右到左绘图(对于阿拉伯图表)。所以我需要右下角的 (x, y) = (0, 0) 。有没有可能在 python 上用 plotly 来做?以及如何?

最佳答案

使用递减的 x 轴参数。

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()

关于python - 如何创建阿拉伯图表? (x 轴从右到左)与 Plotly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50826357/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com