I am trying to create a graph using altair in Python and I am getting the error code “AttributeError: ‘tuple’ object has no attribute ‘configure_title” I have tried but search for similar problems but it seems like there not many resources. I have created a graph similar to what I want to accomplish but for some reason I am getting
In my concatenated chart, I’m using an interval selection as a filter (see the GIF, Python code, and VL spec below). Even though my selection appears to be empty, my filtered chart still shows some data. What I’d like to achieve is to show the average temperature, for each station, based on the date range selected in the interval selection.
I was trying to visualise a result of linear regression. And I wanted to remove the top and right grey line. I have tried setting stroke=None, strokeWidth=0 and strokeOpacity=0 in global config but none of these worked. How can I get rid of them? Here’s my code and plot. enter image description here Answer If you remove the last chart.show()
With a dataset like this, how can I create a bar chart grouped by week so the X axis shows only two bars, april 03 – april 09 and april 11 – april 17? (Taking into account that the week starts on sundays, even tho there is no data for dates like april 04) Answer You can use the time
See this example and this similar question. I also want to draw a closed loop with mark_line in Altair. However, I am currently in the process of streamlining my code to be more data-efficient, which is presenting a wrinkle that I am having trouble with. I have a dataset of x and y data that I plot as a scatterplot.
I am trying to plot/combine two charts on Altair, but only one of the chart is actually showing with the expected data. The second chart doesn’t show. The second chart is blank Code below: Image below: Answer If life is referring to life expectancy, the reason you don’t see the lines is the lower facet is likely that the sum
I am trying to create a altair bubble chart. The sample code and sample dataframe is below: I want the size of the bubble based on Market_cap and put names of companies alongside. The problem is font size of names is also changing as per the bubble size. How can this I create this bubble chart with different bubble size
I have an altair chart where I am using mark_rectangle. I want to choose how many x axis labels are displayed to have the marks form squares in the visualization. Or perhaps I want to choose the range of the x axis labels. Right now there are far too many labels being displayed. Below I have an example of what
I’m using Google Colab for learning Python. In this Google Colab notebook I’ve built for demostration, I was able to get some JSON data and visualize it with Altair. This is the chart image I got so far – you can interact with the data in the linked Google Colab notebook or directly in the vega-editor ready with the sample
Updated: Changing alt.X(‘yearmonthdate(TimeUTC):T’ to alt.X(‘yearmonthdate(TimeUTC):O’ made the problem go away. See bottom of post. I have four years of data of the form: TimeUTC FlightID DroneType 2018-08-22 19:35:23.024386+00:00 2018-08-22 19:35:23+00:00 663f-46fe-8887-d37895745506 MavicPro 2018-08-22 19:35:35.888933+00:00 2018-08-22 19:35:35+00:00 663f-46fe-8887-d37895745506 MavicPro 2018-08-22 20:05:06.239102+00:00 2018-08-22 20:05:06+00:00 a63a-4e01-b2d2-bdecc9027049 MavicPro (There is, I think, a good reason for the microseconds in the index AND the TimeUTC