Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Use Agg for rendering in the Mac OSX backend #6178
Conversation
mdboom
added this to the
2.1 (next point release)
milestone
Mar 17, 2016
mdboom
added the
needs_review
label
Mar 17, 2016
|
Nice! Will this make any difference to the requirement for a Python framework build by any chance? It's a significant pain point. |
|
Unfortunately, this makes no difference with respect to a framework build. Anaconda has a nice workaround to make a build that "works both ways" (it's not really a framework build, but it has a .app wrapper). I think overtime other distros will probably adopt a similar approach. |
|
Wow! Works on a Retina with Mavericks! Sharp and snappy! |
|
Yes -- I was just reminded that |
|
Except wasn't there fundamental conflicts in the design of the macosx On Fri, Mar 18, 2016 at 7:12 AM, Michael Droettboom <
|
jenshnielsen
commented on an outdated diff
Mar 18, 2016
| _macosx.FigureCanvas.__init__(self, width, height) | ||
| + @property | ||
| + def renderer(self): |
jenshnielsen
Owner
|
|
Seems to work really great |
|
@efiring I think restore_region and copy_from_bbox will work with agg. With the native implementation, restore_region and copy_from_bbox needed to be done from inside the callback function during the event loop to satisfy Apple's API requirements. As agg has its own image buffer, restore_region and copy_from_bbox can now be done independently of the event loop. |
|
Animations now work. It's a bit less efficient than it could be -- the blitting to the Agg buffer is for specific rectangles of the image, but the blitting of the figure to the window is always still the entire figure. That could probably be made to work, but I'm not sure how much benefit it would really have -- the real benefit of the animation code is to not draw (vectorize) more than we have to. Blitting is pretty cheap relative to those things. |
|
My animation code works at good speed with this PR - thanks very much for doing this. |
This was referenced Mar 21, 2016
This was referenced Mar 21, 2016
|
There is still a problem with lasso_selector_demo.py. The curve is drawn displaced from the cursor by a large fraction of the window size, and everything seems to being getting selected. |
It looks like mouse events aren't being properly scaled by the device scale. |
mdboom
referenced
this pull request
Mar 21, 2016
Closed
mac osx backend does not scale dashes by linewidth #5986
|
I'm of two minds on where this should be milestoned as well. It certainly makes it easier to have consistent look-and-feel across the major backends, which is what 2.0 is "about". But I can see it either way. |
|
It would be great to have this in for 2.0 - it looks like it will make the OSX backend easier to use, and less puzzling to people reading examples and documentation for other backends. |
|
Given all of the bugs that this addresses, an argument can be made for putting it in 1.5.x! And given how long it is taking us to get 2.0 out, I think that waiting even longer, for 2.1, would be a mistake. |
|
Considering how large #5718 was, and it still got into 2.x, I don't see a problem including this PR too. |
efiring
merged commit b4bed49
into matplotlib:master
Mar 28, 2016
efiring
removed the
needs_review
label
Mar 28, 2016
|
@mdboom I tried to cherry-pick this to v2.x, but failed--would you take care of that, please? |
QuLogic
modified the milestone: 2.0 (style change major release), 2.1 (next point release)
Mar 28, 2016
QuLogic
added the
GUI/osx
label
Mar 28, 2016
mdboom
added a commit
that referenced
this pull request
Mar 29, 2016
|
|
efiring + mdboom |
e981e1e
|
|
Cherry-picked to 2.x as e981e1e |
ezatterin
commented
Mar 31, 2016
|
Hi, apologies for asking a 'rookie' question over here. I recently migrated from linux to a retina mac and found the macosx backend to be very slow at rendering stuff. other backends either don't work or display very low resolution graphics. if I understood correctly this is part of the issue that was fixed here. If anyone could give me a suggestion of how to make the qtconsole import matplotlib fine I would greatly appreciate it, thanks! |
bearstrong
added a commit
to bearstrong/matplotlib
that referenced
this pull request
Apr 1, 2016
|
|
efiring + bearstrong |
e21eec2
|
mdboom commentedMar 17, 2016
I got tired of the bug reports about this one, so thought I'd start seeing how hard this would be. Turns out, not very hard.
Based on @mdehoon's desire to deprecate the macosx backend, one option we've thrown about in order to not regress in terms of features, and not require extra dependencies is to pare down the existing macosx backend so all the rendering happens in the Agg backend. This fixes many of the rendering differences, both visual and performance-wise, between the macosx and the *Agg backends.
I've tested on El Cap, and it seems to work just fine in terms of speed. Retina displays are fully supported -- it should work to move a window from a Retina to non-Retina display, but I don't have such a setup to test on.
Cc: @jenshnielsen and @efiring for extra Mac testing -- esp. if you are on earlier versions than El Capitain. If using anaconda, don't forget to run with
pythonw.