All Questions
51
questions
1
vote
1
answer
45
views
Altair: add a line in a grouped bar chart
I have this data that I want to plot. In column 'IPVA' there are [0, 1, 2] as possible values, where 1 and 0 are the data that I want to plot as a grouped bar chart, and the 2 is data that I want to ...
2
votes
1
answer
33
views
Altair not displaying data when changing option on dropdown selector
I want to display counts of a certain feature according to the year with an Altair Chart and I want to do it by selecting year as an option of a dropdown selector. It works fine with the 'None' option ...
0
votes
1
answer
33
views
Reorder a stacked barplot in altair
So I am making an interactive plot (which is why I'm using altair) and I want to reorder the stacks within each bar to match the legend. I've tried reodering the df, I've tried using the 'sort' ...
2
votes
1
answer
140
views
Efficient interactive plots of large datasets -- which framework to use?
I have a moderate-to-large dataset of ~500k points which I would to visualize with an interactive 2d scatterplot (ideally through a web-app).
Usually am quite fond of the altair package (Python) for ...
0
votes
0
answers
52
views
Plot several vertical lines with different x values per faceted graph in Altair
I'm running into an issue with plotting vertical lines on top of other Altair's marked lines (represented by 'posterior' and 'prior' here) where the prior and posterior lines become swiveled after ...
1
vote
1
answer
481
views
How to add error bars in Altair based on different columns of a dataframe?
So I have columns of data, one of which is the average - which I want to show, and one of which is the std deviation - which I want the error bars of
I'm starting using altair, but I have quite a bit ...
1
vote
0
answers
52
views
Vconcat of separate FacetCharts do not have aligned grids - how to get them to align?
I want to plot a grid of plots, with the faceted row and columns determined by different variables. I would like to use a single FacetChart for this, but because the rows contain different variables ...
0
votes
1
answer
485
views
Altair interactive filter on multiple values of one column
Here is the code of my plot.
input_dropdown = alt.binding_select(options=[None]+all_ids, name='Series ID', labels=["All"]+all_ids)
selection = alt.selection_single(fields=['ID'], bind=...
2
votes
1
answer
464
views
Altair interactive stacked area plot
I am trying to create an interactive stacked area plot, where the active selection (the one I click in the legend) is the one visible. However, I would like the active selection to be starting from y=...
1
vote
1
answer
1k
views
Altair: Customizing outliers in boxplots
Is there any way to customize the outlier points in an Altair boxplot? Suppose I had the following plot:
penguins_data="https://raw.githubusercontent.com/datavizpyr/data/master/...
1
vote
1
answer
4k
views
Grouped bar charts in Altair using two different columns
TLDR; How do I make a grouped bar chart in the most recent version of Altair where the grouped bars come from different columns of quantitative data, as opposed to one column of categorical data?
...
2
votes
2
answers
940
views
Drawing median and quartile lines on an Altair violin plot
Suppose I had the following plot (taken from the tutorial in the Altair documentation):
import altair as alt
from vega_datasets import data
alt.Chart(data.cars()).transform_density(
'...
1
vote
1
answer
524
views
Altair: Creating a layered violin + stripplot
I'm trying to create a plot that contains both a violin plot and a stripplot with jitter. How do I go about doing this? I provided my attempt below. The problem that I have been encountering is that ...
1
vote
1
answer
606
views
Altair: Controlling tick counts for binned axis
I'm trying to generate a histogram in Altair, but I'm having trouble controlling the tick count for the axis corresponding to the binned variable (x-axis). I'm new to Altair so apologies I'm missing ...
3
votes
1
answer
1k
views
Altair: How to color when there are more categories than colors available
Here is the code taken from the Altair documentation on color schemes.
alt.Chart(iris).mark_point().encode(
x='petalWidth',
y='petalLength',
color=alt.Color('species', scale=alt.Scale(...