-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Milestone
Description
This is relevant e.g. when using ax.arrow to plot arrows. The color of the heads when using Seaborn is modified to the first color in the current color scheme.
import matplotlib as mpl
import seaborn.apionly as sns
with mpl.style.context(['seaborn-deep']):
print(mpl.rcParams['patch.facecolor']) # here the color is still at its default value ('b')
sns.set(context='paper', style='darkgrid')
print(mpl.rcParams['patch.facecolor']) # now Seaborn has set the patch color to the first color in the default palette
print(sns.color_palette()[0]) # this is that color
with sns.color_palette('hls'):
print(mpl.rcParams['patch.facecolor']) # patch is now red, the first color in the hls paletteOutputs:
b
(0.2980392156862745, 0.4470588235294118, 0.6901960784313725)
(0.2980392156862745, 0.4470588235294118, 0.6901960784313725)
(0.86, 0.37119999999999997, 0.33999999999999997)This is probably platform independent, but for completeness' sake: for me it works like this on Linux (Ubuntu 15.10) and OSX (10.9.5), with Matplotlib 1.5.1 and Seaborn 0.7.0 in Python 2.7.6. Matplotlib and Seaborn were installed with pip on Linux and with Enthought Canopy on OSX.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues