+
    ‹°³jã  ã                   óH   € ^ RI Ht ^ RIHu Hu Ht RR./t ! R R4      tR# )é    )Úimport_moduleNÚPlotGridÚ
matplotlibc                   ót   a € ] tR t^t o RtRRRR/R ltR t]R 4       t]R	 4       t	R
 t
R tR tR tRtV tR# )r   aÍ  This class helps to plot subplots from already created SymPy plots
in a single figure.

Examples
========

.. plot::
   :context: close-figs
   :format: doctest
   :include-source: True

    >>> from sympy import symbols
    >>> from sympy.plotting import plot, plot3d, PlotGrid
    >>> x, y = symbols('x, y')
    >>> p1 = plot(x, x**2, x**3, (x, -5, 5))
    >>> p2 = plot((x**2, (x, -6, 6)), (x, (x, -5, 5)))
    >>> p3 = plot(x**3, (x, -5, 5))
    >>> p4 = plot3d(x*y, (x, -5, 5), (y, -5, 5))

Plotting vertically in a single line:

.. plot::
   :context: close-figs
   :format: doctest
   :include-source: True

    >>> PlotGrid(2, 1, p1, p2)
    PlotGrid object containing:
    Plot[0]:Plot object containing:
    [0]: cartesian line: x for x over (-5.0, 5.0)
    [1]: cartesian line: x**2 for x over (-5.0, 5.0)
    [2]: cartesian line: x**3 for x over (-5.0, 5.0)
    Plot[1]:Plot object containing:
    [0]: cartesian line: x**2 for x over (-6.0, 6.0)
    [1]: cartesian line: x for x over (-5.0, 5.0)

Plotting horizontally in a single line:

.. plot::
   :context: close-figs
   :format: doctest
   :include-source: True

    >>> PlotGrid(1, 3, p2, p3, p4)
    PlotGrid object containing:
    Plot[0]:Plot object containing:
    [0]: cartesian line: x**2 for x over (-6.0, 6.0)
    [1]: cartesian line: x for x over (-5.0, 5.0)
    Plot[1]:Plot object containing:
    [0]: cartesian line: x**3 for x over (-5.0, 5.0)
    Plot[2]:Plot object containing:
    [0]: cartesian surface: x*y for x over (-5.0, 5.0) and y over (-5.0, 5.0)

Plotting in a grid form:

.. plot::
   :context: close-figs
   :format: doctest
   :include-source: True

    >>> PlotGrid(2, 2, p1, p2, p3, p4)
    PlotGrid object containing:
    Plot[0]:Plot object containing:
    [0]: cartesian line: x for x over (-5.0, 5.0)
    [1]: cartesian line: x**2 for x over (-5.0, 5.0)
    [2]: cartesian line: x**3 for x over (-5.0, 5.0)
    Plot[1]:Plot object containing:
    [0]: cartesian line: x**2 for x over (-6.0, 6.0)
    [1]: cartesian line: x for x over (-5.0, 5.0)
    Plot[2]:Plot object containing:
    [0]: cartesian line: x**3 for x over (-5.0, 5.0)
    Plot[3]:Plot object containing:
    [0]: cartesian surface: x*y for x over (-5.0, 5.0) and y over (-5.0, 5.0)

ÚshowTÚsizeNc               óD  € \        RR. RO/R\        3R7      V n        Wn        W n        . V n        RV n        WPn        V F(  pV P
                  P                  VP
                  4       K*  	  W@n	        V'       d'   V P                  '       d   V P                  4        R# R# R# )a	  
Parameters
==========

nrows :
    The number of rows that should be in the grid of the
    required subplot.
ncolumns :
    The number of columns that should be in the grid
    of the required subplot.

nrows and ncolumns together define the required grid.

Arguments
=========

A list of predefined plot objects entered in a row-wise sequence
i.e. plot objects which are to be in the top row of the required
grid are written first, then the second row objects and so on

Keyword arguments
=================

show : Boolean
    The default value is set to ``True``. Set show to ``False`` and
    the function will not display the subplot. The returned instance
    of the ``PlotGrid`` class can then be used to save or display the
    plot by calling the ``save()`` and ``show()`` methods
    respectively.
size : (float, float), optional
    A tuple in the form (width, height) in inches to specify the size of
    the overall figure. The default value is set to ``None``, meaning
    the size will be set by the default backend.
r   Úfromlistz1.1.0)Úimport_kwargsÚmin_module_versionÚcatchN)ÚpyplotÚcmÚcollections)r   ÚRuntimeErrorr   ÚnrowsÚncolumnsÚ_seriesÚ_figÚargsÚappendr   r   )Úselfr   r   r   r   r   ÚkwargsÚargs   &&&$$*, ÚX/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/plotting/plotgrid.pyÚ__init__ÚPlotGrid.__init__\   s‚   € ôF (¨Ø%Ò'FÐGØ&¬|¨oô?ˆŒð Œ
Ø ŒØˆŒØˆŒ	ØŒ	ÛˆCØ�L‰L×Ñ §¡Ö,ñ àŒ	ß�D—O—O�OØ�I‰IŽKñ $‰4ó    c                óL  € V P                   P                  P                  V P                  V P                  4      p/ p^ p\        V P                  4       F_  p\        V P                  4       FC  pV\        V P                  4      8  d   V P                  V,          W!WE3,          &   V^,          pKE  	  Ka  	  V P                  '       g   / MRV P                  /pV P                   P                  P                  ! R/ VB V n        VP                  4        FŒ  w  rx\        VP                  4      ^ 8”  d(   VP                  ^ ,          P                  '       d   RR/M/ pV P                  P                  ! V3/ VB p	V P                  Vn        W˜n        VP%                  4        KŽ  	  R# )r   ÚfigsizeÚ
projectionÚ3dN© )r   ÚgridspecÚGridSpecr   r   ÚrangeÚlenr   r   r   Úfigurer   Úitemsr   Úis_3DÚadd_subplotÚ_plotgrid_figÚ_plotgrid_axÚprocess_series)
r   ÚgsÚmappingÚcÚiÚjÚkwÚspecÚpÚcur_axs
   &         r   Ú_create_figureÚPlotGrid._create_figure�   s;  € Ø�_‰_×%Ñ%×.Ñ.¨t¯z©z¸4¿=¹=ÓIˆØˆØˆÜ�t—z‘zÖ"ˆAÜ˜4Ÿ=™=Ö)�Ø”s˜4Ÿ9™9“~Ô%Ø(,¯	©	°!­�G˜q˜t�HÑ%Ø�Q•’ó *ñ #ð —y—y�y‰R y°$·)±)Ð&<ˆØ—O‘O×*Ñ*×1Ò1Ñ7°BÑ7ˆŒ	Ø—}‘}–‰GˆDÜ+.¨q¯y©y«>¸AÔ+=Ø—	‘	˜!•×"×"Ð"ð   Ñ&Ø)+ð à—Y‘Y×*Ò*¨4Ñ6°2Ñ6ˆFØ"Ÿi™iˆAŒOØ#ŒNØ×ÑÖó 'r   c                ó^   € V P                   '       g   V P                  4        V P                   # ©N)r   r8   ©r   s   &r   ÚfigÚPlotGrid.fig¡   s!   € à�y�yˆyØ×ÑÔ!Ø�y‰yÐr   c                ó   € V # r;   r#   r<   s   &r   Ú_backendÚPlotGrid._backend§   s   € àˆr   c                ód   € V P                   P                  P                  V P                  4       R # r;   )r   r   Úcloser=   r<   s   &r   rC   ÚPlotGrid.close«   s   € Ø�‰×Ñ×$Ñ$ T§X¡XÖ.r   c                óÒ   € \         P                  '       dA   V P                  P                  4        V P                  P
                  P                  4        R # V P                  4        R # r;   )Úbase_backendÚ_showr=   Útight_layoutr   r   r   rC   r<   s   &r   r   ÚPlotGrid.show®   s=   € Ü××ÐØ�H‰H×!Ñ!Ô#Ø�O‰O×"Ñ"×'Ñ'Ö)à�J‰JŽLr   c                ó<   € V P                   P                  V4       R # r;   )r=   Úsavefig)r   Úpaths   &&r   ÚsaveÚPlotGrid.saveµ   s   € Ø�‰×Ñ˜Ör   c                ó¼   € \        V P                  4       UUu. uF  w  rR V,          \        V4      ,           NK   	  pppRRP                  V4      ,           # u uppi )z	Plot[%d]:zPlotGrid object containing:
Ú
)Ú	enumerater   ÚstrÚjoin)r   r2   ÚplotÚ	plot_strss   &   r   Ú__str__ÚPlotGrid.__str__¸   sX   € ä%.¨t¯y©yÔ%9ô;Ù%9™'˜!ð " A•o¬¨T«×2Ð2Ù%9ð 	ñ ;ð /°·±¸9Ó1EÕEÐEùó;s   ™$A)r   r   r   r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r8   Úpropertyr=   r@   rC   r   rM   rV   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      sh   ø‡ € ñJðV/°Dð /¸tô /òbð( ñó ðð
 ñó ðò/òò÷Fð Fr   )r   )Úsympy.externalr   Ú$sympy.plotting.backends.base_backendÚplottingÚbackendsrF   Ú__doctest_requires__r   r#   r   r   Ú<module>rf      s-   ðå (ß ;Ó ;ð �L�>ðÐ ÷
lFó lFr   