This commit is contained in:
2025-09-07 22:09:54 +02:00
parent e1b817252c
commit 2fc0d000b6
7796 changed files with 2159515 additions and 933 deletions

View File

@ -0,0 +1,24 @@
import sys
from typing import TYPE_CHECKING
if 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",
],
)

View File

@ -0,0 +1,115 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Center(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo"
_path_str = "layout.geo.center"
_valid_props = {"lat", "lon"}
@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
@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
@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().__init__("center")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("lat", arg, lat)
self._set_property("lon", arg, lon)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False

View File

@ -0,0 +1,204 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Domain(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo"
_path_str = "layout.geo.domain"
_valid_props = {"column", "row", "x", "y"}
@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
@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
@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
@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
@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().__init__("domain")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("column", arg, column)
self._set_property("row", arg, row)
self._set_property("x", arg, x)
self._set_property("y", arg, y)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False

View File

@ -0,0 +1,258 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Lataxis(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo"
_path_str = "layout.geo.lataxis"
_valid_props = {
"dtick",
"gridcolor",
"griddash",
"gridwidth",
"range",
"showgrid",
"tick0",
}
@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
@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: see https://plotly.com/python/css-colors/ for a list
Returns
-------
str
"""
return self["gridcolor"]
@gridcolor.setter
def gridcolor(self, val):
self["gridcolor"] = val
@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
@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
@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
@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
@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
@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().__init__("lataxis")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("dtick", arg, dtick)
self._set_property("gridcolor", arg, gridcolor)
self._set_property("griddash", arg, griddash)
self._set_property("gridwidth", arg, gridwidth)
self._set_property("range", arg, range)
self._set_property("showgrid", arg, showgrid)
self._set_property("tick0", arg, tick0)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False

View File

@ -0,0 +1,258 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Lonaxis(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo"
_path_str = "layout.geo.lonaxis"
_valid_props = {
"dtick",
"gridcolor",
"griddash",
"gridwidth",
"range",
"showgrid",
"tick0",
}
@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
@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: see https://plotly.com/python/css-colors/ for a list
Returns
-------
str
"""
return self["gridcolor"]
@gridcolor.setter
def gridcolor(self, val):
self["gridcolor"] = val
@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
@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
@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
@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
@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
@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().__init__("lonaxis")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("dtick", arg, dtick)
self._set_property("gridcolor", arg, gridcolor)
self._set_property("griddash", arg, griddash)
self._set_property("gridwidth", arg, gridwidth)
self._set_property("range", arg, range)
self._set_property("showgrid", arg, showgrid)
self._set_property("tick0", arg, tick0)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False

View File

@ -0,0 +1,251 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Projection(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo"
_path_str = "layout.geo.projection"
_valid_props = {"distance", "parallels", "rotation", "scale", "tilt", "type"}
@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 spheres 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
@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
@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
Returns
-------
plotly.graph_objs.layout.geo.projection.Rotation
"""
return self["rotation"]
@rotation.setter
def rotation(self, val):
self["rotation"] = val
@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
@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
@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',
'equal earth', '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
@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 spheres 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 spheres 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().__init__("projection")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("distance", arg, distance)
self._set_property("parallels", arg, parallels)
self._set_property("rotation", arg, rotation)
self._set_property("scale", arg, scale)
self._set_property("tilt", arg, tilt)
self._set_property("type", arg, type)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False

View File

@ -0,0 +1,11 @@
import sys
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from ._rotation import Rotation
else:
from _plotly_utils.importers import relative_import
__all__, __getattr__, __dir__ = relative_import(
__name__, [], ["._rotation.Rotation"]
)

View File

@ -0,0 +1,129 @@
# --- THIS FILE IS AUTO-GENERATED ---
# Modifications will be overwitten the next time code generation run.
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Rotation(_BaseLayoutHierarchyType):
_parent_path_str = "layout.geo.projection"
_path_str = "layout.geo.projection.rotation"
_valid_props = {"lat", "lon", "roll"}
@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
@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
@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
@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().__init__("rotation")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
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`""")
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
self._set_property("lat", arg, lat)
self._set_property("lon", arg, lon)
self._set_property("roll", arg, roll)
self._process_kwargs(**dict(arg, **kwargs))
self._skip_invalid = False