seaborn-0.12.x

How to define a colors with rgb values in the seaborn objects api?

How to define a colors with rgb values in the seaborn objects api? Question: 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, …

Total answers: 1

Plot horizontal bars using seaborn.objects interface (v0.12)

Plot horizontal bars using seaborn.objects interface (v0.12) Question: In the original API, barplot provided an orient parameter to swap bar orientation: import pandas as pd, numpy as np, seaborn as sns df = pd.DataFrame(data=np.random.randint(10, size=(3, 5)), columns=[*"abcde"]) # a b c d e # 0 8 6 5 2 3 # 1 0 0 0 …

Total answers: 1

How to add an arbitrary line to Seaborn.Objects plot

How to add an arbitrary line to Seaborn.Objects plot Question: Is there a way using seaborn objects to add arbitrary line into a plot? Something like ggplots geom_abline specifying slope and intercept? I mean, using seaborn objects API only. … # this DOES NOT WORK ( so.Plot(df, x="var1",y="var2") .add(so.Dot()) .add(so.Line(color="black"), slope=1, intercept=1) ) Asked By: …

Total answers: 1

Adding bar labels shrinks dodged bars in seaborn.objects

Adding bar labels shrinks dodged bars in seaborn.objects Question: I am trying to add text labels to the top of a grouped/dodged bar plot using seaborn.objects. Here is a basic dodged bar plot: import seaborn.objects as so import pandas as pd dat = pd.DataFrame({‘group’:[‘a’,’a’,’b’,’b’], ‘x’:[‘1′,’2′,’1′,’2’], ‘y’:[3,4,1,2]}) (so.Plot(dat, x = ‘x’, y = ‘y’, color = …

Total answers: 1

How to create line + ribbon plot with seaborn.objects?

How to create line + ribbon plot with seaborn.objects? Question: I would like to create a line + ribbon plot similar to these ones created with ggplot2 using geom_line + geom_ribbon: For that, I would like to use the new seaborn.objects interface, but even though the Plot function does accept ymin and ymax, I don’t …

Total answers: 1

The seaborn styles shipped by Matplotlib are deprecated since 3.6

The seaborn styles shipped by Matplotlib are deprecated since 3.6 Question: The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as ‘seaborn-v0_8-<style>’. Alternatively, directly use the seaborn API instead. I have tried this: # use seaborn style plt.style.use("seaborn") …

Total answers: 2

How to change the image size for seaborn.objects

How to change the image size for seaborn.objects Question: 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 one …

Total answers: 1

Is there a way to efficiently construct a pairplot in the new seaborn.objects as with seaborn.pairplot?

Is there a way to efficiently construct a pairplot in the new seaborn.objects as with seaborn.pairplot? Question: I just started digging into the new seaborn.objects interface, which I liked pretty much. Though seaborn.pairplot works fine for me, I have stumbled upon trying to make a nice lower-triangle pairplot with seaborn.objects.Plot.pair. Square layout comes out easily, …

Total answers: 1

Dual y-axis plot using seaborn objects (v0.12)

Dual y-axis plot using seaborn objects (v0.12) Question: I am trying to make a dual y-axis plot using the new seaborn interface (seaborn.objects, available in v0.12). However, I am having difficulties getting it to work. My first try is this: import seaborn.objects as so df = pd.DataFrame( {"x": [1, 2, 3, 4, 5], "y1": [5, …

Total answers: 1