-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Adding elinestyle property to errorbar #29879
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
Conversation
Hey folks, Worked on this: #29681 A few notes:
|
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
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.
You need to run python tools/boilerplate.py
to update the errorbar signature for pyplot as well. This will fix the failing test.
Please also fix the formatting issues indicated by flake8.
lib/matplotlib/pyplot.py
Outdated
integration_max_step_scale=1.0, | ||
integration_max_error_scale=1.0, | ||
num_arrows=1, |
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.
did boilerplate.py do these changes? This should not be modified.
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.
I believe so. I have not added anything to this file.
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.
I ran boilerplate.py in another branch without any of my changes. These changes appear as a result.
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.
Ok, I've opened a separate issue on this. For this PR, please just revert the unwanted modifications.
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.
Did you run it outside an environment with the current version installed? The script imports matplotlib
, so the only way it would be out of sync would be if it was using a different version.
It seems like that's the case because elinestyle
hasn't been added anywhere.
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.
I was working on this branch using the conda environment mpl-dev in codespace
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.
Are you definitely using Matplotlib installed from source?
https://matplotlib.org/devdocs/devel/development_setup.html#verify-the-installation
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.
Hi. I will verify. I activated the condo envy and started working.
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.
Possibly you missed the install step then
https://matplotlib.org/devdocs/devel/development_setup.html#install-matplotlib-in-editable-mode
You will probably also need to set this before the install
#29852 (comment)
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.
"You will probably also need to set this before the install
#29852 (comment)"
Thank you. I was getting an error in codespace while running pytest. This seems to have fixed it, but I don't recall seeing it in the documentation
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
There are still the strange removals in |
lib/matplotlib/axes/_axes.py
Outdated
@@ -3825,7 +3835,6 @@ def apply_mask(arrays, mask): | |||
for axis in caplines: | |||
for l in caplines[axis]: | |||
self.add_line(l) | |||
|
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 like an accidental unrelated change. Let's not include this
This PR is intended to add an elinestyle parameter to the errorbar function. The issue is described here: #29681
The errorbar object contains horizontal and vertical lines to demonstrate error ranges on a graph. At the moment, the line style of the errorbar can only be changed by calling the set_linestyle function of the line objects representing the horizontal and vertical error lines individually.
The elinestyle property will provide a method to assign the line style of the error lines when the errorbar is created.
the proposed use of the updated errorbar is as follows:
PR checklist