The following is my code, I want to customize the COLOR_PALETTE, how should I modify the following two code and thank you in advance!
import seaborn.objects as so
import seaborn as sns
from seaborn import axes_style,plotting_context
so.Plot.config.theme.update(plotting_context('paper',font_scale=1.4)|axes_style("ticks",rc={'axes.spines.top':False, 'axes.spines.right':False}))
sns.set_palette(palette='Set1')
p = so.Plot(dfupcub, 'AA', 'Fraction F',color="Codon").layout(size=(3, 3))
p.add(so.Bar(edgewidth=1), so.Stack())
When I use SNS.SET, it doesn't seem to work
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import seaborn.objects as so
sns.set('paper','ticks',font_scale=1.8,font='Arial',palette=sns.color_palette('Accent'),rc=({'svg.fonttype':'none'}))
fig,ax=plt.subplots(figsize=(4,4))
sns.despine()
p = so.Plot(dfupcub, 'AA', 'Fraction F',color="Codon")
p.add(so.Bar(), so.Stack()).on(ax).plot()
The following is my code, I want to customize the COLOR_PALETTE, how should I modify the following two code and thank you in advance!
import seaborn.objects as so import seaborn as sns from seaborn import axes_style,plotting_context so.Plot.config.theme.update(plotting_context('paper',font_scale=1.4)|axes_style("ticks",rc={'axes.spines.top':False, 'axes.spines.right':False})) sns.set_palette(palette='Set1') p = so.Plot(dfupcub, 'AA', 'Fraction F',color="Codon").layout(size=(3, 3)) p.add(so.Bar(edgewidth=1), so.Stack())
When I use SNS.SET, it doesn't seem to work
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import seaborn.objects as so sns.set('paper','ticks',font_scale=1.8,font='Arial',palette=sns.color_palette('Accent'),rc=({'svg.fonttype':'none'})) fig,ax=plt.subplots(figsize=(4,4)) sns.despine() p = so.Plot(dfupcub, 'AA', 'Fraction F',color="Codon") p.add(so.Bar(), so.Stack()).on(ax).plot()