Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: Restore hatch color tracking edge color #7976

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

Merged
merged 3 commits into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: add whats_new and api_changes entries for gc hatch methods
  • Loading branch information
tacaswell committed Jan 29, 2017
commit a58b0d1ed8cef78824e5dce03a0247d1dfabe0cc
24 changes: 24 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ out what caused the breakage and how to fix it by updating your code.
For new features that were added to Matplotlib, please see
:ref:`whats-new`.

API Changes in 2.0.1
====================

Extensions to `matplotlib.backend_bases.GraphicsContextBase`
------------------------------------------------------------

To better support controlling the color of hatches, the method
`matplotlib.backend_bases.GraphicsContextBase.set_hatch_color` was
added to the expected API of ``GraphicsContext`` classes. Calls to
this method are currently wrapped with a ``try:...except Attribute:``
block to preserve back-compatibility with any third-party backends
which do not extend `~matplotlib.backend_bases.GraphicsContextBase`.

This value can be accessed in the backends via
`matplotlib.backend_bases.GraphicsContextBase.get_hatch_color` (which
was added in 2.0 see :ref:`gc_get_hatch_color_wn`) and should be used
to color the hatches.

In the future there may also be ``hatch_linewidth`` and
``hatch_density`` related methods added. It is encouraged, but not
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NelleV Added the 'please derive from us' verbiage here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you canceling by hand the old travis-ci tests or have we activated the new beta feature to cancel tests on PRs if a newer version exists?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am canceling them by hand.

required that third-party backends extend
`~matplotlib.backend_bases.GraphicsContextBase` to make adapting to
these changes easier.


API Changes in 2.0.0
====================
Expand Down
14 changes: 14 additions & 0 deletions doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,20 @@ value of ``None`` instead of ``2``. If ``None`` is given as ``zorder``,
:func:`streamplot` has a default ``zorder`` of
``matplotlib.lines.Line2D.zorder``.

.. _gc_get_hatch_color_wn:

Extension to `matplotlib.backend_bases.GraphicsContextBase`
-----------------------------------------------------------

To support standardizing hatch behavior across the backends we ship
the `matplotlib.backend_bases.GraphicsContextBase.get_hatch_color`
method as added to `matplotlib.backend_bases.GraphicsContextBase`.
This is only used during the render process in the backends we ship so
will not break any third-party backends.

If you maintain a third-party backend which extends
`~matplotlib.backend_bases.GraphicsContextBase` this method is now
available to you and should be used to color hatch patterns.

Previous Whats New
==================
Expand Down