B
    &[_h              
   @   s   d Z ddlmZ ddlZddlmZ ejdk 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)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 )z
    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   3/tmp/pip-install-l29rncou/plotly/plotly/__init__.py
<dictcomp>c   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#   r$   n   s    )histr   c                s   i | ]}|d kr | |qS ))r&   binsr   )r    r!   )r"   r   r#   r$   q   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#   plotM   sF    8







r/   c                sJ   ddl m} ddddddd	d
gdg7  fdd D }|| f|S )z
    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
    r   )r   r&   columnaxZfontsizeZrotgridfigsizelayoutreturn_typec                s   i | ]}|kr | |qS r   r   )r    r!   )r"   skipr   r#   r$      s    z!boxplot_frame.<locals>.<dictcomp>)r)   r   )r,   r"   r   r.   r   )r"   r6   r#   boxplot_frame   s
    
r7   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 )z
    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
    r   )r   r0   r&   r2   
xlabelsizexrot
ylabelsizeyrotr1   ZsharexZshareyr3   r4   r(   legendc                s   i | ]}|kr | |qS r   r   )r    r!   )r"   r6   r   r#   r$      s    zhist_frame.<locals>.<dictcomp>)r)   r   )r,   r"   r   r.   r   )r"   r6   r#   
hist_frame   s
    r=   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 )z
    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
    r   )r   r&   r2   r8   r9   r:   r;   r1   r3   r(   r<   c                s   i | ]}|kr | |qS r   r   )r    r!   )r"   r6   r   r#   r$      s    zhist_series.<locals>.<dictcomp>)r)   r   )r,   r"   r   r.   r   )r"   r6   r#   hist_series   s
    r>   )__doc__
__future__r   sysZ_plotly_utils.importersr   version_infor   r   r   r   r	   r
   r   r   Zplotly.versionr   __all__Z	plotly.ior   _default__name____getattr____dir__r/   r7   r=   r>   r   r   r   r#   <module>   s>   
$	=