1,279 questions with no answers
6
votes
0
answers
2k
views
Seaborn bivariate KDE speed-up
I am estimating a Gaussian bivariate KDE of positions data (x and y coordinates), and I use sns.kdeplot for this. While it works correctly (i.e. I get the plot I get), it is pretty slow for the amount ...
2
votes
0
answers
53
views
What is wrong with my PIL looped image paste?
I have script that loops over a set of json color themes, uses seaborn and matplotlib to generate a labeled swatch and then saves it to a buffer. I want to paste the buffer into a new PIL.Image but ...
0
votes
0
answers
203
views
"UserWarning: No artists with labels found to put in legend" Error when trying to create a legend with labels from dataset
I can't get legend labels to show up when I use 'CONDITION' (a longer string) as my x data and hue, however when I use CONDITION_N (a shorter string) as the hue then it appears. Why?
Warning:
/var/...
0
votes
0
answers
123
views
How to create a time series heat map
I have a dataset from a disdrometer containing the following variables:
Time stamp (LST) – Local Standard Time
Rainrate – Rain rate in mm/hr
Mass weighted mean D (mm) – Mass-weighted mean diameter of ...
1
vote
0
answers
141
views
PCA with direction arrows showing genes associated with samples
I’m trying to reproduce a PCA biplot where
dots = samples coloured by the column sample in pb.obs
arrows = genes, pointing toward the region(s) of the plot where each gene is most highly expressed.
So ...
0
votes
0
answers
59
views
Creating seaborn histplot with dates instead of data's default dates
I'm wanting to format this histplot in seaborn so that it includes the date range for the entire dataset I have, not just the range in which this variable occurs. Histplot with code above, shows data ...
0
votes
0
answers
972
views
Huge problem to load Plotly plots in Jupyter Notebook Python
I have a huge problem with Jupyter Notebook.
When he builds graphs using the plot packet, to display the next graph I have to reload the dataset, otherwise an error pops up: TypeError: list indices ...
1
vote
0
answers
33
views
Problem with sns boxplot and the hatch pattern
I have this code
#Plot
# Define a custom palette for the strains
custom_palette = {
'H9CK': 'green',
'H9RT': 'blue',
'H9TK': 'red',
'H9WD': 'orange'
}
...
1
vote
0
answers
34
views
Violin plot - Concatenating two violins in one
I have a dataframe for which I am plotting violin plot. The dataframe has two categories A and B and highly imbalance data (one df has 1000 samples/rows and other has 200). I want to compare both ...
1
vote
0
answers
57
views
Extend bbox in heatmap
I have the following heatmap:
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
# Create a sample heatmap
data = np.random.rand(10, 12)
ax = sns.heatmap(data)
# Set ...
0
votes
0
answers
32
views
Seaborn not giving correct median in boxplot
df_s=pd.Series([
5990.00,
3990.00,
399000.00 ,
1995000.00])
plt.yscale("log")
sns.boxplot(y=df_s)
Output
By simple calculation the median is 202,495.00(average of the 2nd ...
1
vote
0
answers
50
views
ModuleNotFoundError for seaborn package inside Jupyter
I created a new conda environment using the command conda create --name <my-env> and then installed some python packages using the following command
conda install -n <my-env> numpy pandas ...
3
votes
0
answers
61
views
Seaborn in excel outputs different vs in Jupyter Notebook
I am using the same formula in Excel and VSCode, however, I am getting different results.
Workbook Formula
Cell B1 = PY tips = xl("TestData")
Cell B2 = PY sns.histplot(tips, stat="...
0
votes
0
answers
52
views
Seaborn.pointplot(): repeats of same x-axis values, but different y
I am unsure what to do here.
So the seaborn.pointplot() should take the mean of y values across 4 independent experiment for each x. However, within each independent experiment, I have also been doing ...
0
votes
0
answers
47
views
Create a graphic for a multiindexed data frame
This is my first question. I don't find the way to create a graphic from a multi indexed data frame so I can show the development goes for the answers of a test. It keeps throwing errors. First part ...