These questions are for seaborn v12 related only to the new seaborn.objects interface. When using this tag, also tag seaborn.
Questions tagged [seaborn-0.12.x]
43 questions
6
votes
1 answer
How to move marker and color sections of a figure legend
I am creating a figure (with the seaborn.objects interface) that requires a legend with both colors and markers. I am trying to move the legend that is generated, but I am having trouble moving the marker section. See the example below:
The example…

user21559775
- 101
- 4
6
votes
0 answers
How to move the legend position in the seaborn.objects API
I am using the new seaborn.objects API available in v0.12.0. None of the examples show how to move the legend position. For example, moving the legend to the bottom. Is there a way to do this?
Using sns.move_legend, as shown in this answer results…

Abiel
- 5,251
- 9
- 54
- 74
4
votes
1 answer
How to rotate the xticks with seaborn.objects
By chance, is there a way to rotate the xticks in the graphic below (just to make it a bit more readable)? The usual
sns.xticks() doesn't work in the new seaborn.objects development (which is amazing!)
tcap.\
assign(date_time2 =…

Robert Chestnutt
- 302
- 3
- 13
4
votes
1 answer
How to change the image size for seaborn.objects
The solutions shown in How to change the figure size of a seaborn axes or figure level plot do not work for seaborn.objects. This question is about the new interface added in seaborn v0.12.
Tried different ways to set the plotted image size but no…

J.W
- 671
- 7
- 23
4
votes
1 answer
How can I customize the legend with Seaborn 0.12 objects?
The new Seaborn objects (v 0.12) are great but I struggle to deal with legend customization. Especially when using matplotlib to define subplots. My code:
f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(3.5, 3.5),…

GTMeijer
- 41
- 1
3
votes
1 answer
Discrete date values for x-axis in seaborn.objects plot
I am trying to prepare a bar plot using seaborn.objects with time series data where the x-axis ticks and labels are only on the dates that really appear in the data.
import pandas as pd
import seaborn.objects as so
df1 = pd.DataFrame({'date':…

divingTobi
- 2,044
- 10
- 25
3
votes
1 answer
Stacking to 100% with `seaborn.objects`
I'm trying to make a plot with bars or areas rescaled to 100% with the new seaborn.objects interface and I can't seem to get so.Norm() to work, with or without by...
Here's what I've got so far:
import seaborn as sns
import seaborn.objects as…

nicolaskruchten
- 26,384
- 8
- 83
- 101
2
votes
1 answer
How to order facets when using the Seaborn objects interface
I am trying to order facets in a plot produced by the seaborn objects interface.
import numpy as np
import seaborn as sns
import seaborn.objects as so
import matplotlib.pyplot as plt
df = sns.load_dataset("iris")
df["species"] =…

Joshua Shew
- 618
- 2
- 19
2
votes
1 answer
Minor log ticks in seaborn.objects
The default log scale in seaborn.objects doesn't show the minor log grid lines. How can they be turned on?
#Synthetic data
import pandas as pd
from scipy.stats import expon
data = pd.DataFrame({'rate': expon(scale=110).rvs(100),
…

some3128
- 1,430
- 1
- 2
- 8
2
votes
1 answer
Legend obscures plot using Seaborn Objects API
I have a recurring problem with legends on many of my plots with legends. The legend often obscures part of the data.
Reproducible example:
import seaborn.objects as so
import numpy as np
import pandas as pd
res_df = pd.DataFrame(
{'value':…

some3128
- 1,430
- 1
- 2
- 8
2
votes
0 answers
Changing pvalue_thresholds, so that a new alpha (0.1 for eg instead of 0.5) can be set in Statannotations
I am a biochemist and my results are too fine for my economist friends they would prefer p-value significance to be set at 10% or alpha= 0.1 instead of the standard 5% (0.05). I used Statannotations the latest v0.5. Here I have an example of what…

Kateus
- 21
- 4
2
votes
1 answer
How do you plot a trendline on labelled scatterplot points with the seaborn objects interface?
I'm using the seaborn.objects interface to label plot points. However, I can't add a trendline if the labels are present.
Adding the argument text='label' and the method .add(so.Line(color='orange'), so.PolyFit()) to so.Plot() in the first example…

doine
- 336
- 1
- 12
2
votes
1 answer
Can I use the IPython magic function %matplotlib qt with seaborn.objects?
Typically if I want to make an interactive plot, I use %matplotlib qt, such that I can explore, zoom, add to the figure etc. I wanted to make an area plot, and with the release of seaborn objects, this is easy. Only, it always plots "inline" in my…

iadriaens
- 56
- 5
2
votes
2 answers
How to reposition Figure legends into subfigures
I am new to this, trying to plot 2 subfigures horizontal with sample data using Matplotlib and Seaborn library in Jupyter Notebook, the 2 sub-charts come out alright, but the 2 legends overlap each other on the far right hand. I couldn't figure out…

user21559775
- 101
- 4
2
votes
1 answer
How to define a colors with rgb values in the seaborn objects api?
I want to color my dots in a scatterplot with some rgb values.
Using the original api, this is easy:
import seaborn as sns
x = [0, 1, 2]
y = [0, 0, 0]
colors = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
sns.scatterplot(x=x, y=y, c=colors)
I get a red, a…

Sandro Martens
- 115
- 6