ml

Python 图表

ml, matplotlib, 图表

Python 图表 # 主要用: matplotlib import matplotlib.pyplot as plt 堆叠图 # summery_one_offer_dict_by_install_date, install_datas_by_install_date_dict = await rc.calculate_offer_do_status(offer_id=offer_id) # 计算需要的行数和列数(每行4个图表) num_offers = len(summery_one_offer_dict_by_install_date.keys()) num_cols = 3 num_rows = math.ceil(num_offers / num_cols) # 创建一个图形和子图数组 fig, axs = plt.subplots(num_rows, num_cols, figsize=(45, num_rows * 3)) if num_offers == 1: axs = [axs] # Flatten the axs array for easy iteration else: axs = axs.flatten() for ax, (install_date, data) in zip(axs, summery_one_offer_dict_by_install_date.items()): # 排序和处理数据 data = data. ...

机器学习库

ml, python, 爬虫

Python 机器学习库 👽 # Plotly # 与matplotlib 都是绘图工具,不过效果炫一些,我也没画过,所以只放链接,不放实例了 Plotly Python Library : https://plot.ly/python/ matplotlib # import matplotlib.pyplot as plt 参数等太多,链接最可靠 # pyplot参数 还是粘一些常用的: marker 属性(下面写在分号里呦) o . v ^ < > 1 2 3 4 8 s p * h H + x D d | _ 之类 画出一些“花儿” 绘图 # plt.plot(x, y) # 在y之后可添加参数,例如常用的label = ‘IamLabel’之类 # 线的样式、颜色 :b: blue g: green r: red c: cyan m: magenta y: yellow k: black w: white '-' : solid , '--' : dashed, '-. ...