-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/cycle
Description
Bug report
Bug summary
When using the cycler to style a series of plots, one cannot use markerfacecoloralt because it is not recognised as artist. Markerfacecolor and color are recognised.
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
from cycler import cycler
x = np.linspace(0,1,10)
B = [0,1,2,3]
colors = ['k', 'tab:gray', 'tab:red', 'tab:blue']
# Desired workflow
fig1,ax1 = plt.subplots()
ax1.set_prop_cycle(cycler('c',colors)+
cycler('markerfacecolor',colors)+
cycler('markerfacecoloralt',colors[::-1]))
for b in B:
ax1.plot(x,x+b,'-o',markersize=7,fillstyle='top')
Actual outcome
ValueError: Unknown artist properties: {'markerfacecoloralt'}
# Workaround to get above plot
fig2,ax2 = plt.subplots()
ax2.set_prop_cycle(cycler('c',colors)+
cycler('markerfacecolor',colors))
for b,cAlt in zip(B,colors[::-1]):
ax2.plot(x,x+b,'-o',markersize=7,markerfacecoloralt=cAlt,fillstyle='top')
Matplotlib version
- Operating system: macOS Catalina 10.15.3
- Matplotlib version: 3.2.1
- Matplotlib backend (
print(matplotlib.get_backend())
): MacOSX - Python version: 3.7.5
Metadata
Metadata
Assignees
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: color/cycle