�
���h�F � �
� d Z ddlmZ ddlZddlZddlZddlZddl m
Z
mZ ddlm
Z
d� Zd� Z dd
�Z dd�Zd
� Zdd�Zd� Z G d� de� � Zd� Zed� � � Zed� � � Zed� � � Zd� Zed� � � ZdS )zw
Use this module directly:
import xarray.plot as xplt
Or use the methods on a DataArray:
DataArray.plot._____
� )�divisionN� )�_determine_cmap_params�_infer_xy_labels)� FacetGridc �: � � t � fd�|D � � � � S )z>
Is the numpy array a sub dtype of anything in types?
c 3 �L �K � | ]}t j �j |� � V � �d S �N)�np�
issubdtype�dtype)�.0�t�arrs ��E/opt/cloudlinux/venv/lib/python3.11/site-packages/xarray/plot/plot.py� <genexpr>z_right_dtype.<locals>.<genexpr> s1 �� � � �:�:�q�r�}�S�Y��*�*�:�:�:�:�:�:� )�any)r �typess ` r �_right_dtyper s( �� � �:�:�:�:�E�:�:�:�:�:�:r c � �� t j t j t j t j g�t �fd�| D � � � � st
d� � �dS )z\
Raise exception if there is anything in args that can't be plotted on
an axis.
c 3 �\ �K � | ]&}t t j |� � �� � V � �'d S r
)r r �array)r �x� plottypess �r r z$_ensure_plottable.<locals>.<genexpr>$ s5 �� � � �B�B��|�B�H�Q�K�K��3�3�B�B�B�B�B�Br z5Plotting requires coordinates to be numeric or dates.N)r �floating�integer�timedelta64�
datetime64r � TypeError)�argsr s @r �_ensure_plottabler" |