Skip to main content

All Questions

Tagged with
0 votes
1 answer
62 views

Using a list of colors for a bar chart in Altair

I am trying to provide a list of colors to bind to the bar marks in Altair, similar to how matplotlib's pyplot.bar(color=list_of_colors) can specify the color for each individual bar, like in the ...
Mohit Chawla's user avatar
0 votes
1 answer
97 views

Altair choropleth not rendering in streamlit app on Snowflake and color coding problem

I am trying to make a choropleth map in a streamlit app on Snowflake. Outside of snowflake, I can use the following code to render a map where just one county in Alabama is color coded. import ...
jh_'s user avatar
  • 103
0 votes
0 answers
57 views

Get interval selection for a Vega-Altair plot published in streamlit

How can I get the selected datapoints for a Vega-Altair plot publihsed using Streamlit? I am defining the box selection for selecting datapoints, and it works well. However i am unable to get the ...
Amit's user avatar
  • 185
1 vote
0 answers
104 views

How to specify different colors for column labels in altair

Is there a way to specify different colors for column labels with python altair? Take the grouped bar chart example where bars are grouped using the column encode option. I would like to specify ...
rafa's user avatar
  • 245
3 votes
3 answers
380 views

Enable x-zoom in altair chart

I'd like to be able to zoom into my time series in altair. I understand that this is currently still work in progress, but I hoped to be able to circumvent this restriction by the following idea ...
Thomas's user avatar
  • 1,089
1 vote
1 answer
62 views

Sorting an Altair Ridgeline Plot

Here is an example of an Altair Ridgeline Plot. Source:Altair Gallery. How do I sort the ridgeline plot by the max height or area of each ridge in descending order? Is that possible? I want to show ...
Stephanie's user avatar
0 votes
2 answers
79 views

How can we make this qubit heatmap in Vega spec

I want to create this type of hexagonal heatmap, but can't seem to find this anywhere. Heat map I tried to make it but no luck. here's my vega spec : { "$schema": "https://vega....
Farhan Azam's user avatar
0 votes
0 answers
63 views

How do I use the selection_single method from the Vega Altair library to change the size of a selected image?

I'm using Vega Altair to generate an interactive chart and I would like for the user to be able to select an image in the chart, which is then enlarged and not see through. Below you can find the ...
Sander Aalbers's user avatar
3 votes
1 answer
52 views

In altair, delete extra grid space

Given the following code: background = alt.Chart(pd.DataFrame({'start': [0, 6, 14, 20],'end': [6, 14, 20, 23],'time_of_day':['NIGHT','MORNING','AFTERNOON','NIGHT']})).mark_rect().encode( x=alt.X('...
Testing123's user avatar
0 votes
0 answers
215 views

Altair Jupyterchart error 'Failed to load model class 'AnyModel' from module 'anywidget'

Trying to use the latest Jupyterchart feature from altair library. But getting error as below. Altair Jupyterchart error ->'Failed to load model class 'AnyModel' from module 'anywidget'. Error: No ...
INIYAN S E's user avatar
1 vote
0 answers
105 views

Including a color scheme when passing color as a dict Altair

How do I add a color scheme to the first condition (instead of 'red')? The code below works as intended. I have had to write in dictionary form for it to work: cutoff = 10 color_data = 'RME' #(RME is ...
hello_planet's user avatar
1 vote
1 answer
50 views

What will be the pandas equivalent of the following altair transformation?

I've been trying to create a parallel set chart with the help of altair, but am unable to understand what the below mentioned code means, esp. the transform_window function. I've looked up the ...
Deepak Bisht's user avatar
0 votes
0 answers
181 views

Circular dendrogram with Altair

I'm trying to build a circular dendrogram with Python. This example from Vega is perfect: https://vega.github.io/vega/examples/radial-tree-layout/ But after several days, I've been unable to reproduce ...
Nicolas's user avatar
  • 1,840
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 ...
Eli Louis's user avatar
0 votes
0 answers
265 views

"Header size too large" when trying to render chart JSON passed from Python backend to JS frontend

As the title states, I am creating a full-stack dashboard where I do some Python data analysis and then visualization using Altair on the backend and then design the dashboard with React on the front-...
Rob Liou's user avatar

15 30 50 per page
1
2 3 4 5
8