new color and mc.color function
This commit is contained in:
parent
566ce8ca4e
commit
9e24059104
19
mcutils.py
19
mcutils.py
|
@ -31,6 +31,17 @@ nice_colors = (
|
|||
"#F15854", # (red)
|
||||
)
|
||||
|
||||
|
||||
nice_colors = ['#014636',
|
||||
'#016c59',
|
||||
'#02818a',
|
||||
'#3690c0',
|
||||
'#67a9cf',
|
||||
'#a6bddb',
|
||||
'#d0d1e6',
|
||||
'#ece2f0']
|
||||
|
||||
|
||||
def colormap( list_of_colors ):
|
||||
from matplotlib.colors import colorConverter,LinearSegmentedColormap
|
||||
c = [ colorConverter.to_rgba(l) for l in list_of_colors ]
|
||||
|
@ -761,13 +772,17 @@ def writeMatrix(fout,M,x,y,form="%+.6g",sep=" ",header=None):
|
|||
|
||||
### MATPLOTLIB ... ETC. ###
|
||||
|
||||
def lt(i,style="-"):
|
||||
colors="rkbgy"
|
||||
def lt(i,style="-",colors='rgbk'):
|
||||
i = i%len(colors)
|
||||
color = colors[i]
|
||||
if (style is not None): color += style
|
||||
return color
|
||||
|
||||
def color(i,colors=nice_colors):
|
||||
i = i%len(colors)
|
||||
color = colors[i]
|
||||
return color
|
||||
|
||||
def displayFig(i,x=None,y=None,roi=None):
|
||||
import pylab as plt
|
||||
from matplotlib.widgets import Slider, Button, RadioButtons
|
||||
|
|
Loading…
Reference in New Issue