-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
I went through the ultraplot document, but failed to find a clear explanation on how to set the default color cycle to a custom color sequence.
The configuration page mentioned rc['cycle'].
The Color cycles page mentioned how to define a cycle with uplt. Cycle, but this cycle can not be passed to rc actually.
These are all relevant info that I found.
I don't know what's the recommended practice with ultraplot.
I found a workaround using a mixture of uplt and mpl.
from matplotlib import pyplot as plt
import matplotlib as mpl
import ultraplot as uplt
import numpy as np
ctab = ["#5790fc", "#f89c20", "#e42536", "#964a8b", "#9c9ca1", "#7a21dd"]
uplt.rc['axes.prop_cycle'] = mpl.cycler(color=ctab)
# uplt.rc['cycle'] = mpl.cycler(color=ctab) # does not work
for i in range(6):
plt.plot(np.arange(10) + i)Metadata
Metadata
Assignees
Labels
No labels
