8000 Changed 'colors' paramater in PyPlot vlines/hlines and Axes vlines/hlines to default to configured rcParams 'lines.color' option by McCoubs · Pull Request #1 · CSCD01-team31/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
8000

Changed 'colors' paramater in PyPlot vlines/hlines and Axes vlines/hlines to default to configured rcParams 'lines.color' option #1

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

Open
wants to merge 1,515 commits into
base: master
Choose a base branch
from

Conversation

McCoubs
Copy link
@McCoubs McCoubs commented Mar 6, 2020

PR Summary

Addresses issue #16482, wherein the configured 'lines.color' parameter of rcParams was not being used as the default parameter for the vlines/hlines methods of both the PyPlot and Axes API.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@McCoubs McCoubs added the bug Something isn't working label Mar 6, 2020
@McCoubs McCoubs force-pushed the iss-16482 branch 3 times, most recently from 907c167 to 03277e7 Compare April 5, 2020 19:20
QuLogic and others added 24 commits May 7, 2020 23:24
In these cases, we need *validity* masks, not *invalidity* masks, so
flip the conditional instead of using `~mask` a bunch of times.
The `matplotlib._tri` module is lazily loaded, so using it directly (as
done in this test) may fail if something else doesn't load it. This test
would fail if it was the first tri-related test run in a process (if
testing in parallel), or if just called as the only test, i.e., this
commit fixes:
```
$ pytest -k test_internal_cpp_api lib/matplotlib/tests/test_triangulation.py
__________ test_internal_cpp_api __________

    def test_internal_cpp_api():
        # Following github issue 8197.

        # C++ Triangulation.
        with pytest.raises(
                TypeError,
                match=r'function takes exactly 7 arguments \(0 given\)'):
>           mpl._tri.Triangulation()
E           AttributeError: module 'matplotlib' has no attribute '_tri'

lib/matplotlib/tests/test_triangulation.py:1039: AttributeError
```
Simplify Annotation and Text bbox drawing.
Don't create a statusbar in Qt, wx backends.
Make API of get_tightbbox more consistent between Axes and Axis.
The point of the test is to check that colorbar ticks have certain
values when the scalarmappable's lower and upper lims are a bit more
than 0 and a bit less than 1, respectively.  Certainly sampling 30x30
random values will nearly always accomplish this, but we may as well
just enforce the values.
... by reusing the logic of NavigationToolbar2QT.
Qt toolbars are movable by default, but having them to the left or right
and vertical makes no sense now that we also display the coordinates
text in them (and probably breaks assumptions about resize too, anyways).
backend_driver has been really outdated for a long time.  Replace it by
a new script running all or a subset of the examples scripts.
Cleanup colors.py docstrings.
Remove randomness from test_colorbar_get_ticks_2.
Restrict Qt toolbars to top/bottom of canvas.
Also use light color tool buttons in qt+toolmanager+dark theme.
MNT: Replace backend_driver by new example runner.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
This matches prettier's settings, but should now warn in CI too.
This matches prettier's settings, but should now warn in CI too.
Change subprocess for inkscape version detection
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
QuLogic and others added 29 commits May 26, 2020 17:05
Don't fallback to agg in tight_layout.get_renderer.
In the class Tick, the url attribute is not passed to any of the objects
that are to be drawn. Suggested solution is to override the set_url()
method in Tick to transfer the url attribute content to the tick labels,
that are to be drawn.
…ages

TST: Update SVGs that use interpolation='none'.
…owextent-for-annotationbbox2

Give `AnnotationBbox` an opinion about its extent
If you know how to set to rcParams (which is "just a dict"), you'll
figure out how to read from it as well.  The ability of save a few
keystrokes in rc() is not worth the different API -- at least for the
example.
Prefer demo'ing rcParams rather than rc in examples.
ENH: Support url on more Artists in svg
Support marking a single artist as not-usetex.
Port fontconfig's font weight detection to font_manager.
It's an internal detail, much like `_qhull`, and not exposed externally.
In patheffects.py we have a helper function to reduce the
boiler plate in defining the path effect sub-classes.  We are setting
the `__name__` and `__doc__` to (templated) values, but were not
setting the `__qualname__` which was leaving the string '<locals>' in
the `__qualname__`.  This string is then used by sphinx-gallery to
generate an index of examples that use a given class with files named
like `f'{obj.__qualname__}.examples'` which works correctly (but not
in the way we want) on liunx but fails on windows as `<>` are
forbidden in file names.-

This sets the `__qualname__` to match the `__name__` and fully
simulate defining these classes in the module.
DOC/API: set __qualname__ when using class factory
MNT: Fully remove _parent NavigationToolbar2QT
FIX: cancel pending autoscale on manually setting limits
We don't use multiprocessing in setup.py anymore and can thus get rid of
the `if __name__ == "__main__"` check.
A typo prevented correct parsing by the docs infra
Remove unneeded check/comment re: multiprocessing in setup.py.
DOC: correct legend.title_fontsize docstring
…ine with issue matplotlib#16482

added test coverage for changes to pyplot hlines() and vlines() interface

adding API changes to api_changes

updated Axes.vlines and Axes.hline docstring inline with changes

updated spacing to be 2 line compliant

updated implementation for iss-16482 inline with review comments

removed unnecessary import of image_comparator decorator

running boilerplate.py to update vlines/hlines methods

updating inline with review comments

fixing flake8 errors

updating inline with reviewer comments

updating inline with reviewer comments

updated vlines/hlines default color tests inline with code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0