You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xkcd plots rendered as regular plots on Mac OS X #5442
With matplotlib 1.5.0 using the gtkcairo backend, the xkcd plots also render as regular plots. @mario-grgic can you identify exactly where in the xkcd code the difference between agg/pdf and macosx/gtkcairo occurs?
The "sketched line" functionality happens in the path iterator code (src/path_converters.h). The macosx backend interacts with that code through a C wrapper around the C++ (src/path_cleanup.cpp) that hasn't been updated to expose the sketch functionality. We'd need to both update that wrapper and then update the macosx backend to pass along the sketch parameters from the gc to that. I can probably hack that together when I have time.
The Cairo backend is different -- since it's currently 100% Python (outside of the third-party Cairo wrapper), it doesn't use the path iterator code. Doing so would require a lot more overhead, but it's doable, and we do actually already expose the path iterators to Python through _path.cleanup_path.
Activity
DanHickstein commentedon Nov 10, 2015
Does switching backends help?
#2269
mario-grgic commentedon Nov 10, 2015
Yes, if I save the plot as pdf or use CocoaAgg backend, it looks right. It looks like the default MacOSX backend has a problem.
tacaswell commentedon Nov 11, 2015
@mario-grgic Is regression from 1.4.3?
attn @mdehoon
jenshnielsen commentedon Nov 11, 2015
It's not a regression. It doesn't work with the OSX backend in 1.4.3 either.
mario-grgic commentedon Nov 11, 2015
In 1.4.3 xkcd plots failed with error described in Issue #5049.
mdehoon commentedon Nov 12, 2015
With matplotlib 1.5.0 using the gtkcairo backend, the xkcd plots also render as regular plots. @mario-grgic can you identify exactly where in the xkcd code the difference between agg/pdf and macosx/gtkcairo occurs?
mdboom commentedon Nov 12, 2015
The "sketched line" functionality happens in the path iterator code (
src/path_converters.h). The macosx backend interacts with that code through a C wrapper around the C++ (src/path_cleanup.cpp) that hasn't been updated to expose the sketch functionality. We'd need to both update that wrapper and then update the macosx backend to pass along the sketch parameters from the gc to that. I can probably hack that together when I have time.The Cairo backend is different -- since it's currently 100% Python (outside of the third-party Cairo wrapper), it doesn't use the path iterator code. Doing so would require a lot more overhead, but it's doable, and we do actually already expose the path iterators to Python through
_path.cleanup_path.mdehoon commentedon Nov 13, 2015
@mdboom OK, when you're done, I can have have a look at the macosx backend side of things.
Fix matplotlib#5442: XKCD in Mac-OSX backend
mdboom commentedon Mar 21, 2016
Fixed by #6178.