-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerspriority: lowlow priority tasks, backlogs, good-to-haveslow priority tasks, backlogs, good-to-haves
Description
Provide some default "quera colors" to use in plots and things. For example:
from bloqade import Colorscheme
# Set a specific color
fig,ax = plt.subplots()
plt.plot(x=x,y=y,color=Colorscheme.PURPLE)
# Use the colormap
fig,ax = plt.subplots()
plt.imshow(data, cmap=Colorscheme.cmap)
# Default cycling
fig,ax = plt.subplots()
ax.set_prop_cycle(Colorscheme.COLORS())
plt.plot(x=x1,y=y1)
plt.plot(x=x2,y=y2)
plt.plot(x=x3,y=y3)Where colorscheme could be an object
from cycler import cycler # builtin
class Colorscheme():
PURPLE = "#67OEFF"
ORANGE = "#FF5900"
RED = "#EF2F55"
GREEN = "#57BC13"
# etc.
@classmethod # or @property
def COLORS(cls):
return cycler([cls.PURPLE,cls.ORANGE,cls.RED,cls.GREEN])
@property
def cmap():
return plt.get_cmap("plasma")Roger-luo
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomerspriority: lowlow priority tasks, backlogs, good-to-haveslow priority tasks, backlogs, good-to-haves