@@ -26,7 +26,7 @@ def fn_name(): return sys._getframe(1).f_code.co_name
2626from matplotlib ._pylab_helpers import Gcf
2727from matplotlib .backend_bases import RendererBase , GraphicsContextBase , \
2828 FigureManagerBase , FigureCanvasBase
29- from matplotlib .cbook import is_string_like , restrict_dict
29+ from matplotlib .cbook import is_string_like , restrict_dict , warn_deprecated
3030from matplotlib .figure import Figure
3131from matplotlib .mathtext import MathTextParser
3232from matplotlib .transforms import Affine2D
@@ -441,6 +441,12 @@ def _renderer_init(self):
441441 self ._renderer = RendererGDK (gtk .DrawingArea (), self .figure .dpi )
442442
443443 def _render_figure (self , pixmap , width , height ):
444+ if isinstance (self ._renderer , RendererGDK ):
445+ warn_deprecated ('2.0' , message = "The GDK backend is "
446+ "deprecated. It is untested, known to be "
447+ "broken and will be removed in Matplotlib 2.2. "
448+ "Use the Agg backend instead." ,
449+ alternative = "Agg" )
444450 self ._renderer .set_pixmap (pixmap )
445451 self ._renderer .set_width_height (width , height )
446452 self .figure .draw (self ._renderer )
0 commit comments