Skip to content

Commit

Permalink
offset_position="data" has been deprecated in Matplotlib.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Apr 22, 2020
1 parent c2a45d7 commit 3e9d2d7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,6 @@ Possible optimizations
- Path simplification (although cairo appears to use vertex reduction and
Douglas-Peucker internally?).
- Use QtOpenGLWidget and the cairo-gl backend.
- ``hexbin`` currently falls back on the slow implementation due to its use of
the ``offset_position`` parameter. This should be fixed on Matplotlib's
side.

What about the already existing cairo (gtk3/qt4/qt5/wx/tk/...cairo) backends?
=============================================================================
Expand Down
5 changes: 1 addition & 4 deletions src/_mplcairo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,10 +1176,7 @@ void GraphicsContextRenderer::draw_path_collection(
// positions would be different on every stamp. (NOTE: Actually it may be
// possible to use the hatch as the source and mask it with the pattern.)
// - FIXME[matplotlib]: offset_position is set to "data". This feature
// is only used by hexbin(), so it should really just be deprecated;
// hexbin() should provide its own Container class which correctly adjusts
// the transforms at draw time (or just be drawn as a quadmesh, see
// draw_quad_mesh).
// is only used by hexbin(), and has been deprecated in mpl 3.3 (#13696).
if (py::bool_(py::cast(this).attr("get_hatch")())
|| offset_position == "data") {
py::module::import("matplotlib.backend_bases")
Expand Down

0 comments on commit 3e9d2d7

Please sign in to comment.