Skip to content

Commit

Permalink
plot editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwigc committed Nov 10, 2023
1 parent 1ca471a commit 763cd7f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metabolabpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__author__ = 'Christian Ludwig ([email protected])'
__credits__ = 'Christian Ludwig ([email protected])'
__version__ = '0.9.20'
__version__ = '0.9.21'
__license__ = 'GPLv3'
6 changes: 6 additions & 0 deletions metabolabpy/nmr/nmrConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(self):
self.print_standard_colours = True
self.print_stacked_plot = False
self.print_auto_scale = False
self.print_stacked_plot_repeat_axes = False
self.print_spc_linewidth = 2
self.print_axes_linewidth = 2
self.print_ticks_font_size = 10
Expand All @@ -55,6 +56,7 @@ def make_config(self):
print_dataset_colours = 'yes' if self.print_dataset_colours is True else 'no'
print_standard_colours = 'yes' if self.print_standard_colours is True else 'no'
print_stacked_plot = 'yes' if self.print_stacked_plot is True else 'no'
print_stacked_plot_repeat_axes = 'yes' if self.print_stacked_plot is True else 'no'
print_auto_scale = 'yes' if self.print_auto_scale is True else 'no'
config['GUI'] = {'auto_plot': auto_plot,
'keep_zoom': keep_zoom,
Expand Down Expand Up @@ -87,6 +89,7 @@ def make_config(self):
'print_ticks_font_size': self.print_ticks_font_size,
'print_label_font_size': self.print_label_font_size,
'print_stacked_plot': print_stacked_plot,
'print_stacked_plot_repeat_axes': print_stacked_plot_repeat_axes,
'print_auto_scale': print_auto_scale}
return config

Expand Down Expand Up @@ -157,6 +160,9 @@ def set_print_standard_colours(self, value):
def set_print_stacked_plot(self, value):
self.print_stacked_plot = True if value == "yes" else False

def set_print_stacked_plot_repeat_axes(self, value):
self.print_stacked_plotrepeat_axes = True if value == "yes" else False

def set_print_auto_scale(self, value):
self.print_auto_scale = True if value == "yes" else False

Expand Down
8 changes: 6 additions & 2 deletions metabolabpy/nmr/nmrDataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def __init__(self):
self.int1 = 0.0
self.int2 = 0.0
self.int3 = 0.0
self.int4 = 0.0
self.print_colours = []
self.print_neg_colours = []
self.background_colour = []
Expand Down Expand Up @@ -812,18 +813,21 @@ def init_print_colours(self):
self.int1 = 1.0
self.int2 = 0.6
self.int3 = 0.3
self.int4 = 0.8
else:
self.int1 = 0.4
self.int2 = 0.8
self.int3 = 0.5
self.int4 = 0.1

int1 = self.int1
int2 = self.int2
int3 = self.int3
int4 = self.int4
light_neg_diff = 0.5
dark_neg_diff = 0.2
if self.cf.print_light_mode == False:
self.print_colours = [(int1, int1, 0.0),
self.print_colours = [(int4, int4, int1),
(0.0, int1, int1),
(int1, 0.0, int1),
(int2, int2, int1),
Expand All @@ -842,7 +846,7 @@ def init_print_colours(self):
int1 = max(int1, 0.0)
int2 = max(int2, 0.0)
int3 = max(int3, 0.0)
self.print_neg_colours = [(int1, int1, 0.0),
self.print_neg_colours = [(int2, int2, int1),
(0.0, int1, int1),
(int1, 0.0, int1),
(int2, int2, int1),
Expand Down

0 comments on commit 763cd7f

Please sign in to comment.