Możesz określić kolor wykresów, ale Seaborn nieco wyciszy kolor podczas drukowania. Czy istnieje sposób, aby wyłączyć to zachowanie?Seaborn: Określ dokładny kolor
Przykład:
import matplotlib
import seaborn as sns
import numpy as np
# Create some data
np.random.seed(0)
x = np.random.randn(100)
# Set the Seaborn style
sns.set_style('white')
# Specify a color for plotting
current_palette = matplotlib.colors.hex2color('#86b92e')
# Make a plot
g = sns.distplot(x, color=current_palette)
# Show what the color should look like
sns.palplot(current_palette)
Próbowałem kilka sposobów określania koloru i wszystkie dostępne style Seaborn, ale nic nie działało. Używam notebooka iPython i Python 2.7.
Czy próbowałeś podać 'kde_kws' /' hist_kws'? https://web.stanford.edu/~mwaskom/software/seaborn/generated/seaborn.distplot.html – Caramiriel
Zmieniłem polecenie wydruku na: 'g = sns.distplot (x, hist_kws = {" alpha " : 1, "color": current_palette}) ' Działa świetnie! Dzięki! – JoshuaA