diff --git a/news/six.rst b/news/six.rst new file mode 100644 index 00000000..9f5136ce --- /dev/null +++ b/news/six.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* six dependency in run.txt + +**Fixed:** + +* + +**Security:** + +* diff --git a/news/warning.rst b/news/warning.rst new file mode 100644 index 00000000..06065114 --- /dev/null +++ b/news/warning.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* two warnings with (1) linestyle redundantly defined and (2) no artists with labels found to put in legend + +**Security:** + +* diff --git a/src/diffpy/pdfgui/gui/extendedplotframe.py b/src/diffpy/pdfgui/gui/extendedplotframe.py index bdc65f23..b9962451 100644 --- a/src/diffpy/pdfgui/gui/extendedplotframe.py +++ b/src/diffpy/pdfgui/gui/extendedplotframe.py @@ -182,9 +182,10 @@ def insertCurve(self, xData, yData, style): style -- the way curve should be plotted return: internal reference to the newly added curve """ - stylestr, properties = self.__translateStyles(style) - curveRef = self.subplot.plot(xData, yData, stylestr, **properties)[0] - self.subplot.legend(**legendBoxProperties()) + _, properties = self.__translateStyles(style) + curveRef = self.subplot.plot(xData, yData, **properties)[0] + if "legend" in style: + self.subplot.legend(**legendBoxProperties()) try: self.datalims[curveRef] = (min(xData), max(xData), min(yData), max(yData)) except ValueError: