Python全系列 教程
3567个小节阅读:5929.9k
目录
鸿蒙应用开发
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
class pyecharts.charts.EffectScatter(RectChart)
xxxxxxxxxx
class EffectScatter(
# 初始化配置项,参考 `global_options.InitOpts`
init_opts: opts.InitOpts = opts.InitOpts()
)
func pyecharts.charts.EffectScatter.add_yaxis
xxxxxxxxxx
def add_yaxis(
# 系列名称,用于 tooltip 的显示,legend 的图例筛选。
series_name: str,
# 系列数据
y_axis: types.Sequence[types.Union[opts.BoxplotItem, dict]],
# 是否选中图例
is_selected: bool = True,
# 使用的 x 轴的 index,在单个图表实例中存在多个 x 轴的时候有用。
xaxis_index: Optional[Numeric] = None,
# 使用的 y 轴的 index,在单个图表实例中存在多个 y 轴的时候有用。
yaxis_index: Optional[Numeric] = None,
# 系列 label 颜色
color: Optional[str] = None,
# 标记图形形状
symbol: Optional[str] = None,
# 标记的大小
symbol_size: Numeric = 10,
# 标记的旋转角度。注意在 markLine 中当 symbol 为 'arrow' 时会忽略 symbolRotate 强制设置为切线的角度。
symbol_rotate: types.Optional[types.Numeric] = None,
# 标签配置项,参考 `series_options.LabelOpts`
label_opts: Union[opts.LabelOpts, dict] = opts.LabelOpts(),
# 涟漪特效配置项,参考 `series_options.EffectOpts`
effect_opts: Union[opts.EffectOpts, dict] = opts.EffectOpts(),
# 提示框组件配置项,参考 `series_options.TooltipOpts`
tooltip_opts: Union[opts.TooltipOpts, dict, None] = None,
# 图元样式配置项,参考 `series_options.ItemStyleOpts`
itemstyle_opts: Union[opts.ItemStyleOpts, dict, None] = None,
)
EffectScatterItem:涟漪特效散点图数据项
xxxxxxxxxx
class EffectScatterItem(
# 数据项名称。
name: Union[str, Numeric] = None,
# 数据项的值
value: Union[str, Numeric] = None,
# 单个数据标记的图形。
symbol: Optional[str] = None,
# 单个数据标记的大小
symbol_size: Union[Sequence[Numeric], Numeric] = None,
# 单个数据标记的旋转角度(而非弧度)。
symbol_rotate: Optional[Numeric] = None,
# 如果 symbol 是 path:// 的形式,是否在缩放时保持该图形的长宽比。
symbol_keep_aspect: bool = False,
# 单个数据标记相对于原本位置的偏移。
symbol_offset: Optional[Sequence] = None,
# 标签配置项,参考 `series_options.LabelOpts`
label_opts: Union[LabelOpts, dict, None] = None,
# 图元样式配置项,参考 `series_options.ItemStyleOpts`
itemstyle_opts: Union[ItemStyleOpts, dict, None] = None,
# 提示框组件配置项,参考 `series_options.TooltipOpts`
tooltip_opts: Union[TooltipOpts, dict, None] = None,
)
【示例】绘制涟漪散点图
xxxxxxxxxx
from pyecharts import options as opts
from pyecharts.charts import EffectScatter
from pyecharts.faker import Faker
esca=EffectScatter()
esca.add_xaxis(Faker.choose())
esca.add_yaxis("", Faker.values())
esca.set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
esca.render_notebook()
【示例】绘制涟漪散点图
xxxxxxxxxx
from pyecharts import options as opts
from pyecharts.charts import EffectScatter
from pyecharts.faker import Faker
from pyecharts.globals import SymbolType
esca=EffectScatter()
esca.add_xaxis(Faker.choose())
esca.add_yaxis("", Faker.values(), symbol=SymbolType.RECT)
esca.set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
esca.render_notebook()
实时效果反馈
1. pyecharts模块中绘制涟漪散点图,下划线处分别需要填写的代码是_____:
xxxxxxxxxx
from pyecharts import options as opts
from pyecharts.charts import EffectScatter
from pyecharts.faker import Faker
from pyecharts.globals import SymbolType
esca=__________
esca.add_xaxis(Faker.choose())
esca.add_yaxis("", Faker.values(), symbol=SymbolType.RECT)
esca.set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
esca.render_notebook()
A Scatter()
B EffectScatter()
C Effect()
答案
1=>B