Invert axis direction Altair

For some reason, the Y-axis while plotting with altair seems to be inverted (would expect values to go from lower (bottom) to higher (top) of the plot). Also, I would like to be able to change the...

Apex Retrieve Tasks Assigned to Current User For All Contact Roles on an Account

I have an Apex class whose purpose it is to retrieve and delete overdue tasks on the contact role (related to an account) that the user just called. I need to modify it so that it queries for all...

Order bar chart in Altair?

How can I order my bar chart so that it is in the order of greatest to least value? I tried the below code, but it isn't giving me the expected result. I would like the bars ordered 'b', 'a', 'c'...

How to highlight multiline graph in Altair python

I'm trying to create an interactive timeseries chart with more than 20 lines of data using the Altair module in Python. The code to create the dataframe of the shape I'm looking at is here: import...

How can I make a map using GeoJSON data in Altair?

I'm very new to mapping, and to Altair/Vega. There's an example in the Altair documentation for how to make a map starting with an outline of US states, which is created basically with: states =...

How to add a subtitle to an Altair-generated chart

It seems like you can't add a subtitle yet to a title on a graph made using the Altair Python library. I love Altair, but according to the threads I've found Altair doesn't have a subtitling...

Altair remove border in LayerChart

I am trying to remove the border from an altair chart. This answer works perfectly but it fails when I try to visualize a layered chart. In my setting I have two charts, one for the contour m1 and...

Altair- Display All Axis Ticks But Only Some Tick Labels

I'm stumped on how to display ticks for all x-axis values but only labels for some. The x-axis values in my chart are 0.0 - 3.0 in tenths, whereas I only want to display labels for the whole...

Deploy python app to Heroku "Slug Size too large"

I'm trying to deploy a Streamlit app written in python to Heroku. My whole directory is 4.73 MB, where 4.68 MB is my ML model. My requirements.txt looks like...

altair can't create combination of selections

I want to create an interactive 'legend' that allows me to select combinations of the data in different columns. For example if we have this data: data = { 'type1': [1, 0, 0, 1, 0, 1], ...

Is there any way to upload files via postman into a GraphQL API?

Currently I'm using Altair to upload files (in my case it's just for images) to my GraphQL API. However, all my other routes are stored in postman and it'd be nice if I could use just one...

Is there a way to word wrap or insert a line break with Altair labels?

Is there a way to insert a line break when displaying longer labels in Altair? d = {'source': ['short label', 'a longer label that needs a line break', 'short label', 'a longer label that needs a...

Problem with using ModemManager in an embedded system without Network Manager and udev

I'm attempting to use ModemManager on an embedded Linux system, which is running without Network Manager and without udev. The goal is to establish a working internet connection using D-Link's...

How to retrieve attributes from selected datum in Altair?

I have a Streamlit dashboard which lets me interactively explore a t-SNE embedding using an Altair plot. I am trying to figure out how to access the metadata of the selected datum so that I can...

Altair Color binned values

Having trouble coloring binned values in the following histogram. I intend on coloring all bars that are less-than 50 on the x-axis (Creditworthiness). How is this done in Altair? base =...

Can't save Altair chart as SVG from VS Code

When trying to export an Altair chart in SVG format from a Jupyter Notebook running inside Visual Studio Code, I am prompted "You'll need a new app to open this data link", but no apps are listed...

Change errorbar thickness in Altair

How can I change the thickness of my errorbars in Altair? When I tried to change the color to black, it turns out than it should be. Why is that? My expected output is But the actual output...

How to add second y-axis to the bar chart? Altair

I have a DataFrame: EMOJI PERCENT_TEXT PERCENT combined 0 😂 23.1% 23.1 😂 23.1% 1 🥊 5.7% 5.7 🥊 5.7% 2 👊 3.5% ...

Fail to install great expectation. Error : Cannot uninstall 'ruamel-yaml'

When I was trying to install great_expectation on terminal, 'pip install great_expectations' I got this error: Installing collected packages: ruamel.yaml, jsonpatch, altair,...

Is there a way to format tooltip values in Altair boxplot

Is is possible to format the values within a tooltip for a boxplot? From this Vega documentation, it appears so, but I can't quite figure out how to do it with Altair for python from vega_datasets...

Converting nested dictionary to pandas dataframe and plotting

I have a listener which is constantly logging received messages in the following way -- class Listener: recorded = defaultdict(lambda: defaultdict(list)) def on_message_received(self,...

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...

Python Altair How Do I Bin Histogram Data without Changing the Axis Ticks

In altair, how do I make a histogram without altering the axis ticks? When I try to bin the data, the axis ticks no longer extend past the data in the histogram. I would prefer the bins and axis...

createReadStream is not present in uploaded image

I am using node v14.17.0,"apollo-server-express": "^2.25.0", "graphql-upload": "^12.0.0" I am trying to upload an image but i dont get createReadStream from the image which i upload from graphiql....

How to change line colors in line chart using Altair

I'd like to change the colors of the lines in this line chart but when I created a code to do that, nothing happened. I'd like to change the colors so the lines are green and yellow instead of...

Heroku: Compiled Slug Size is too large Python

I trying to deploy my app to heroku I have following deploying error transformers 4.8.2 requires huggingface-hub==0.0.12, but you'll have huggingface-hub 0.0.14 which is incompatible. ...

Position altair legend top-center

I would like to position an altair legend top-center. Getting it to the top is simple enough by passing legend=alt.Legend(title=None, orient="top"). I also gather that this is possible in...

How to replace the axis label in altair?

I want to change the axis lable from [0,0.5,1] to ['infrequent','average','frequent'] like the following: I tried to make the change as followed, but it does not...

Altair chart: Show less lines in the grid

I'm working on a chart using Altair, and I'm trying to figure out how to have less lines in the background grid. Is there a term for that background grid? Here's a chart that looks like mine, that...

Package streamlit app and run executable on windows

this is my first question on Stackoverflow. I hope my question is clear, otherwise let me know and don't hesitate to ask me more details. I'm trying to package a streamlit app for a personal...