From 400e5171391a9ed7341d21ac5ae0f48151ce9f6b Mon Sep 17 00:00:00 2001 From: Andrew Duberstein Date: Wed, 18 Sep 2019 16:43:18 -0700 Subject: [PATCH] Set default pydeck notebook width to 700px --- bindings/python/pydeck/docs/deck.md | 14 +++++++++++--- bindings/python/pydeck/pydeck/bindings/deck.py | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bindings/python/pydeck/docs/deck.md b/bindings/python/pydeck/docs/deck.md index a07879371b1..655cab16f57 100644 --- a/bindings/python/pydeck/docs/deck.md +++ b/bindings/python/pydeck/docs/deck.md @@ -28,7 +28,7 @@ Requires a Mapbox API token to display a basemap, see notes below. `map_style` : `str`, default `"mapbox://styles/mapbox/dark-v9"` URI for Mapbox basemap style -`mapbox_key` : `str`, default None +`mapbox_key` : `str`, default `None` Read on initialization from the MAPBOX_API_KEY environment variable. Defaults to None if not set. If not using a basemap, you can set this value to `None`. See https://docs.mapbox.com/help/how-mapbox-works/access-tokens/#mapbox-account-dashboard @@ -37,6 +37,12 @@ Requires a Mapbox API token to display a basemap, see notes below. Initial camera angle relative to the map, defaults to a fully zoomed out 0, 0-centered map with 0 pitch and bearing To compute a viewport from data, see `pydeck.data\_utils.compute\_viewport` +`height` : int, default `500` + Height of visualization, in pixels + +`width` : int, default `750` + Width of visualization, in pixels + ## pydeck.Deck.show ```python @@ -88,12 +94,14 @@ not render. `notebook_display` : `bool`, default `True` Attempts to display the HTML output in an iframe if True. Only works in a Jupyter notebook. -`iframe_width` : `int`, default `500` +`iframe_width` : `int`, default `None` Height of Jupyter notebook iframe in pixels, if rendered in a Jupyter notebook. -`iframe_height` : `int`, default `500` +`iframe_height` : `int`, default `None` Width of Jupyter notebook iframe in pixels, if rendered in a Jupyter notebook. + + #### Returns `str` : A string path to the HTML file diff --git a/bindings/python/pydeck/pydeck/bindings/deck.py b/bindings/python/pydeck/pydeck/bindings/deck.py index fc853c1903f..57997a46568 100644 --- a/bindings/python/pydeck/pydeck/bindings/deck.py +++ b/bindings/python/pydeck/pydeck/bindings/deck.py @@ -18,7 +18,7 @@ def __init__( map_style='mapbox://styles/mapbox/dark-v9', mapbox_key=None, initial_view_state=ViewState(), - width=500, + width=750, height=500, ): """Constructor for a Deck object, similar to the `Deck`_ class from deck.gl @@ -41,7 +41,7 @@ def __init__( See https://docs.mapbox.com/help/how-mapbox-works/access-tokens/#mapbox-account-dashboard height : int, default 500 Height of visualization, in pixels - width : int, default 500 + width : int, default 750 Width of visualization, in pixels