Relative Content

Tag Archive for pythonaltair

Concat error bar plots with different numbers of x labels in Altair

import pandas as pd import numpy as np import altair as alt key_x = “Whatever X Is” key_col = “Color Parameter” key_y = “Performance or Error” np.random.seed(0) charts = [] for sweep, title in zip([ [0.0, 0.1, 0.5, 0.95], [0.0, 0.1, 0.5, 0.75, 1.0, 10.0], [0.01, 0.05, 0.1], ], [ “Parameter 1”, “Parameter 2”, “Parameter […]

Remove gaps with xOffset

Is there a way to not have gaps at non-existing data when using x/yOffset? In the example below, category B only has 1 group (x) and I would like that bar to be centered at the B-tick.

Altair use multiple selections in multi-layer chart

I would like to have multiple selections in a multi-layer chart. One selection should highlight the closest line and the other should highlight the point on each line closest to the current x position of the mouse.