From 85292775f61f9f2c7bd85eea188d9d95dd4f9ea0 Mon Sep 17 00:00:00 2001 From: Keivan Moradi Date: Sun, 5 Dec 2021 16:10:50 -0800 Subject: [PATCH] Get rid of a warning from mathplolib regarding color Main.py:422: UserWarning: color is redundantly defined by the 'color' keyword argument and the fmt string "--bo" (-> color='b'). The keyword argument will take precedence. self.plotData, = self.subplot.plot([], [], '--bo', color='#1772AE', label='Data') # blue Main.py:424: UserWarning: color is redundantly defined by the 'color' keyword argument and the fmt string "-.bo" (-> color='b'). The keyword argument will take precedence. self.plotCorrectedSignal, = self.subplot.plot([], [], '-.bo', color='#13A075', label='Corrected Data') # green --- Main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Main.py b/Main.py index e2dad2f..b32c9cb 100644 --- a/Main.py +++ b/Main.py @@ -419,9 +419,9 @@ def __init__(self, parent, file_name): self.subplot = self.fig.add_subplot(111) # n_rows, n_cols, index self.canvas = FigureCanvasTkAgg(self.fig, master=self.experimentFrame) self.canvas.get_tk_widget().grid(row=0, column=0, rowspan=len(self.KEYS), sticky='NEWS') - self.plotData, = self.subplot.plot([], [], '--bo', color='#1772AE', label='Data') # blue + self.plotData, = self.subplot.plot([], [], '--o', color='#1772AE', label='Data') # blue self.plotModel, = self.subplot.plot([], [], ':X', color='#D05F2C', label='Model') # red - self.plotCorrectedSignal, = self.subplot.plot([], [], '-.bo', color='#13A075', label='Corrected Data') # green + self.plotCorrectedSignal, = self.subplot.plot([], [], '-.o', color='#13A075', label='Corrected Data') # green self.plotInitTimes, = self.subplot.plot([], [], 'P', color='#CB78A6', label='Init') # magenta self.fig.patch.set_facecolor('#F0F0F0') # light grey self.subplot.set_facecolor('#F0F0F0')