altair.HConcatChart#

class altair.HConcatChart(hconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined, config=Undefined, data=Undefined, datasets=Undefined, description=Undefined, name=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds)#

包含水平串联分面的图表。

__init__(hconcat=Undefined, autosize=Undefined, background=Undefined, bounds=Undefined, center=Undefined, config=Undefined, data=Undefined, datasets=Undefined, description=Undefined, name=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, spacing=Undefined, title=Undefined, transform=Undefined, usermeta=Undefined, **kwds)#

请参考 TopLevelHConcatSpec TopLevelHConcatSpec 模式包装器。

参数:
hconcatSequence[dict, FacetSpec, LayerSpec, RepeatSpec, FacetedUnitSpec, LayerRepeatSpec, NonNormalizedSpec, NonLayerRepeatSpec, ConcatSpecGenericSpec, HConcatSpecGenericSpec, VConcatSpecGenericSpec]

要串联并放入一行的视图列表。

autosizedict, AutosizeType, AutoSizeParams, Literal[‘pad’, ‘none’, ‘fit’, ‘fit-x’, ‘fit-y’]

如何确定可视化尺寸。如果为字符串,应为 "pad"`、"fit"` 或 "none"` 之一。对象值还可以额外指定内容大小和自动调整大小的参数。

默认值: pad

backgroundstr, dict, Color, ExprRef, HexColor, ColorName, Literal[‘black’, ‘silver’, ‘gray’, ‘white’, ‘maroon’, ‘red’, ‘purple’, ‘fuchsia’, ‘green’, ‘lime’, ‘olive’, ‘yellow’, ‘navy’, ‘blue’, ‘teal’, ‘aqua’, ‘orange’, ‘aliceblue’, ‘antiquewhite’, ‘aquamarine’, ‘azure’, ‘beige’, ‘bisque’, ‘blanchedalmond’, ‘blueviolet’, ‘brown’, ‘burlywood’, ‘cadetblue’, ‘chartreuse’, ‘chocolate’, ‘coral’, ‘cornflowerblue’, ‘cornsilk’, ‘crimson’, ‘cyan’, ‘darkblue’, ‘darkcyan’, ‘darkgoldenrod’, ‘darkgray’, ‘darkgreen’, ‘darkgrey’, ‘darkkhaki’, ‘darkmagenta’, ‘darkolivegreen’, ‘darkorange’, ‘darkorchid’, ‘darkred’, ‘darksalmon’, ‘darkseagreen’, ‘darkslateblue’, ‘darkslategray’, ‘darkslategrey’, ‘darkturquoise’, ‘darkviolet’, ‘deeppink’, ‘deepskyblue’, ‘dimgray’, ‘dimgrey’, ‘dodgerblue’, ‘firebrick’, ‘floralwhite’, ‘forestgreen’, ‘gainsboro’, ‘ghostwhite’, ‘gold’, ‘goldenrod’, ‘greenyellow’, ‘grey’, ‘honeydew’, ‘hotpink’, ‘indianred’, ‘indigo’, ‘ivory’, ‘khaki’, ‘lavender’, ‘lavenderblush’, ‘lawngreen’, ‘lemonchiffon’, ‘lightblue’, ‘lightcoral’, ‘lightcyan’, ‘lightgoldenrodyellow’, ‘lightgray’, ‘lightgreen’, ‘lightgrey’, ‘lightpink’, ‘lightsalmon’, ‘lightseagreen’, ‘lightskyblue’, ‘lightslategray’, ‘lightslategrey’, ‘lightsteelblue’, ‘lightyellow’, ‘limegreen’, ‘linen’, ‘magenta’, ‘mediumaquamarine’, ‘mediumblue’, ‘mediumorchid’, ‘mediumpurple’, ‘mediumseagreen’, ‘mediumslateblue’, ‘mediumspringgreen’, ‘mediumturquoise’, ‘mediumvioletred’, ‘midnightblue’, ‘mintcream’, ‘mistyrose’, ‘moccasin’, ‘navajowhite’, ‘oldlace’, ‘olivedrab’, ‘orangered’, ‘orchid’, ‘palegoldenrod’, ‘palegreen’, ‘paleturquoise’, ‘palevioletred’, ‘papayawhip’, ‘peachpuff’, ‘peru’, ‘pink’, ‘plum’, ‘powderblue’, ‘rosybrown’, ‘royalblue’, ‘saddlebrown’, ‘salmon’, ‘sandybrown’, ‘seagreen’, ‘seashell’, ‘sienna’, ‘skyblue’, ‘slateblue’, ‘slategray’, ‘slategrey’, ‘snow’, ‘springgreen’, ‘steelblue’, ‘tan’, ‘thistle’, ‘tomato’, ‘turquoise’, ‘violet’, ‘wheat’, ‘whitesmoke’, ‘yellowgreen’, ‘rebeccapurple’]

用作整个视图背景的 CSS 颜色属性。

默认值: "white"

boundsLiteral[‘full’, ‘flush’]

用于确定子图范围的边界计算方法。可以是 full`(默认)或 flush`。

  • 如果设置为 full`,将使用整个计算出的边界(包括轴、标题和图例)。

  • 如果设置为 flush`,将仅使用子视图指定的宽度和高度值。flush` 设置在尝试将不带轴或图例的子图放置到统一网格结构中时可能很有用。

默认值: "full"

centerbool

布尔标志,指示子视图是否应相对于其各自的行或列居中。

默认值: false

configdict, Config

Vega-Lite 配置对象。此属性只能在规范的顶层定义。

datadict, Data, UrlData, Generator, NamedData, DataSource, InlineData, SphereGenerator, SequenceGenerator, GraticuleGenerator, None

描述数据源的对象。设置为 null` 可忽略父级的数据源。如果未设置数据,则从父级派生。

datasetsdict, Datasets

命名数据集的全局数据存储。这是从名称到内联数据集的映射。它可以是对象或原始值数组,也可以是字符串。原始值数组作为具有 data` 属性的对象被摄取。

descriptionstr

用于注释目的的标记描述。

namestr

可视化的名称,以便以后参考。

paddingdict, float, ExprRef, Padding

默认可视化填充(像素),从可视化画布边缘到数据矩形。如果为数字,则指定所有边的填充。如果为对象,则该值应具有格式 {"left": 5, "top": 5, "right": 5, "bottom": 5}`,以指定可视化各边的填充。

默认值: 5

paramsSequence[dict, TopLevelParameter, VariableParameter, TopLevelSelectionParameter]

参数化可视化的动态变量或选择。

resolvedict, Resolve

视图组合规范的比例尺、轴和图例解析。

spacingfloat

串联操作符的子视图之间的像素间距。

默认值: 10

titlestr, dict, Text, Sequence[str], TitleParams]

图表的标题。

transformSequence[dict, Transform, BinTransform, FoldTransform, LoessTransform, PivotTransform, StackTransform, ExtentTransform, FilterTransform, ImputeTransform, LookupTransform, SampleTransform, WindowTransform, DensityTransform, FlattenTransform, QuantileTransform, TimeUnitTransform, AggregateTransform, CalculateTransform, RegressionTransform, JoinAggregateTransform]

数据转换数组,例如过滤和新字段计算。

usermetadict, Dict

将传递给 Vega 的可选元数据。此对象被 Vega 和 Vega-Lite 完全忽略,可用于自定义元数据。

$schemastr

Vega-Lite 规范的 JSON 模式 URL。除非有理由更改,否则请使用 https://vega.github.io/schema/vega-lite/v5.json`。设置 $schema` 属性可以在支持 JSON 模式的编辑器中实现自动验证和自动完成。

方法

__init__([hconcat, autosize, background, ...])

请参考 TopLevelHConcatSpec TopLevelHConcatSpec 模式包装器。

add_params(*params)

向图表添加一个或多个参数。

add_selection(*selections)

'add_selection' 已弃用。

configure([arc, area, aria, autosize, axis, ...])

请参考 Config Config 模式包装器。

configure_arc([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_area([align, angle, aria, ...])

请参考 AreaConfig AreaConfig 模式包装器。

configure_axis([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisBottom([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisDiscrete([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisLeft([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisRight([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisTemporal([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisTop([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisX([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXDiscrete([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisXTemporal([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisY([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYBand([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYDiscrete([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYPoint([aria, bandPosition, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYQuantitative([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_axisYTemporal([aria, ...])

请参考 AxisConfig AxisConfig 模式包装器。

configure_bar([align, angle, aria, ...])

请参考 BarConfig BarConfig 模式包装器。

configure_boxplot([box, extent, median, ...])

请参考 BoxPlotConfig BoxPlotConfig 模式包装器。

configure_circle([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_concat([columns, spacing])

请参考 CompositionConfig CompositionConfig 模式包装器。

configure_errorband([band, borders, extent, ...])

请参考 ErrorBandConfig ErrorBandConfig 模式包装器。

configure_errorbar([extent, rule, size, ...])

请参考 ErrorBarConfig ErrorBarConfig 模式包装器。

configure_facet([columns, spacing])

请参考 CompositionConfig CompositionConfig 模式包装器。

configure_geoshape([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_header([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerColumn([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerFacet([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_headerRow([format, formatType, ...])

请参考 HeaderConfig HeaderConfig 模式包装器。

configure_image([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_legend([aria, clipHeight, ...])

请参考 LegendConfig LegendConfig 模式包装器。

configure_line([align, angle, aria, ...])

请参考 LineConfig LineConfig 模式包装器。

configure_mark([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_point([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_projection([center, clipAngle, ...])

请参考 ProjectionConfig ProjectionConfig 模式包装器。

configure_range([category, diverging, ...])

请参考 RangeConfig RangeConfig 模式包装器。

configure_rect([align, angle, aria, ...])

请参考 RectConfig RectConfig 模式包装器。

configure_rule([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_scale([bandPaddingInner, ...])

请参考 ScaleConfig ScaleConfig 模式包装器。

configure_selection([interval, point])

请参考 SelectionConfig SelectionConfig 模式包装器。

configure_square([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_text([align, angle, aria, ...])

请参考 MarkConfig MarkConfig 模式包装器。

configure_tick([align, angle, aria, ...])

请参考 TickConfig TickConfig 模式包装器。

configure_title([align, anchor, angle, ...])

请参考 TitleConfig TitleConfig 模式包装器。

configure_tooltipFormat([...])

请参考 FormatConfig FormatConfig 模式包装器。

configure_trail([align, angle, aria, ...])

请参考 LineConfig LineConfig 模式包装器。

configure_view([clip, continuousHeight, ...])

请参考 ViewConfig ViewConfig 模式包装器。

copy([deep, ignore])

返回对象的副本。

display([renderer, theme, actions])

在 Jupyter notebook 或 JupyterLab 中显示图表。

from_dict(dct[, validate])

从字典表示构建类。

from_json(json_string[, validate])

从有效的 JSON 字符串实例化对象。

interactive([name, bind_x, bind_y])

使图表轴比例尺具有交互性。

open_editor(*[, fullscreen])

使用默认浏览器在 Vega 图表编辑器中打开图表规范。

project([type, center, clipAngle, ...])

为图表添加地理投影。

properties(**kwargs)

设置图表的顶层属性。

repeat([repeat, row, column, layer, columns])

返回从图表构建的 RepeatChart。

resolve_axis([x, y])

请参考 AxisResolveMap AxisResolveMap 模式包装器。

resolve_legend([angle, color, fill, ...])

请参考 LegendResolveMap LegendResolveMap 模式包装器。

resolve_references([schema])

在此对象的模式或根模式的上下文中解析引用。

resolve_scale([angle, color, fill, ...])

请参考 ScaleResolveMap ScaleResolveMap 模式包装器。

save(fp[, format, ...])

将图表保存到各种格式的文件中。

serve([ip, port, n_retries, files, ...])

'serve' 已弃用。

show()

使用活动的渲染器显示图表。

to_dict([validate, format, ignore, context])

将图表转换为适合 JSON 导出的字典。

to_html([base_url, output_div, ...])

将 Vega/Vega-Lite 规范嵌入到 HTML 页面中。

to_json([validate, indent, sort_keys, ...])

将图表转换为 JSON 字符串。

to_url(*[, fullscreen])

将图表转换为可在 Vega 图表编辑器中打开图表规范的 URL。

transform_aggregate([aggregate, groupby])

向模式添加 AggregateTransform

transform_bin([as_, field, bin])

向模式添加 BinTransform

transform_calculate([as_, calculate])

向模式添加 CalculateTransform

transform_density(density[, as_, bandwidth, ...])

向规范添加 DensityTransform

transform_extent(extent, param)

向规范添加 ExtentTransform

transform_filter([predicate, empty])

向规范添加 FilterTransform

transform_flatten(flatten[, as_])

向模式添加 FlattenTransform

transform_fold(fold[, as_])

向规范添加 FoldTransform

transform_impute(impute, key[, frame, ...])

向模式添加 ImputeTransform

transform_joinaggregate([joinaggregate, groupby])

向模式添加 JoinAggregateTransform

transform_loess(on, loess[, as_, bandwidth, ...])

向规范添加 LoessTransform

transform_lookup([lookup, from_, as_, default])

向图表添加 DataLookupTransformSelectionLookupTransform

transform_pivot(pivot, value[, groupby, ...])

向图表添加 PivotTransform

transform_quantile(quantile[, as_, groupby, ...])

向图表添加 QuantileTransform

transform_regression(on, regression[, as_, ...])

向图表添加 RegressionTransform

transform_sample([sample])

向模式添加 SampleTransform

transform_stack(as_, stack, groupby[, ...])

向模式添加 StackTransform

transform_timeunit([as_, field, timeUnit])

向模式添加 TimeUnitTransform

transform_window([window, frame, groupby, ...])

向模式添加 WindowTransform

transformed_data([row_limit, exclude])

评估 HConcatChart 的转换。

validate(instance[, schema])

在根模式的上下文中根据类模式验证实例。

validate_property(name, value[, schema])

在根模式的上下文中根据属性模式验证属性。

属性

data