All Questions
29
questions
1
vote
1
answer
88
views
Altair - Plot Number of Stars/Rating (starting from bar or point graph)
I am plotting a bar graph using Altair. However, instead of having the bar, I was hoping to have the number of stars (i.e. the symbol). In my case, this data is the rating (from 1 start up to 5 stars) ...
0
votes
1
answer
624
views
Altair Python horizontal bar graph with two variables in the same frame
Using Altair, how can I plot in the same horizontal bar plot two variables that are in the same data frame?
I have a panda data frame that looks like this:
# initialize list of lists
data = [['AAA','...
1
vote
1
answer
476
views
Create Altair Chart of Value Counts of Multiple Columns
Using Altair charting, how can I create a chart of value_counts() of multiple columns? This is easily done by matplotlib. How can the identical chart be created using Altair?
import matplotlib.pyplot ...
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 ...
0
votes
1
answer
464
views
Adding text (percentages) to grouped stacked bar chart in altair
I would like to add text (more specifically, percentages or actual values) to each category in my stacked grouped bar chart.
Here's my code:
bar = alt.Chart(df1).mark_bar().encode(
x=alt.X('Week:...
0
votes
1
answer
739
views
altair bar chart text issue
this is my code ...please correct so that label will show correct count.
tool tip is showing correct count.
bars =alt.Chart(r).transform_fold(
['Reservation_count', 'ON_ACCOUNT'],
as_=['column', '...
0
votes
1
answer
429
views
Labeling one bar in altair
I'd like to label one exact bar in bar chart made up by altair, but I can't find the information about that option - only labeling the whole plot, which I'm not interested at. May be there is ...
1
vote
1
answer
308
views
Altair distance between bar labels in mark_text
Help me with my grouped stacked bar plot. I can't set distances between bar labels in altair.
This is my code
chart = alt.Chart(chain_and_prices_for_bar, title='Распределение средних цен различных ...
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
1
answer
864
views
Adjusting Labels of Altair Grouped Bar Chart
I have this dataframe called table:
TERM Bitcoin S&P500 Real Estate Gold
0 High-Inflation/ Short term 3097.94 -3700.78 761.23 6512.71
1 High-...
1
vote
1
answer
557
views
Altair Grouped Bar Chart With Multiple Conditions
I have this DataFrame called table:
TERM Bitcoin S&P500 Real Estate Gold
0 High-Inflation/ Short term 3097.94 -3700.78 761.23 6512.71
1 High-...
0
votes
1
answer
319
views
Extra tick not showing in the Altair bar chart
So I started with Altair, so far very intuitive, but I can't make an extra tick position to show, no matter what I do.
My code looks like this:
alt.Chart(df3).mark_bar(opacity=0.8).encode(
x=alt.X(...
2
votes
1
answer
1k
views
Altair SchemaValidation Error When Faceting
I have this dataframe:
And I want to make a horizontal stacked bar chart that displays the same information as this chart:
I have generated this code:
chart = alt.Chart(df_q4).mark_bar().encode(
...
1
vote
1
answer
1k
views
Altair sorting Chart
I'm trying to plot the data of my DataFarme in a groupedChart and I want the columns to preserve the order I gave them before. The data looks as follows (its not all there but its in the same way ...
1
vote
2
answers
1k
views
Unable to sort in Altair bar-chart
Can't get Altair to sort a column. It seems to have a mind of it's own. Trying to sort by 'count'.
countries_df = pd.DataFrame(countries_top10, columns=["Country", "count"])
...