-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plotting warnings in Pytest, add news for removal of six support #215
Conversation
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning 1: UserWarning: linestyle is redundantly defined by the 'linestyle' keyword argument
properties
already has linestyle
shown below:
properties.update({"color": color, "linestyle": lineStyle, "linewidth": lineWidth})
_, properties = self.__translateStyles(style) | ||
curveRef = self.subplot.plot(xData, yData, **properties)[0] | ||
if "legend" in style: | ||
self.subplot.legend(**legendBoxProperties()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning 2: No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
Solution - just check whether style
contains legend
like it was checked in line 321 of extendedplotframe.py
if "legend" in style:
properties["label"] = style["legend"]
return stylestr, properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for review @sbillinge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I will merge, but @bobleesj it would be good if we can figure out a way to test that this hasn't broken any thing in the interface. Can we maybe figure out where these code statements are used and make sure the GUI hasn't changed?
I've left an issue for now. Will double-check after we can pre-release on conda-forge. |
Closes #213
Closes #152