先上效果图

代码:
import matplotlib.pyplot as plt
import seaborn as sns
from matplotlib.ticker import MultipleLocator
class Histplot:
def __init__(self, y_data, x_data, linetype='ro-', legends=None,title=None, xlabel=None,
ylabels=None, fsize=(20, 15), df_line=1):
"""
:param x_data: 数据x列表
:param x_data: x的分组数
:param linetype: 累计频率曲线的样式,默认为红色实心点
:param legends: 图例名,默认为 "线性拟合结果", "实测值"
:param xlabel:x坐标轴标题名,默认为 "数据x"
:param ylabels:双y坐标轴标题名,默认为 "计数", "累计频率"
:param df_line:是否显示累计频率曲线
"""
if legends is None:
legends = ["频率", "累计频率"]
if xlabel is None:
xlabel = "延时"
if ylabels is None:
ylabels = ["频率", "累计频率"]
self.y_data = y_data
self.x_data = x_data
self.linetype = linetype


1万+

被折叠的 条评论
为什么被折叠?



