Skip to content
Advertisement

Tag: vega-lite

Reference local .csv file in altair chart

I’m trying to use altair to visualize data, but I struggle to use it in the way I would like to use it: by not embedding the data inside the generated .html chart, but by referencing the local .csv file that contains the data. Otherwise, it would result in duplicating the data and therefore doubling the required storage. Here’s what

Altair Ridgeline doesn’t create a plot with nominal groups

I try to create a Ridgeline plot in altair. Let’s assume my dataframe consists of str and float columns: with values like I used code from Altair gallery to create my chart: https://altair-viz.github.io/gallery/ridgeline_plot.html. My code with changed data and column names: When I use row=alt.Row(‘a:T’…) it thinks my data is temporal month, but works fine: But when I change type

How to correctly shift the baseline in an area plot to a particular y location and change the fill color correspondingly, in Altair?

I wanted to be able to do something like this – NOTE: The horizontal line you see is NOT at y=0, but y=1 But using color or fill encoding with condition does not really work in area charts. The closest I got was using yOffset (hit and trial for the perfect value) in mark_area but the biggest problem with that

Advertisement