B
    &[_                 @   s(   d dl mZ d dlZG dd deZdS )    )BaseLayoutHierarchyTypeNc                   s   e Zd ZdZdZddddhZedd Zejd	d Zed
d Z	e	jdd Z	edd Z
e
jdd Z
edd Zejdd Zedd Zd fdd	Z  ZS )
Projectionz
layout.geozlayout.geo.projection	parallelsrotationscaletypec             C   s   | d S )a  
        For conic projection types only. Sets the parallels (tangent,
        secant) where the cone intersects the sphere.
    
        The 'parallels' property is an info array that may be specified as:
    
        * a list or tuple of 2 elements where:
    (0) The 'parallels[0]' property is a number and may be specified as:
          - An int or float
    (1) The 'parallels[1]' property is a number and may be specified as:
          - An int or float

        Returns
        -------
        list
        r    )selfr   r   L/tmp/pip-install-l29rncou/plotly/plotly/graph_objs/layout/geo/_projection.pyr      s    zProjection.parallelsc             C   s   || d< d S )Nr   r   )r	   valr   r   r
   r   #   s    c             C   s   | d S )ay  
        The 'rotation' property is an instance of Rotation
        that may be specified as:
          - An instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`
          - A dict of string/value properties that will be passed
            to the Rotation constructor
    
            Supported dict properties:
                
                lat
                    Rotates the map along meridians (in degrees
                    North).
                lon
                    Rotates the map along parallels (in degrees
                    East). Defaults to the center of the
                    `lonaxis.range` values.
                roll
                    Roll the map (in degrees) For example, a roll
                    of 180 makes the map appear upside down.

        Returns
        -------
        plotly.graph_objs.layout.geo.projection.Rotation
        r   r   )r	   r   r   r
   r   )   s    zProjection.rotationc             C   s   || d< d S )Nr   r   )r	   r   r   r   r
   r   E   s    c             C   s   | d S )aD  
        Zooms in or out on the map view. A scale of 1 corresponds to
        the largest zoom level that fits the map's lon and lat ranges.
    
        The 'scale' property is a number and may be specified as:
          - An int or float in the interval [0, inf]

        Returns
        -------
        int|float
        r   r   )r	   r   r   r
   r   K   s    zProjection.scalec             C   s   || d< d S )Nr   r   )r	   r   r   r   r
   r   Z   s    c             C   s   | d S )a  
        Sets the projection type.
    
        The 'type' property is an enumeration that may be specified as:
          - One of the following enumeration values:
                ['equirectangular', 'mercator', 'orthographic', 'natural
                earth', 'kavrayskiy7', 'miller', 'robinson', 'eckert4',
                'azimuthal equal area', 'azimuthal equidistant', 'conic
                equal area', 'conic conformal', 'conic equidistant',
                'gnomonic', 'stereographic', 'mollweide', 'hammer',
                'transverse mercator', 'albers usa', 'winkel tripel',
                'aitoff', 'sinusoidal']

        Returns
        -------
        Any
        r   r   )r	   r   r   r
   r   `   s    zProjection.typec             C   s   || d< d S )Nr   r   )r	   r   r   r   r
   r   u   s    c             C   s   dS )Na          parallels
            For conic projection types only. Sets the parallels
            (tangent, secant) where the cone intersects the sphere.
        rotation
            :class:`plotly.graph_objects.layout.geo.projection.Rota
            tion` instance or dict with compatible properties
        scale
            Zooms in or out on the map view. A scale of 1
            corresponds to the largest zoom level that fits the
            map's lon and lat ranges.
        type
            Sets the projection type.
        r   )r	   r   r   r
   _prop_descriptions{   s    zProjection._prop_descriptionsNc                sX  t t| d d|kr&|d | _dS |dkr4i }n4t|| jrJ| }nt|tr`t	|}nt
d|dd| _|dd| _|d	d}|dk	r|n|}|dk	r|| d	< |d
d}|dk	r|n|}|dk	r|| d
< |dd}|dk	r|n|}|dk	r
|| d< |dd}|dk	r$|n|}|dk	r:|| d< | jf t|f| d| _dS )aG  
        Construct a new Projection object
        
        Parameters
        ----------
        arg
            dict of properties compatible with this constructor or
            an instance of
            :class:`plotly.graph_objs.layout.geo.Projection`
        parallels
            For conic projection types only. Sets the parallels
            (tangent, secant) where the cone intersects the sphere.
        rotation
            :class:`plotly.graph_objects.layout.geo.projection.Rota
            tion` instance or dict with compatible properties
        scale
            Zooms in or out on the map view. A scale of 1
            corresponds to the largest zoom level that fits the
            map's lon and lat ranges.
        type
            Sets the projection type.

        Returns
        -------
        Projection
        Z
projection_parentNzThe first argument to the plotly.graph_objs.layout.geo.Projection 
constructor must be a dict or 
an instance of :class:`plotly.graph_objs.layout.geo.Projection`Zskip_invalidF	_validateTr   r   r   r   )superr   __init__r   
isinstance	__class__Zto_plotly_jsondict_copycopy
ValueErrorpopZ_skip_invalidr   Z_process_kwargs)r	   argr   r   r   r   kwargsZ_v)r   r   r
   r      s@    




zProjection.__init__)NNNNN)__name__
__module____qualname__Z_parent_path_strZ	_path_strZ_valid_propspropertyr   setterr   r   r   r   r   __classcell__r   r   )r   r
   r      s   r   )Zplotly.basedatatypesr   Z_BaseLayoutHierarchyTyper   r   r   r   r   r   r
   <module>   s   