Skip to content

Commit

Permalink
updated default colors
Browse files Browse the repository at this point in the history
  • Loading branch information
elimh committed Apr 1, 2019
1 parent 0f88a8e commit 02a6ce7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions gempy/core/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,7 @@ def generate_colordict_DEP(self, out = False):

def generate_colordict(self, out = False):
'''generate colordict that assigns black to faults and random colors to surfaces'''
gp_defcols = ['#F2930C','#00d500',
'#325916', '#F24C0C']
# '#F2930C', '#F24C0C']#, '#E00000', '#CF522A', '#990902',
# '#26BEFF', '#227dac', '#443988', '#2A186C', '#0F5B90']

gp_defcols = ['#015482','#9f0052','#ffbe00','#728f02','#443988','#ff3f20','#325916','#5DA629']
test = len(gp_defcols) >= len(self.df)

if test == False:
Expand All @@ -455,13 +451,14 @@ def generate_colordict(self, out = False):
else:
self.colordict = colordict

def select_colors(self):
def change_colors(self):
'''opens widget to change colors'''

items = [widgets.ColorPicker(description=surface, value=color)
for surface, color in self.colordict.items()]

colbox = widgets.VBox(items)
print('Click to select new colors.')
display(colbox)

def on_change(v):
Expand All @@ -472,7 +469,7 @@ def on_change(v):
cols.observe(on_change, 'value')

def update_colors(self, cdict=None):
''' Updates the surface colors.
''' Updates the colors in self.colordict and in surfaces_df.
Args:
cdict: dict with surface names mapped to hex color codes, e.g. {'layer1':'#6b0318'}
Expand Down

0 comments on commit 02a6ce7

Please sign in to comment.