【发布时间】:2023-03-22 08:02:01
【问题描述】:
我想使用 Bokeh 创建一个威布尔概率图。 根据参考资料(如下链接),
https://www.itl.nist.gov/div898/handbook/eda/section3/weibplot.htm
威布尔概率图的 y 轴有一个带有刻度的轴:ln(-ln(1-p))。 假设我定义了一个函数(它是反函数),
import numpy as np
def forward(X):
return np.log(-np.log(1 - X))
def inverse(Y):
return 1 - np.exp(-np.exp(Y))
使用 matplotlib.pyplot(来自 https://matplotlib.org/stable/gallery/scales/scales.html),我可以使用这些函数在 pyplot 上设置 y 轴的比例,
import matplotlib.pyplot as plt
fig, ax = .........
ax.set_yscale('function', functions=(forward, inverse))
如何在 Bokeh 上实现这一点(使用函数设置 y 轴比例)?
【问题讨论】:
标签: python python-3.x matplotlib data-visualization bokeh