All Questions
Tagged with altair matplotlib
13
questions
3
votes
1
answer
56
views
Altair Barchart is blank, matplotlib equivalent shows correct visualization
I have been using altair for a time and this is the first time that I have experienced this issue, I have this simple code:
import pandas as pd
import altair as alt
# extract data into a nested list
...
0
votes
0
answers
30
views
Can Altair stepped line charts be configured to display the trailing stepped line like in Matplotlib step charts?
Python code using Matplotlib produces a stepped line chart with the step trailing if the next y-axis value is None (or np.nan):
x = [1,2,3,4,5,6,7,8,9]
y = [1,2,3,None,5,6,7,8,None]
fig, ...
1
vote
1
answer
201
views
Can a callback be registered with Altair's selection mechanism to interactively change pandas data?
I'd like to display an altair scatterplot in a jupyter notebook. When a user clicks on a specific point (or, I suppose a range of points), I'd like update the results in another cell. Similar to ...
1
vote
1
answer
126
views
How to generate back to back chart in D3?
I am using Matplotlib for a back to back plot:
import numpy as np
import matplotlib.pyplot as plt
# create data
A = np.array([3,6,9,4,2,5])
B = np.array([2,8,1,9,7,3])
X = np.arange(6)
# plot the ...
0
votes
1
answer
2k
views
Python interactive plotting for large data sets
Suppose I have a dataset with 100k rows (1000 different times, 100 different series, an observation for each, and auxilliary information). I'd like to create something like the following:
(1) first ...
1
vote
1
answer
1k
views
altair outputs "ufunc 'isinf' not supported for the input types" error, when matplotlib does not
I have such a pandas DataFrame:
RangeIndex: 4478 entries, 0 to 4477
Data columns (total 11 columns):
# Column Non-Null Count Dtype
--- ------ ...
1
vote
1
answer
726
views
Plotting a linear regression line through means on scatter plot using Altair
I am brand new to Altair and relatively new to matplotlib. The data set I am using relates to the PGA and golfers who won tournaments in 2017. I filtered my data to only include those players who had ...
0
votes
1
answer
331
views
Altair - mapping wrong color values
Altair
Starting from:
df_top_5 = df.sort_values('Mean', ascending=False)
and then ressseting the index for altair, which accepts only columns
df_top_5 = df_top_5.reset_index()
I print:
df_top_5:
...
6
votes
1
answer
11k
views
Python: Altair Condition Color Opacity
In an Altair condition I want to specify the opacity for the the secondary conditional color.
My data in the scatter are fairly dense so I want the unselected points to go away (more or less).
Using ...
0
votes
1
answer
81
views
Choosable axis for plotting
I'm very new to data visualising tools and I faced this problem. I have serveral columns in my Pandas dataset ('A', 'B', 'C', 'D', 'E'). I would like to create plot (scatter plot preferably) on which ...
3
votes
1
answer
380
views
Altair mark_line plots noisier than matplotlib?
I am learning altair to add interactivity to my plots. I am trying to recreate a plot I do in matplotlib, however altair is adding noise to my curves.
this is my dataset
df1
linked here from ...
2
votes
1
answer
1k
views
How to have a background image in Altair Python
I'm trying to use Altair to have a dynamic map, I can easily do the dynamic part, however I am trying to add an image as background of the plot (bitmap image), I cannot find any functions in this ...
0
votes
0
answers
267
views
Producing a log colorscale heatmap using Python [duplicate]
I am getting mad trying to make a heatmap with a logarithmic color scale. I have a dataset where the values have a very high variance, and there are a few outliers which have a value way higher than ...