mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-07-01 22:13:01 +00:00
first commit
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if sys.version_info < (3, 7) or TYPE_CHECKING:
|
||||
from ._center import Center
|
||||
from ._domain import Domain
|
||||
from ._lataxis import Lataxis
|
||||
from ._lonaxis import Lonaxis
|
||||
from ._projection import Projection
|
||||
from . import projection
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__,
|
||||
[".projection"],
|
||||
[
|
||||
"._center.Center",
|
||||
"._domain.Domain",
|
||||
"._lataxis.Lataxis",
|
||||
"._lonaxis.Lonaxis",
|
||||
"._projection.Projection",
|
||||
],
|
||||
)
|
142
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_center.py
Normal file
142
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_center.py
Normal file
@ -0,0 +1,142 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Center(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.center"
|
||||
_valid_props = {"lat", "lon"}
|
||||
|
||||
# lat
|
||||
# ---
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Sets the latitude of the map's center. For all projection
|
||||
types, the map's latitude center lies at the middle of the
|
||||
latitude range by default.
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
# lon
|
||||
# ---
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Sets the longitude of the map's center. By default, the map's
|
||||
longitude center lies at the middle of the longitude range for
|
||||
scoped projection and above `projection.rotation.lon`
|
||||
otherwise.
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
lat
|
||||
Sets the latitude of the map's center. For all
|
||||
projection types, the map's latitude center lies at the
|
||||
middle of the latitude range by default.
|
||||
lon
|
||||
Sets the longitude of the map's center. By default, the
|
||||
map's longitude center lies at the middle of the
|
||||
longitude range for scoped projection and above
|
||||
`projection.rotation.lon` otherwise.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, **kwargs):
|
||||
"""
|
||||
Construct a new Center object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Center`
|
||||
lat
|
||||
Sets the latitude of the map's center. For all
|
||||
projection types, the map's latitude center lies at the
|
||||
middle of the latitude range by default.
|
||||
lon
|
||||
Sets the longitude of the map's center. By default, the
|
||||
map's longitude center lies at the middle of the
|
||||
longitude range for scoped projection and above
|
||||
`projection.rotation.lon` otherwise.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Center
|
||||
"""
|
||||
super(Center, self).__init__("center")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.layout.geo.Center
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Center`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("lat", None)
|
||||
_v = lat if lat is not None else _v
|
||||
if _v is not None:
|
||||
self["lat"] = _v
|
||||
_v = arg.pop("lon", None)
|
||||
_v = lon if lon is not None else _v
|
||||
if _v is not None:
|
||||
self["lon"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
241
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_domain.py
Normal file
241
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_domain.py
Normal file
@ -0,0 +1,241 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Domain(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.domain"
|
||||
_valid_props = {"column", "row", "x", "y"}
|
||||
|
||||
# column
|
||||
# ------
|
||||
@property
|
||||
def column(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this column in
|
||||
the grid for this geo subplot . Note that geo subplots are
|
||||
constrained by domain. In general, when `projection.scale` is
|
||||
set to 1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
The 'column' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["column"]
|
||||
|
||||
@column.setter
|
||||
def column(self, val):
|
||||
self["column"] = val
|
||||
|
||||
# row
|
||||
# ---
|
||||
@property
|
||||
def row(self):
|
||||
"""
|
||||
If there is a layout grid, use the domain for this row in the
|
||||
grid for this geo subplot . Note that geo subplots are
|
||||
constrained by domain. In general, when `projection.scale` is
|
||||
set to 1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
The 'row' property is a integer and may be specified as:
|
||||
- An int (or float that will be cast to an int)
|
||||
in the interval [0, 9223372036854775807]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
"""
|
||||
return self["row"]
|
||||
|
||||
@row.setter
|
||||
def row(self, val):
|
||||
self["row"] = val
|
||||
|
||||
# x
|
||||
# -
|
||||
@property
|
||||
def x(self):
|
||||
"""
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by domain. In
|
||||
general, when `projection.scale` is set to 1. a map will fit
|
||||
either its x or y domain, but not both.
|
||||
|
||||
The 'x' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'x[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'x[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["x"]
|
||||
|
||||
@x.setter
|
||||
def x(self, val):
|
||||
self["x"] = val
|
||||
|
||||
# y
|
||||
# -
|
||||
@property
|
||||
def y(self):
|
||||
"""
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by domain. In
|
||||
general, when `projection.scale` is set to 1. a map will fit
|
||||
either its x or y domain, but not both.
|
||||
|
||||
The 'y' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'y[0]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
(1) The 'y[1]' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, 1]
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["y"]
|
||||
|
||||
@y.setter
|
||||
def y(self, val):
|
||||
self["y"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
x
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
y
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs):
|
||||
"""
|
||||
Construct a new Domain object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Domain`
|
||||
column
|
||||
If there is a layout grid, use the domain for this
|
||||
column in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
row
|
||||
If there is a layout grid, use the domain for this row
|
||||
in the grid for this geo subplot . Note that geo
|
||||
subplots are constrained by domain. In general, when
|
||||
`projection.scale` is set to 1. a map will fit either
|
||||
its x or y domain, but not both.
|
||||
x
|
||||
Sets the horizontal domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
y
|
||||
Sets the vertical domain of this geo subplot (in plot
|
||||
fraction). Note that geo subplots are constrained by
|
||||
domain. In general, when `projection.scale` is set to
|
||||
1. a map will fit either its x or y domain, but not
|
||||
both.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Domain
|
||||
"""
|
||||
super(Domain, self).__init__("domain")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.layout.geo.Domain
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Domain`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("column", None)
|
||||
_v = column if column is not None else _v
|
||||
if _v is not None:
|
||||
self["column"] = _v
|
||||
_v = arg.pop("row", None)
|
||||
_v = row if row is not None else _v
|
||||
if _v is not None:
|
||||
self["row"] = _v
|
||||
_v = arg.pop("x", None)
|
||||
_v = x if x is not None else _v
|
||||
if _v is not None:
|
||||
self["x"] = _v
|
||||
_v = arg.pop("y", None)
|
||||
_v = y if y is not None else _v
|
||||
if _v is not None:
|
||||
self["y"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
345
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_lataxis.py
Normal file
345
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_lataxis.py
Normal file
@ -0,0 +1,345 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Lataxis(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.lataxis"
|
||||
_valid_props = {
|
||||
"dtick",
|
||||
"gridcolor",
|
||||
"griddash",
|
||||
"gridwidth",
|
||||
"range",
|
||||
"showgrid",
|
||||
"tick0",
|
||||
}
|
||||
|
||||
# dtick
|
||||
# -----
|
||||
@property
|
||||
def dtick(self):
|
||||
"""
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
|
||||
The 'dtick' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["dtick"]
|
||||
|
||||
@dtick.setter
|
||||
def dtick(self, val):
|
||||
self["dtick"] = val
|
||||
|
||||
# gridcolor
|
||||
# ---------
|
||||
@property
|
||||
def gridcolor(self):
|
||||
"""
|
||||
Sets the graticule's stroke color.
|
||||
|
||||
The 'gridcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color:
|
||||
aliceblue, antiquewhite, aqua, aquamarine, azure,
|
||||
beige, bisque, black, blanchedalmond, blue,
|
||||
blueviolet, brown, burlywood, cadetblue,
|
||||
chartreuse, chocolate, coral, cornflowerblue,
|
||||
cornsilk, crimson, cyan, darkblue, darkcyan,
|
||||
darkgoldenrod, darkgray, darkgrey, darkgreen,
|
||||
darkkhaki, darkmagenta, darkolivegreen, darkorange,
|
||||
darkorchid, darkred, darksalmon, darkseagreen,
|
||||
darkslateblue, darkslategray, darkslategrey,
|
||||
darkturquoise, darkviolet, deeppink, deepskyblue,
|
||||
dimgray, dimgrey, dodgerblue, firebrick,
|
||||
floralwhite, forestgreen, fuchsia, gainsboro,
|
||||
ghostwhite, gold, goldenrod, gray, grey, green,
|
||||
greenyellow, honeydew, hotpink, indianred, indigo,
|
||||
ivory, khaki, lavender, lavenderblush, lawngreen,
|
||||
lemonchiffon, lightblue, lightcoral, lightcyan,
|
||||
lightgoldenrodyellow, lightgray, lightgrey,
|
||||
lightgreen, lightpink, lightsalmon, lightseagreen,
|
||||
lightskyblue, lightslategray, lightslategrey,
|
||||
lightsteelblue, lightyellow, lime, limegreen,
|
||||
linen, magenta, maroon, mediumaquamarine,
|
||||
mediumblue, mediumorchid, mediumpurple,
|
||||
mediumseagreen, mediumslateblue, mediumspringgreen,
|
||||
mediumturquoise, mediumvioletred, midnightblue,
|
||||
mintcream, mistyrose, moccasin, navajowhite, navy,
|
||||
oldlace, olive, olivedrab, orange, orangered,
|
||||
orchid, palegoldenrod, palegreen, paleturquoise,
|
||||
palevioletred, papayawhip, peachpuff, peru, pink,
|
||||
plum, powderblue, purple, red, rosybrown,
|
||||
royalblue, rebeccapurple, saddlebrown, salmon,
|
||||
sandybrown, seagreen, seashell, sienna, silver,
|
||||
skyblue, slateblue, slategray, slategrey, snow,
|
||||
springgreen, steelblue, tan, teal, thistle, tomato,
|
||||
turquoise, violet, wheat, white, whitesmoke,
|
||||
yellow, yellowgreen
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["gridcolor"]
|
||||
|
||||
@gridcolor.setter
|
||||
def gridcolor(self, val):
|
||||
self["gridcolor"] = val
|
||||
|
||||
# griddash
|
||||
# --------
|
||||
@property
|
||||
def griddash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'griddash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["griddash"]
|
||||
|
||||
@griddash.setter
|
||||
def griddash(self, val):
|
||||
self["griddash"] = val
|
||||
|
||||
# gridwidth
|
||||
# ---------
|
||||
@property
|
||||
def gridwidth(self):
|
||||
"""
|
||||
Sets the graticule's stroke width (in px).
|
||||
|
||||
The 'gridwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["gridwidth"]
|
||||
|
||||
@gridwidth.setter
|
||||
def gridwidth(self, val):
|
||||
self["gridwidth"] = val
|
||||
|
||||
# range
|
||||
# -----
|
||||
@property
|
||||
def range(self):
|
||||
"""
|
||||
Sets the range of this axis (in degrees), sets the map's
|
||||
clipped coordinates.
|
||||
|
||||
The 'range' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'range[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'range[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["range"]
|
||||
|
||||
@range.setter
|
||||
def range(self, val):
|
||||
self["range"] = val
|
||||
|
||||
# showgrid
|
||||
# --------
|
||||
@property
|
||||
def showgrid(self):
|
||||
"""
|
||||
Sets whether or not graticule are shown on the map.
|
||||
|
||||
The 'showgrid' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showgrid"]
|
||||
|
||||
@showgrid.setter
|
||||
def showgrid(self, val):
|
||||
self["showgrid"] = val
|
||||
|
||||
# tick0
|
||||
# -----
|
||||
@property
|
||||
def tick0(self):
|
||||
"""
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
The 'tick0' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tick0"]
|
||||
|
||||
@tick0.setter
|
||||
def tick0(self, val):
|
||||
self["tick0"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
dtick=None,
|
||||
gridcolor=None,
|
||||
griddash=None,
|
||||
gridwidth=None,
|
||||
range=None,
|
||||
showgrid=None,
|
||||
tick0=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Lataxis object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Lataxis`
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Lataxis
|
||||
"""
|
||||
super(Lataxis, self).__init__("lataxis")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.layout.geo.Lataxis
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("dtick", None)
|
||||
_v = dtick if dtick is not None else _v
|
||||
if _v is not None:
|
||||
self["dtick"] = _v
|
||||
_v = arg.pop("gridcolor", None)
|
||||
_v = gridcolor if gridcolor is not None else _v
|
||||
if _v is not None:
|
||||
self["gridcolor"] = _v
|
||||
_v = arg.pop("griddash", None)
|
||||
_v = griddash if griddash is not None else _v
|
||||
if _v is not None:
|
||||
self["griddash"] = _v
|
||||
_v = arg.pop("gridwidth", None)
|
||||
_v = gridwidth if gridwidth is not None else _v
|
||||
if _v is not None:
|
||||
self["gridwidth"] = _v
|
||||
_v = arg.pop("range", None)
|
||||
_v = range if range is not None else _v
|
||||
if _v is not None:
|
||||
self["range"] = _v
|
||||
_v = arg.pop("showgrid", None)
|
||||
_v = showgrid if showgrid is not None else _v
|
||||
if _v is not None:
|
||||
self["showgrid"] = _v
|
||||
_v = arg.pop("tick0", None)
|
||||
_v = tick0 if tick0 is not None else _v
|
||||
if _v is not None:
|
||||
self["tick0"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
345
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_lonaxis.py
Normal file
345
.venv/Lib/site-packages/plotly/graph_objs/layout/geo/_lonaxis.py
Normal file
@ -0,0 +1,345 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Lonaxis(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.lonaxis"
|
||||
_valid_props = {
|
||||
"dtick",
|
||||
"gridcolor",
|
||||
"griddash",
|
||||
"gridwidth",
|
||||
"range",
|
||||
"showgrid",
|
||||
"tick0",
|
||||
}
|
||||
|
||||
# dtick
|
||||
# -----
|
||||
@property
|
||||
def dtick(self):
|
||||
"""
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
|
||||
The 'dtick' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["dtick"]
|
||||
|
||||
@dtick.setter
|
||||
def dtick(self, val):
|
||||
self["dtick"] = val
|
||||
|
||||
# gridcolor
|
||||
# ---------
|
||||
@property
|
||||
def gridcolor(self):
|
||||
"""
|
||||
Sets the graticule's stroke color.
|
||||
|
||||
The 'gridcolor' property is a color and may be specified as:
|
||||
- A hex string (e.g. '#ff0000')
|
||||
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
|
||||
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
|
||||
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
|
||||
- A named CSS color:
|
||||
aliceblue, antiquewhite, aqua, aquamarine, azure,
|
||||
beige, bisque, black, blanchedalmond, blue,
|
||||
blueviolet, brown, burlywood, cadetblue,
|
||||
chartreuse, chocolate, coral, cornflowerblue,
|
||||
cornsilk, crimson, cyan, darkblue, darkcyan,
|
||||
darkgoldenrod, darkgray, darkgrey, darkgreen,
|
||||
darkkhaki, darkmagenta, darkolivegreen, darkorange,
|
||||
darkorchid, darkred, darksalmon, darkseagreen,
|
||||
darkslateblue, darkslategray, darkslategrey,
|
||||
darkturquoise, darkviolet, deeppink, deepskyblue,
|
||||
dimgray, dimgrey, dodgerblue, firebrick,
|
||||
floralwhite, forestgreen, fuchsia, gainsboro,
|
||||
ghostwhite, gold, goldenrod, gray, grey, green,
|
||||
greenyellow, honeydew, hotpink, indianred, indigo,
|
||||
ivory, khaki, lavender, lavenderblush, lawngreen,
|
||||
lemonchiffon, lightblue, lightcoral, lightcyan,
|
||||
lightgoldenrodyellow, lightgray, lightgrey,
|
||||
lightgreen, lightpink, lightsalmon, lightseagreen,
|
||||
lightskyblue, lightslategray, lightslategrey,
|
||||
lightsteelblue, lightyellow, lime, limegreen,
|
||||
linen, magenta, maroon, mediumaquamarine,
|
||||
mediumblue, mediumorchid, mediumpurple,
|
||||
mediumseagreen, mediumslateblue, mediumspringgreen,
|
||||
mediumturquoise, mediumvioletred, midnightblue,
|
||||
mintcream, mistyrose, moccasin, navajowhite, navy,
|
||||
oldlace, olive, olivedrab, orange, orangered,
|
||||
orchid, palegoldenrod, palegreen, paleturquoise,
|
||||
palevioletred, papayawhip, peachpuff, peru, pink,
|
||||
plum, powderblue, purple, red, rosybrown,
|
||||
royalblue, rebeccapurple, saddlebrown, salmon,
|
||||
sandybrown, seagreen, seashell, sienna, silver,
|
||||
skyblue, slateblue, slategray, slategrey, snow,
|
||||
springgreen, steelblue, tan, teal, thistle, tomato,
|
||||
turquoise, violet, wheat, white, whitesmoke,
|
||||
yellow, yellowgreen
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["gridcolor"]
|
||||
|
||||
@gridcolor.setter
|
||||
def gridcolor(self, val):
|
||||
self["gridcolor"] = val
|
||||
|
||||
# griddash
|
||||
# --------
|
||||
@property
|
||||
def griddash(self):
|
||||
"""
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
|
||||
The 'griddash' property is an enumeration that may be specified as:
|
||||
- One of the following dash styles:
|
||||
['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
|
||||
- A string containing a dash length list in pixels or percentages
|
||||
(e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
"""
|
||||
return self["griddash"]
|
||||
|
||||
@griddash.setter
|
||||
def griddash(self, val):
|
||||
self["griddash"] = val
|
||||
|
||||
# gridwidth
|
||||
# ---------
|
||||
@property
|
||||
def gridwidth(self):
|
||||
"""
|
||||
Sets the graticule's stroke width (in px).
|
||||
|
||||
The 'gridwidth' property is a number and may be specified as:
|
||||
- An int or float in the interval [0, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["gridwidth"]
|
||||
|
||||
@gridwidth.setter
|
||||
def gridwidth(self, val):
|
||||
self["gridwidth"] = val
|
||||
|
||||
# range
|
||||
# -----
|
||||
@property
|
||||
def range(self):
|
||||
"""
|
||||
Sets the range of this axis (in degrees), sets the map's
|
||||
clipped coordinates.
|
||||
|
||||
The 'range' property is an info array that may be specified as:
|
||||
|
||||
* a list or tuple of 2 elements where:
|
||||
(0) The 'range[0]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
(1) The 'range[1]' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
list
|
||||
"""
|
||||
return self["range"]
|
||||
|
||||
@range.setter
|
||||
def range(self, val):
|
||||
self["range"] = val
|
||||
|
||||
# showgrid
|
||||
# --------
|
||||
@property
|
||||
def showgrid(self):
|
||||
"""
|
||||
Sets whether or not graticule are shown on the map.
|
||||
|
||||
The 'showgrid' property must be specified as a bool
|
||||
(either True, or False)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool
|
||||
"""
|
||||
return self["showgrid"]
|
||||
|
||||
@showgrid.setter
|
||||
def showgrid(self, val):
|
||||
self["showgrid"] = val
|
||||
|
||||
# tick0
|
||||
# -----
|
||||
@property
|
||||
def tick0(self):
|
||||
"""
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
The 'tick0' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tick0"]
|
||||
|
||||
@tick0.setter
|
||||
def tick0(self, val):
|
||||
self["tick0"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
dtick=None,
|
||||
gridcolor=None,
|
||||
griddash=None,
|
||||
gridwidth=None,
|
||||
range=None,
|
||||
showgrid=None,
|
||||
tick0=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
Construct a new Lonaxis object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of
|
||||
:class:`plotly.graph_objs.layout.geo.Lonaxis`
|
||||
dtick
|
||||
Sets the graticule's longitude/latitude tick step.
|
||||
gridcolor
|
||||
Sets the graticule's stroke color.
|
||||
griddash
|
||||
Sets the dash style of lines. Set to a dash type string
|
||||
("solid", "dot", "dash", "longdash", "dashdot", or
|
||||
"longdashdot") or a dash length list in px (eg
|
||||
"5px,10px,2px,2px").
|
||||
gridwidth
|
||||
Sets the graticule's stroke width (in px).
|
||||
range
|
||||
Sets the range of this axis (in degrees), sets the
|
||||
map's clipped coordinates.
|
||||
showgrid
|
||||
Sets whether or not graticule are shown on the map.
|
||||
tick0
|
||||
Sets the graticule's starting tick longitude/latitude.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Lonaxis
|
||||
"""
|
||||
super(Lonaxis, self).__init__("lonaxis")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.layout.geo.Lonaxis
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("dtick", None)
|
||||
_v = dtick if dtick is not None else _v
|
||||
if _v is not None:
|
||||
self["dtick"] = _v
|
||||
_v = arg.pop("gridcolor", None)
|
||||
_v = gridcolor if gridcolor is not None else _v
|
||||
if _v is not None:
|
||||
self["gridcolor"] = _v
|
||||
_v = arg.pop("griddash", None)
|
||||
_v = griddash if griddash is not None else _v
|
||||
if _v is not None:
|
||||
self["griddash"] = _v
|
||||
_v = arg.pop("gridwidth", None)
|
||||
_v = gridwidth if gridwidth is not None else _v
|
||||
if _v is not None:
|
||||
self["gridwidth"] = _v
|
||||
_v = arg.pop("range", None)
|
||||
_v = range if range is not None else _v
|
||||
if _v is not None:
|
||||
self["range"] = _v
|
||||
_v = arg.pop("showgrid", None)
|
||||
_v = showgrid if showgrid is not None else _v
|
||||
if _v is not None:
|
||||
self["showgrid"] = _v
|
||||
_v = arg.pop("tick0", None)
|
||||
_v = tick0 if tick0 is not None else _v
|
||||
if _v is not None:
|
||||
self["tick0"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
@ -0,0 +1,311 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Projection(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo"
|
||||
_path_str = "layout.geo.projection"
|
||||
_valid_props = {"distance", "parallels", "rotation", "scale", "tilt", "type"}
|
||||
|
||||
# distance
|
||||
# --------
|
||||
@property
|
||||
def distance(self):
|
||||
"""
|
||||
For satellite projection type only. Sets the distance from the
|
||||
center of the sphere to the point of view as a proportion of
|
||||
the sphere’s radius.
|
||||
|
||||
The 'distance' property is a number and may be specified as:
|
||||
- An int or float in the interval [1.001, inf]
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["distance"]
|
||||
|
||||
@distance.setter
|
||||
def distance(self, val):
|
||||
self["distance"] = val
|
||||
|
||||
# parallels
|
||||
# ---------
|
||||
@property
|
||||
def parallels(self):
|
||||
"""
|
||||
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
|
||||
"""
|
||||
return self["parallels"]
|
||||
|
||||
@parallels.setter
|
||||
def parallels(self, val):
|
||||
self["parallels"] = val
|
||||
|
||||
# rotation
|
||||
# --------
|
||||
@property
|
||||
def rotation(self):
|
||||
"""
|
||||
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
|
||||
"""
|
||||
return self["rotation"]
|
||||
|
||||
@rotation.setter
|
||||
def rotation(self, val):
|
||||
self["rotation"] = val
|
||||
|
||||
# scale
|
||||
# -----
|
||||
@property
|
||||
def scale(self):
|
||||
"""
|
||||
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
|
||||
"""
|
||||
return self["scale"]
|
||||
|
||||
@scale.setter
|
||||
def scale(self, val):
|
||||
self["scale"] = val
|
||||
|
||||
# tilt
|
||||
# ----
|
||||
@property
|
||||
def tilt(self):
|
||||
"""
|
||||
For satellite projection type only. Sets the tilt angle of
|
||||
perspective projection.
|
||||
|
||||
The 'tilt' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["tilt"]
|
||||
|
||||
@tilt.setter
|
||||
def tilt(self, val):
|
||||
self["tilt"] = val
|
||||
|
||||
# type
|
||||
# ----
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
Sets the projection type.
|
||||
|
||||
The 'type' property is an enumeration that may be specified as:
|
||||
- One of the following enumeration values:
|
||||
['airy', 'aitoff', 'albers', 'albers usa', 'august',
|
||||
'azimuthal equal area', 'azimuthal equidistant', 'baker',
|
||||
'bertin1953', 'boggs', 'bonne', 'bottomley', 'bromley',
|
||||
'collignon', 'conic conformal', 'conic equal area', 'conic
|
||||
equidistant', 'craig', 'craster', 'cylindrical equal
|
||||
area', 'cylindrical stereographic', 'eckert1', 'eckert2',
|
||||
'eckert3', 'eckert4', 'eckert5', 'eckert6', 'eisenlohr',
|
||||
'equirectangular', 'fahey', 'foucaut', 'foucaut
|
||||
sinusoidal', 'ginzburg4', 'ginzburg5', 'ginzburg6',
|
||||
'ginzburg8', 'ginzburg9', 'gnomonic', 'gringorten',
|
||||
'gringorten quincuncial', 'guyou', 'hammer', 'hill',
|
||||
'homolosine', 'hufnagel', 'hyperelliptical',
|
||||
'kavrayskiy7', 'lagrange', 'larrivee', 'laskowski',
|
||||
'loximuthal', 'mercator', 'miller', 'mollweide', 'mt flat
|
||||
polar parabolic', 'mt flat polar quartic', 'mt flat polar
|
||||
sinusoidal', 'natural earth', 'natural earth1', 'natural
|
||||
earth2', 'nell hammer', 'nicolosi', 'orthographic',
|
||||
'patterson', 'peirce quincuncial', 'polyconic',
|
||||
'rectangular polyconic', 'robinson', 'satellite', 'sinu
|
||||
mollweide', 'sinusoidal', 'stereographic', 'times',
|
||||
'transverse mercator', 'van der grinten', 'van der
|
||||
grinten2', 'van der grinten3', 'van der grinten4',
|
||||
'wagner4', 'wagner6', 'wiechel', 'winkel tripel',
|
||||
'winkel3']
|
||||
|
||||
Returns
|
||||
-------
|
||||
Any
|
||||
"""
|
||||
return self["type"]
|
||||
|
||||
@type.setter
|
||||
def type(self, val):
|
||||
self["type"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
distance
|
||||
For satellite projection type only. Sets the distance
|
||||
from the center of the sphere to the point of view as a
|
||||
proportion of the sphere’s radius.
|
||||
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.
|
||||
tilt
|
||||
For satellite projection type only. Sets the tilt angle
|
||||
of perspective projection.
|
||||
type
|
||||
Sets the projection type.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
arg=None,
|
||||
distance=None,
|
||||
parallels=None,
|
||||
rotation=None,
|
||||
scale=None,
|
||||
tilt=None,
|
||||
type=None,
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
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`
|
||||
distance
|
||||
For satellite projection type only. Sets the distance
|
||||
from the center of the sphere to the point of view as a
|
||||
proportion of the sphere’s radius.
|
||||
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.
|
||||
tilt
|
||||
For satellite projection type only. Sets the tilt angle
|
||||
of perspective projection.
|
||||
type
|
||||
Sets the projection type.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Projection
|
||||
"""
|
||||
super(Projection, self).__init__("projection")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The 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`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("distance", None)
|
||||
_v = distance if distance is not None else _v
|
||||
if _v is not None:
|
||||
self["distance"] = _v
|
||||
_v = arg.pop("parallels", None)
|
||||
_v = parallels if parallels is not None else _v
|
||||
if _v is not None:
|
||||
self["parallels"] = _v
|
||||
_v = arg.pop("rotation", None)
|
||||
_v = rotation if rotation is not None else _v
|
||||
if _v is not None:
|
||||
self["rotation"] = _v
|
||||
_v = arg.pop("scale", None)
|
||||
_v = scale if scale is not None else _v
|
||||
if _v is not None:
|
||||
self["scale"] = _v
|
||||
_v = arg.pop("tilt", None)
|
||||
_v = tilt if tilt is not None else _v
|
||||
if _v is not None:
|
||||
self["tilt"] = _v
|
||||
_v = arg.pop("type", None)
|
||||
_v = type if type is not None else _v
|
||||
if _v is not None:
|
||||
self["type"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
@ -0,0 +1,11 @@
|
||||
import sys
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if sys.version_info < (3, 7) or TYPE_CHECKING:
|
||||
from ._rotation import Rotation
|
||||
else:
|
||||
from _plotly_utils.importers import relative_import
|
||||
|
||||
__all__, __getattr__, __dir__ = relative_import(
|
||||
__name__, [], ["._rotation.Rotation"]
|
||||
)
|
@ -0,0 +1,161 @@
|
||||
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
|
||||
import copy as _copy
|
||||
|
||||
|
||||
class Rotation(_BaseLayoutHierarchyType):
|
||||
|
||||
# class properties
|
||||
# --------------------
|
||||
_parent_path_str = "layout.geo.projection"
|
||||
_path_str = "layout.geo.projection.rotation"
|
||||
_valid_props = {"lat", "lon", "roll"}
|
||||
|
||||
# lat
|
||||
# ---
|
||||
@property
|
||||
def lat(self):
|
||||
"""
|
||||
Rotates the map along meridians (in degrees North).
|
||||
|
||||
The 'lat' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lat"]
|
||||
|
||||
@lat.setter
|
||||
def lat(self, val):
|
||||
self["lat"] = val
|
||||
|
||||
# lon
|
||||
# ---
|
||||
@property
|
||||
def lon(self):
|
||||
"""
|
||||
Rotates the map along parallels (in degrees East). Defaults to
|
||||
the center of the `lonaxis.range` values.
|
||||
|
||||
The 'lon' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["lon"]
|
||||
|
||||
@lon.setter
|
||||
def lon(self, val):
|
||||
self["lon"] = val
|
||||
|
||||
# roll
|
||||
# ----
|
||||
@property
|
||||
def roll(self):
|
||||
"""
|
||||
Roll the map (in degrees) For example, a roll of 180 makes the
|
||||
map appear upside down.
|
||||
|
||||
The 'roll' property is a number and may be specified as:
|
||||
- An int or float
|
||||
|
||||
Returns
|
||||
-------
|
||||
int|float
|
||||
"""
|
||||
return self["roll"]
|
||||
|
||||
@roll.setter
|
||||
def roll(self, val):
|
||||
self["roll"] = val
|
||||
|
||||
# Self properties description
|
||||
# ---------------------------
|
||||
@property
|
||||
def _prop_descriptions(self):
|
||||
return """\
|
||||
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.
|
||||
"""
|
||||
|
||||
def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs):
|
||||
"""
|
||||
Construct a new Rotation object
|
||||
|
||||
Parameters
|
||||
----------
|
||||
arg
|
||||
dict of properties compatible with this constructor or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.pro
|
||||
jection.Rotation`
|
||||
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
|
||||
-------
|
||||
Rotation
|
||||
"""
|
||||
super(Rotation, self).__init__("rotation")
|
||||
|
||||
if "_parent" in kwargs:
|
||||
self._parent = kwargs["_parent"]
|
||||
return
|
||||
|
||||
# Validate arg
|
||||
# ------------
|
||||
if arg is None:
|
||||
arg = {}
|
||||
elif isinstance(arg, self.__class__):
|
||||
arg = arg.to_plotly_json()
|
||||
elif isinstance(arg, dict):
|
||||
arg = _copy.copy(arg)
|
||||
else:
|
||||
raise ValueError(
|
||||
"""\
|
||||
The first argument to the plotly.graph_objs.layout.geo.projection.Rotation
|
||||
constructor must be a dict or
|
||||
an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`"""
|
||||
)
|
||||
|
||||
# Handle skip_invalid
|
||||
# -------------------
|
||||
self._skip_invalid = kwargs.pop("skip_invalid", False)
|
||||
self._validate = kwargs.pop("_validate", True)
|
||||
|
||||
# Populate data dict with properties
|
||||
# ----------------------------------
|
||||
_v = arg.pop("lat", None)
|
||||
_v = lat if lat is not None else _v
|
||||
if _v is not None:
|
||||
self["lat"] = _v
|
||||
_v = arg.pop("lon", None)
|
||||
_v = lon if lon is not None else _v
|
||||
if _v is not None:
|
||||
self["lon"] = _v
|
||||
_v = arg.pop("roll", None)
|
||||
_v = roll if roll is not None else _v
|
||||
if _v is not None:
|
||||
self["roll"] = _v
|
||||
|
||||
# Process unknown kwargs
|
||||
# ----------------------
|
||||
self._process_kwargs(**dict(arg, **kwargs))
|
||||
|
||||
# Reset skip_invalid
|
||||
# ------------------
|
||||
self._skip_invalid = False
|
Reference in New Issue
Block a user