![](https://img-blog.csdnimg.cn/20190918140145169.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python数据可视化
文章平均质量分 75
Python matplotlib,pyecharts
Eloik
人工智能、大数据
展开
-
plotly 添加水平、竖直线和填充区域
添加水平、竖直线和填充区域import plotly.io as pioimport plotly.express as pximport plotly.graph_objects as goimport plotlyfrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置p原创 2022-02-26 19:56:41 · 5697 阅读 · 2 评论 -
plotly 多坐标轴(multiple axes)设置
多坐标轴设置(multiple axes)import plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打原创 2022-02-26 13:18:47 · 3864 阅读 · 0 评论 -
plotly 图例(legend)设置
图例(legend)import plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打印时显示所有列pd.原创 2022-02-13 18:58:41 · 7286 阅读 · 0 评论 -
plotly 坐标轴(axes)设置
坐标轴设置 axesimport plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打印时显示所有列pd.原创 2022-02-13 18:56:02 · 21667 阅读 · 2 评论 -
plotly 添加标注(annotation)
添加标注 annotationimport plotly.io as pioimport plotly.express as pximport plotly.graph_objects as goimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打印时显示所有列pd.set_option('display.max_columns', Non原创 2022-02-13 18:49:15 · 5692 阅读 · 1 评论 -
plotly 散点图、柱状图添加文本标记(text)
散点图、柱状图添加文本标记import plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打印时显示所有列原创 2022-02-13 18:44:00 · 5895 阅读 · 0 评论 -
plotly 绘制子图(subplots)
划分子图 subplotsimport plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pandas打印时显示所有列原创 2022-02-13 18:41:33 · 8699 阅读 · 1 评论 -
plotly 改变标记(marker)和直线(line)的风格
标记(markers)和直线(lines)的风格import plotly.io as pioimport plotly.express as pximport plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport pandas as pdimport numpy as np# 设置plotly默认主题pio.templates.default = 'plotly_white'# 设置pand原创 2022-02-13 18:35:40 · 6662 阅读 · 0 评论 -
plotly 绘制局部放大图
最终效果展示实现思路在绘图区域插入一个嵌入图,嵌入图与原图的绘画保持一致,通过限制嵌入图的x轴和y轴的显示范围,达到缩放的效果,并在原图上绘画一个矩形框,以凸显缩放的区域,最后通过两条直线凸显缩放关系。导入库import plotly.io as pioimport plotly.graph_objects as goimport pandas as pdimport numpy as np# 设置plotly默认主题,白色主题pio.templates.default = 'plot原创 2022-02-12 12:04:46 · 2691 阅读 · 0 评论 -
Python 绘制局部放大图
请务必先看此文章: 【Python】Matplotlib局部放大图画法这篇文章已经非常详细,但是没有数据,所以自己生成了一些数据,以及对部分代码进行了函数封装,以便于二次使用。import matplotlib.pyplot as pltfrom matplotlib.patches import ConnectionPatchimport numpy as npdef zone_and_linked(ax,axins,zone_left,zone_right,x,y,linked='bott原创 2021-01-31 22:44:29 · 16679 阅读 · 14 评论