Skip to content

Commit a75f347

Browse files
authored
Fix plotting warnings in Pytest, add news for removal of six support (#215)
* Add news and fix warnings * Add back original file content
1 parent 1f0b9a3 commit a75f347

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

news/six.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* six dependency in run.txt
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

news/warning.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* two warnings with (1) linestyle redundantly defined and (2) no artists with labels found to put in legend
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/pdfgui/gui/extendedplotframe.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ def insertCurve(self, xData, yData, style):
182182
style -- the way curve should be plotted
183183
return: internal reference to the newly added curve
184184
"""
185-
stylestr, properties = self.__translateStyles(style)
186-
curveRef = self.subplot.plot(xData, yData, stylestr, **properties)[0]
187-
self.subplot.legend(**legendBoxProperties())
185+
_, properties = self.__translateStyles(style)
186+
curveRef = self.subplot.plot(xData, yData, **properties)[0]
187+
if "legend" in style:
188+
self.subplot.legend(**legendBoxProperties())
188189
try:
189190
self.datalims[curveRef] = (min(xData), max(xData), min(yData), max(yData))
190191
except ValueError:

0 commit comments

Comments
 (0)