U
    cc                  
   @   s   d Z ddlmZ ddlZddlmZ ddlmZ ejdk s>erddl	m
Z
mZmZmZmZmZmZ ddlmZ d	d
ddddddgZddlmZ de_n$eeddddddddgdg\ZZZdd Zdd Zd d! Zd"d# ZdS )$ac  
https://plot.ly/python/

Plotly's Python API allows users to programmatically access Plotly's
server resources.

This package is organized as follows:

Subpackages:

- plotly: all functionality that requires access to Plotly's servers

- graph_objs: objects for designing figures and visualizing data

- matplotlylib: tools to convert matplotlib figures

Modules:

- tools: some helpful tools that do not require access to Plotly's servers

- utils: functions that you probably won't need, but that subpackages use

- version: holds the current API version

- exceptions: defines our custom exception classes

    )absolute_importN)TYPE_CHECKING)relative_import)      )
graph_objstoolsutilsofflinecolorsiodata)__version__r   r   r	   r
   r   r   r   r   )	templatesplotlyz.graph_objsz.graph_objectsz.toolsz.utilsz.offlinez.colorsz.ioz.dataz.version.__version__c                    s  ddl m}m}m}m}m}m}m}	m}
m	}m
}m}m} |dkr^ fdd D }|| f|S |dkrr|| f S |dkr|| f S |dkr|| f S |d	kr|| fd
di S |dkr܇ fdd D }|| f|S |dkr fdd D }|| f|S |dkr|	| f S |dkr0|
| f S |dkrF|| f S |dkr\|| f S |dkrr|| f S |dkr|| f S |dkrtdtd| dS )
    Pandas plotting backend function, not meant to be called directly.
    To activate, set pandas.options.plotting.backend="plotly"
    See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py
       )scatterlineareabarbox	histogramviolinstripfunneldensity_contourdensity_heatmapimshowr   c                    s   i | ]}|d kr| | qS ))sc .0kkwargsr!   I/var/www/html/project/venv/lib/python3.8/site-packages/plotly/__init__.py
<dictcomp>d   s       zplot.<locals>.<dictcomp>r   r   r   ZbarhZorientationhr   c                    s   i | ]}|d kr| | qS ))byr!   r"   r%   r!   r'   r(   o   s       )histr   c                    s   i | ]}|d kr| | qS ))r*   binsr!   r"   r%   r!   r'   r(   r   s       r   r   r   r   r   r   Zheatmapzkkind='heatmap' not supported plotting.backend='plotly'. Please use kind='imshow' or kind='density_heatmap'.z9kind='%s' not yet supported for plotting.backend='plotly'N)expressr   r   r   r   r   r   r   r   r   r   r   r   
ValueErrorNotImplementedError)
data_framekindr&   r   r   r   r   r   r   r   r   r   r   r   r   
new_kwargsr!   r%   r'   plotN   sJ    8







r3   c                    sJ   ddl m} ddddddd	d
gdg7  fdd D }|| f|S )r   r   )r   r*   columnaxZfontsizeZrotgridfigsizelayoutreturn_typec                    s   i | ]}|kr| | qS r!   r!   r"   r&   skipr!   r'   r(      s       z!boxplot_frame.<locals>.<dictcomp>)r-   r   )r0   r&   r   r2   r!   r:   r'   boxplot_frame   s
    
r<   c                    sT   ddl m} ddddddd	gd
ddddddg7  fdd D }|| f|S )r   r   r   r4   r*   r6   
xlabelsizexrot
ylabelsizeyrotr5   ZsharexZshareyr7   r8   r,   legendc                    s   i | ]}|kr| | qS r!   r!   r"   r:   r!   r'   r(      s       zhist_frame.<locals>.<dictcomp>r-   r   r0   r&   r   r2   r!   r:   r'   
hist_frame   s
    rE   c                    sL   ddl m} ddddddd	gd
ddg7  fdd D }|| f|S )r   r   r=   r*   r6   r>   r?   r@   rA   r5   r7   r,   rB   c                    s   i | ]}|kr| | qS r!   r!   r"   r:   r!   r'   r(      s       zhist_series.<locals>.<dictcomp>rC   rD   r!   r:   r'   hist_series   s
    rF   )__doc__
__future__r   systypingr   Z_plotly_utils.importersr   version_infor   r   r   r	   r
   r   r   r   Zplotly.versionr   __all__Z	plotly.ior   _default__name____getattr____dir__r3   r<   rE   rF   r!   r!   r!   r'   <module>   sF   $	

=