From 0610fc10ffc20d16f28f334320b343ff7924529a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20L=C3=B3pez=20Rivera?= Date: Sun, 5 May 2024 00:33:35 +0200 Subject: [PATCH] Completed plot refactor --- huracan/engine.py | 10 +++++----- huracan/utils.py | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/huracan/engine.py b/huracan/engine.py index 34596ca..bbd63e3 100644 --- a/huracan/engine.py +++ b/huracan/engine.py @@ -736,7 +736,7 @@ def plot_T_S(self, plot_label=plot_label, show=show, # Further customization - y_tick_ndecimals=2, + tick_label_decimals_y=2, **further_custom) def plot_p_V(self, @@ -760,7 +760,7 @@ def plot_p_V(self, plot_label=plot_label, show=show, # Further customization - y_tick_ndecimals=2, + tick_label_decimals_y=2, **further_custom) def plot_H_p(self, @@ -784,7 +784,7 @@ def plot_H_p(self, plot_label=plot_label, show=show, # Further customization - y_tick_ndecimals=2, + tick_label_decimals_y=2, **further_custom) def plot_T_p(self, @@ -808,7 +808,7 @@ def plot_T_p(self, plot_label=plot_label, show=show, # Further customization - x_tick_ndecimals=2, + tick_label_decimals_x=2, **further_custom) def plot_cycle_graph(self, @@ -1121,7 +1121,7 @@ def plot(self, } if colorblind: - m = markers(hollow=True) + m = markers() marker = m[self.streams.index(stream)] subplot_defaults = {**subplot_defaults, **marker} diff --git a/huracan/utils.py b/huracan/utils.py index 898f875..f489bbe 100644 --- a/huracan/utils.py +++ b/huracan/utils.py @@ -115,12 +115,13 @@ def __getitem__(self, item): m = {k: markers.__dict__[k] for k in markers.__dict__.keys() if (self.hollow and k not in self.incompatible) or not self.hollow} keys = [k for k in m.keys() if not re.match(special, k)] - marker = {'marker': m[keys[item]]} + marker = {'scatter_marker': m[keys[item]]} + # FIXME: hollow markers disappear if self.hollow: if self.plotter == 'scatter': - marker['mfc'] = 'none' + marker['mfc'] = 'none' else: - marker['facecolors'] = 'none' + marker['scatter_facecolors'] = 'none' return marker