diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py index 69874a16eda..31131ab2207 100644 --- a/src/sage/plot/graphics.py +++ b/src/sage/plot/graphics.py @@ -3401,3 +3401,27 @@ def inset(self, graphics, pos=None, fontsize=None): elif 'fontsize' not in graphics._extra_kwds: graphics._extra_kwds['fontsize'] = 6 return MultiGraphics([(self, pos0), (graphics, pos)]) + +# Deprecation notice for GraphicsArray import +def GraphicsArray(*args, **kwargs): + r""" + This is deprecated (see :trac:`28675`). + Use :class:`sage.plot.multigraphics.GraphicsArray` instead. + + TESTS:: + + sage: from sage.plot.graphics import GraphicsArray + sage: c = circle((0,0), 1) + sage: G = GraphicsArray([c, c]) + doctest:...: DeprecationWarning: GraphicsArray must be imported from sage.plot.multigraphics and no longer from sage.plot.graphics. + See https://trac.sagemath.org/28675 for details. + sage: G + Graphics Array of size 1 x 2 + + """ + from .multigraphics import GraphicsArray as NewGraphicsArray + from sage.misc.superseded import deprecation + deprecation(28675, "GraphicsArray must be imported from " + "sage.plot.multigraphics and no longer from " + "sage.plot.graphics.") + return NewGraphicsArray(*args, **kwargs)