From 6d38c8c8c69eef353fe37008e05cbcfd9ecf8de0 Mon Sep 17 00:00:00 2001 From: shaido987 Date: Thu, 9 Sep 2021 16:34:08 +0800 Subject: [PATCH 01/15] Fix typo in marker-style.md Diamond is mentioned twice in the basic symbol list. --- doc/python/marker-style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/marker-style.md b/doc/python/marker-style.md index abb4a33249..398a9d70c9 100644 --- a/doc/python/marker-style.md +++ b/doc/python/marker-style.md @@ -322,7 +322,7 @@ fig.show() The `marker_symbol` attribute allows you to choose from a wide array of symbols to represent markers in your figures. -The basic symbols are: `circle`, `square`, `diamond`, `cross`, `x`, `triangle`, `pentagon`, `hexagram`, `star`, `diamond`, `hourglass`, `bowtie`, `asterisk`, `hash`, `y`, and `line`. +The basic symbols are: `circle`, `square`, `diamond`, `cross`, `x`, `triangle`, `pentagon`, `hexagram`, `star`, `hourglass`, `bowtie`, `asterisk`, `hash`, `y`, and `line`. Each basic symbol is also represented by a number. Adding 100 to that number is equivalent to appending the suffix "-open" to a symbol name. Adding 200 is equivalent to appending "-dot" to a symbol name. Adding 300 is equivalent to appending "-open-dot" or "dot-open" to a symbol name. From 580c5e63d1029da0577bbe4e67258b189a26afd7 Mon Sep 17 00:00:00 2001 From: Farzin Ghanbari Date: Tue, 12 Oct 2021 12:43:14 +0330 Subject: [PATCH 02/15] Update 3d-scatter-plots.md --- doc/python/3d-scatter-plots.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/python/3d-scatter-plots.md b/doc/python/3d-scatter-plots.md index b8e1b8714f..f03b61061b 100644 --- a/doc/python/3d-scatter-plots.md +++ b/doc/python/3d-scatter-plots.md @@ -70,6 +70,7 @@ fig = px.scatter_3d(df, x='sepal_length', y='sepal_width', z='petal_width', # tight layout fig.update_layout(margin=dict(l=0, r=0, b=0, t=0)) +fig.show() ``` #### 3d scatter plots in Dash From ddba96e47412c6326f9e2aa8b25f4f8fc1eeae23 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 16 Aug 2022 17:18:48 -0400 Subject: [PATCH 03/15] Update what_about_dash.md --- doc/what_about_dash.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/what_about_dash.md b/doc/what_about_dash.md index bef6ac916d..696aa93a63 100644 --- a/doc/what_about_dash.md +++ b/doc/what_about_dash.md @@ -15,11 +15,9 @@ fig = go.Figure() # or any Plotly Express function e.g. px.bar(...) # fig.add_trace( ... ) # fig.update_layout( ... ) -import dash -import dash_core_components as dcc -import dash_html_components as html +from dash import Dash, dcc, html -app = dash.Dash() +app = Dash() app.layout = html.Div([ dcc.Graph(figure=fig) ]) From ae378e90a71ee6bedf2e6200d5c4134d915c24e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20DIDIER?= <73602526+sdidier-dev@users.noreply.github.com> Date: Sat, 20 Aug 2022 20:56:58 +0200 Subject: [PATCH 04/15] Improve syntax and consistency --- doc/python/configuration-options.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/doc/python/configuration-options.md b/doc/python/configuration-options.md index f0590762fe..52dcc8764e 100644 --- a/doc/python/configuration-options.md +++ b/doc/python/configuration-options.md @@ -53,7 +53,7 @@ import plotly.graph_objects as go fig = go.Figure() -config = dict({'scrollZoom': True}) +config = {'scrollZoom': True} fig.add_trace( go.Scatter( @@ -244,6 +244,8 @@ fig.add_trace( y=[1, 3, 1])) fig.update_layout(modebar_remove=['zoom', 'pan']) + +fig.show() ``` ### Add optional shape-drawing buttons to modebar @@ -253,16 +255,19 @@ fig.update_layout(modebar_remove=['zoom', 'pan']) Some modebar buttons of Cartesian plots are optional and have to be added explicitly, using the `modeBarButtonsToAdd` config attribute. These buttons are used for drawing or erasing shapes. See [the tutorial on shapes and shape drawing](python/shapes#drawing-shapes-on-cartesian-plots) for more details. ```python -import plotly.graph_objects as go import plotly.express as px + df = px.data.iris() + fig = px.scatter(df, x='petal_width', y='sepal_length', color='species') + fig.update_layout( dragmode='drawopenpath', newshape_line_color='cyan', title_text='Draw a path to separate versicolor and virginica' ) -fig.show(config={'modeBarButtonsToAdd':['drawline', + +fig.show(config={'modeBarButtonsToAdd': ['drawline', 'drawopenpath', 'drawclosedpath', 'drawcircle', @@ -276,10 +281,12 @@ fig.show(config={'modeBarButtonsToAdd':['drawline', The `layout.modebar.add` attribute can be used instead of the approach used above: ```python -import plotly.graph_objects as go import plotly.express as px + df = px.data.iris() + fig = px.scatter(df, x='petal_width', y='sepal_length', color='species') + fig.update_layout( dragmode='drawopenpath', newshape_line_color='cyan', @@ -292,6 +299,8 @@ fig.update_layout( 'eraseshape' ] ) + +fig.show() ``` ### Double-Click Delay @@ -304,12 +313,12 @@ import plotly.graph_objects as go config = {'doubleClickDelay': 1000} fig = go.Figure(go.Bar( - y = [3, 5, 3, 2], - x = ["2019-09-02", "2019-10-10", "2019-11-12", "2019-12-22"], - texttemplate = "%{label}", - textposition = "inside")) + y=[3, 5, 3, 2], + x=["2019-09-02", "2019-10-10", "2019-11-12", "2019-12-22"], + texttemplate="%{label}", + textposition="inside")) -fig.update_layout(xaxis = {'type': 'date'}) +fig.update_layout(xaxis={'type': 'date'}) fig.show(config=config) ``` @@ -320,4 +329,4 @@ The same configuration dictionary that you pass to the `config` parameter of the #### Reference -See config options at https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L6 +See config options at https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js From 1c1d63b08231076ff166040112f5dc517f9ea01d Mon Sep 17 00:00:00 2001 From: Ryan Folks <47860863+RyanDoesMath@users.noreply.github.com> Date: Mon, 22 May 2023 09:22:58 -0400 Subject: [PATCH 05/15] Fixed a typo in figure-factory-subplots.md Fixed the world's smallest typo in the doc file for figure factory. --- doc/python/figure-factory-subplots.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/figure-factory-subplots.md b/doc/python/figure-factory-subplots.md index eaaa55b797..3a6c837692 100644 --- a/doc/python/figure-factory-subplots.md +++ b/doc/python/figure-factory-subplots.md @@ -61,7 +61,7 @@ Y, X = np.meshgrid(x, y) u = -1 - X**2 + Y v = 1 + X - Y**2 -fig2 = ff.create_streamline(x, y, u, v, arrow_scale=.1, name='Steamline') +fig2 = ff.create_streamline(x, y, u, v, arrow_scale=.1, name='Streamline') ``` Edit the figures' x and y axes attributes to create subplots: From dc2453ede77e663d730c65326ff9260087f86ac5 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 12 Jun 2023 13:23:07 -0400 Subject: [PATCH 06/15] Update legend.md --- doc/python/legend.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/python/legend.md b/doc/python/legend.md index 9ca47748be..5ff1566ec0 100644 --- a/doc/python/legend.md +++ b/doc/python/legend.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.14.5 + jupytext_version: 1.14.6 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.11 + version: 3.10.8 plotly: description: How to configure and style the legend in Plotly with Python. display_as: file_settings @@ -580,7 +580,7 @@ fig.show() By default, all traces appear on one legend. To have multiple legends, specify an alternative legend for a trace using the `legend` property. For a second legend, set `legend="legend2"`. Specify more legends with `legend="legend3"`, `legend="legend4"` and so on. -In this example, the last two scatter traces display on the second legend, "legend2". On the figure's layout, we then position and style this legend to display on the right of the graph below the first legend. +In this example, the last two scatter traces display on the second legend, "legend2". On the figure's layout, we then position and style each legend. ```python @@ -622,20 +622,25 @@ fig = go.Figure( ], layout=dict( title="GDP Per Capita", - legend={"title": "By country", "bgcolor": "Orange",}, + legend={ + "title": "By country", + "xref": "container", + "yref": "container", + "y": 0.65, + "bgcolor": "Orange", + }, legend2={ - "x": 1.155, - "y": 0.55, - "xanchor": "right", - "yanchor": "middle", + "title": "By continent", + "xref": "container", + "yref": "container", + "y": 0.85, "bgcolor": "Gold", - "title": {"text": "By continent"}, + }, ), ) fig.show() - ``` ### Positioning Legends From 50a2948ffae986989f84f9cb6371fe5ac624d205 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 12 Jun 2023 13:53:28 -0400 Subject: [PATCH 07/15] Update colorscales.md --- doc/python/colorscales.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/python/colorscales.md b/doc/python/colorscales.md index fe2ac57422..7e2aeb9ad7 100644 --- a/doc/python/colorscales.md +++ b/doc/python/colorscales.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.14.5 + jupytext_version: 1.14.6 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.11 + version: 3.10.8 plotly: description: How to set, create and control continuous color scales and color bars in scatter, bar, map and heatmap figures. @@ -307,11 +307,11 @@ Using `labelalias` you can replace some labels on the `colorbar` with alternativ ```python import plotly.graph_objects as go -import urllib +import urllib.request as request import json # Load heatmap data -response = urllib.request.urlopen( +response = request.urlopen( "https://raw.githubusercontent.com/plotly/datasets/master/custom_heatmap_colorscale.json") dataset = json.load(response) From a3d540d4b83e127254b909aa0c9745efb6ec7fa9 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 12 Jun 2023 13:55:40 -0400 Subject: [PATCH 08/15] Update shapes.md --- doc/python/shapes.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/python/shapes.md b/doc/python/shapes.md index f44c6050c4..272c6c1e3b 100644 --- a/doc/python/shapes.md +++ b/doc/python/shapes.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.14.5 + jupytext_version: 1.14.6 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.8.8 + version: 3.10.8 plotly: description: How to make SVG shapes in python. Examples of lines, circle, rectangle, and path. @@ -919,7 +919,7 @@ fig.show() Use `texttemplate` to add text with variables to shapes. `texttemplate` uses d3 number and date formatting and supports raw variables, which use the raw data from the shape definition, and some calculated variables. Add a variable with "%{variable}". -This example adds the raw variables `x0` and `y0` to a rectangle and shows the calculated variables `height`, `slope`, and `width` on three other shapes. +This example adds the raw variables `x0` and `y0` to a rectangle and shows the calculated variables `height`, `slope`, `length`, and `width` on three other shapes. For a complete list of available variables, see the [Shape Reference Docs](https://plotly.com/python/reference/layout/shapes/). @@ -955,9 +955,12 @@ fig.add_shape( x0=3, y0=0.5, x1=5, - y1=0.8, + y1=1.5, line_width=3, - label=dict(texttemplate="Slope: %{slope:.3f}", font=dict(size=20)), + label=dict( + texttemplate="Slope of %{slope:.3f} and length of %{length:.3f}", + font=dict(size=20), + ), ) fig.add_shape( type="rect", From f150ff27eb92b99810ae26750cb892d0b7c284ed Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Wed, 14 Jun 2023 10:58:52 -0400 Subject: [PATCH 09/15] Update lines-on-mapbox.md --- doc/python/lines-on-mapbox.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/lines-on-mapbox.md b/doc/python/lines-on-mapbox.md index 1a56296724..3d7bc95317 100644 --- a/doc/python/lines-on-mapbox.md +++ b/doc/python/lines-on-mapbox.md @@ -37,7 +37,7 @@ jupyter: To plot on Mapbox maps with Plotly you _may_ need a Mapbox account and a public [Mapbox Access Token](https://www.mapbox.com/studio). See our [Mapbox Map Layers](/python/mapbox-layers/) documentation for more information. -To draw a line on your map, you either can use [`px.line_mapbox()`](https://www.plotly.express/plotly_express/#plotly_express.line_mapbox) in Plotly Express, or [`Scattermapbox`](https://plotly.com/python/reference/scattermapbox/) traces. Below we show you how to draw a line on Mapbox using Plotly Express. +To draw a line on your map, you either can use [`px.line_mapbox()`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox.html) in Plotly Express, or [`Scattermapbox`](https://plotly.com/python/reference/scattermapbox/) traces. Below we show you how to draw a line on Mapbox using Plotly Express. ### Lines on Mapbox maps using Plotly Express @@ -132,5 +132,5 @@ fig.show() #### Reference -See [function reference for `px.(line_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox) or +See [function reference for `px.(line_mapbox)`](https://plotly.com/python-api-reference/generated/plotly.express.line_mapbox) or https://plotly.com/python/reference/scattermapbox/ for more information about mapbox and their attribute options. From 2130c10c3a52ca4231e55eb764b5d3f91db2dcfe Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Wed, 14 Jun 2023 10:58:58 -0400 Subject: [PATCH 10/15] Update parallel-categories-diagram.md --- doc/python/parallel-categories-diagram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/parallel-categories-diagram.md b/doc/python/parallel-categories-diagram.md index 11ac1f3e41..51ecd4168b 100644 --- a/doc/python/parallel-categories-diagram.md +++ b/doc/python/parallel-categories-diagram.md @@ -45,7 +45,7 @@ For other representations of multivariate data, also see [parallel coordinates]( This example visualizes the restaurant bills of a sample of 244 people. Hovering over a category rectangle (sex, smoker, etc) displays a tooltip with the number of people with that single trait. Hovering over a ribbon in the diagram displays a tooltip with the number of people with a particular combination of the five traits connected by the ribbon. -By default, `px.parallel_categories` will display any column in the `data_frame` that has a cardinality (or number of unique values) of less than 50. This can be overridden either by passing in a specific list of columns to `dimensions` or by setting `dimensions_max_cardinality` to something other than 50. +By default, `px.parallel_categories` will display any column in the `data_frame` that has a cardinality (or number of unique values) of less than 50. This can be overridden either by passing in a specific list of columns to `dimensions` or by setting `dimensions_max_cardinality` to something other than 50. ```python import plotly.express as px @@ -58,7 +58,7 @@ fig.show() #### Style Diagram -In this example `dimensions` represents a list of stings or the columns of data frame, and `labels` is a dictionary with string keys (column name) and string values ('desired label to be displayed'). See [Plotly express reference page](https://www.plotly.express/plotly_express/#plotly_express.parallel_categories) for more information. +In this example `dimensions` represents a list of stings or the columns of data frame, and `labels` is a dictionary with string keys (column name) and string values ('desired label to be displayed'). See [Plotly express reference page](https://plotly.com/python-api-reference/generated/plotly.express.parallel_categories) for more information. ```python import plotly.express as px From 57be35ca17ccbfc996f68d7ba9a06b522e5ad34b Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Wed, 14 Jun 2023 11:01:31 -0400 Subject: [PATCH 11/15] Update axes.md --- doc/python/axes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/axes.md b/doc/python/axes.md index b87e156aac..6b53230ad1 100644 --- a/doc/python/axes.md +++ b/doc/python/axes.md @@ -33,7 +33,7 @@ jupyter: thumbnail: thumbnail/axes.png --- -This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](python/reference/layout/xaxis/). +This tutorial explain how to set the properties of [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots), namely [`go.layout.XAxis`](/python/reference/layout/xaxis/) and [`go.layout.YAxis`](/python/reference/layout/xaxis/). Other kinds of subplots and axes are described in other tutorials: @@ -154,7 +154,7 @@ fig.update_yaxes(ticklabelposition="inside top", title=None) fig.show() ``` -#### Specifying Label Aliases +#### Specifying Label Aliases *New in 5.14* From 8e48b63c1caf4dd7a45fba4e22c6cb5bb6b3b4b4 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 15 Jun 2023 20:55:28 -0400 Subject: [PATCH 12/15] Update shapes.md --- doc/python/shapes.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/doc/python/shapes.md b/doc/python/shapes.md index 272c6c1e3b..ca28a81bbb 100644 --- a/doc/python/shapes.md +++ b/doc/python/shapes.md @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.8 + version: 3.10.10 plotly: description: How to make SVG shapes in python. Examples of lines, circle, rectangle, and path. @@ -917,18 +917,27 @@ fig.show() *New in 5.15* -Use `texttemplate` to add text with variables to shapes. `texttemplate` uses d3 number and date formatting and supports raw variables, which use the raw data from the shape definition, and some calculated variables. Add a variable with "%{variable}". +Use `texttemplate` to add text with variables to shapes. You have access to raw variables (`x0`, `x1`, `y0`, `y1`), which use raw data values from the shape definition, and the following calculated variables: -This example adds the raw variables `x0` and `y0` to a rectangle and shows the calculated variables `height`, `slope`, `length`, and `width` on three other shapes. +- `xcenter`: (x0 + x1) / 2 +- `ycenter`: (y0 + y1) / 2 +- `dx`: x1 - x0 +- `dy`: y1 - y0 +- `width`: abs(x1 - x0) +- `height`: abs(y1 - y0) +- `length` (for lines only): sqrt(dx^2 + dy^2) +- `slope`: (y1 - y0) / (x1 - x0) -For a complete list of available variables, see the [Shape Reference Docs](https://plotly.com/python/reference/layout/shapes/). +`texttemplate` supports d3 number and date formatting. +Add a variable with "%{variable}". This example adds the raw variables `x0` and `y0` to a rectangle and shows the calculated variables `height`, `slope`, `length`, and `width` on three other shapes. ```python import plotly.graph_objects as go fig = go.Figure() + fig.add_shape( type="rect", fillcolor="MediumSlateBlue", @@ -983,15 +992,31 @@ fig.show() *New in 5.15* -Use `texttemplate` to add text with variables to new shapes drawn on the graph. This example figure is configured to allow the user to draw lines and automatically labels each line with its slope. Select **Draw line** in the modebar to try it out. +You can also use `texttemplate` to add text with variables to new shapes drawn on the graph. + +In this example, we enable drawing lines on the figure by adding `drawline` to `modeBarButtonsToAdd` in `config`. We then define a `texttemplate` for shapes that shows the calculated variable `dy`. Select **Draw line** in the modebar to try it out. ```python import plotly.graph_objects as go +from plotly import data + +df = data.stocks() fig = go.Figure( - layout=go.Layout(newshape=dict(label=dict(texttemplate="Slope: %{slope:.3f}"))) + data=go.Scatter( + x=df.date, + y=df.GOOG, + ), + layout=go.Layout( + yaxis=dict(title="Price in USD"), + newshape=dict( + label=dict(texttemplate="Change: %{dy:.2f}") + ), + title="Google Share Price 2018/2019", + ), ) + fig.show( config={ "modeBarButtonsToAdd": [ @@ -999,7 +1024,6 @@ fig.show( ] } ) - ``` ### Reference From d83c369f44516e654b88fd69cb64cf572631643e Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 19 Jun 2023 11:30:33 -0400 Subject: [PATCH 13/15] Update legend.md --- doc/python/legend.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/python/legend.md b/doc/python/legend.md index 5ff1566ec0..49b989405b 100644 --- a/doc/python/legend.md +++ b/doc/python/legend.md @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.8 + version: 3.10.11 plotly: description: How to configure and style the legend in Plotly with Python. display_as: file_settings @@ -671,7 +671,6 @@ fig = go.Figure( "xref": "container", "yref": "container", "bgcolor": "Gold", - "title": {"text": "By continent"}, }, ), ) From 25662fa06bbc8b3ecbbed626d1914ac8b3cc5e9c Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 11 Jul 2023 11:50:03 -0400 Subject: [PATCH 14/15] Update map-configuration.md --- doc/python/map-configuration.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/doc/python/map-configuration.md b/doc/python/map-configuration.md index 5a2f5a349f..6e9f54e4d7 100644 --- a/doc/python/map-configuration.md +++ b/doc/python/map-configuration.md @@ -5,10 +5,10 @@ jupyter: text_representation: extension: .md format_name: markdown - format_version: '1.2' - jupytext_version: 1.3.1 + format_version: '1.3' + jupytext_version: 1.14.7 kernelspec: - display_name: Python 3 + display_name: Python 3 (ipykernel) language: python name: python3 language_info: @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.6.8 + version: 3.10.4 plotly: description: How to configure and style base maps for Choropleths and Bubble Maps. display_as: maps @@ -119,9 +119,7 @@ fig.show() ### Map Projections -Geo maps are drawn according to a given map [projection](https://en.wikipedia.org/wiki/Map_projection) that flattens the Earth's roughly-spherical surface into a 2-dimensional space. - -The available projections are `'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'` and `'sinusoidal'`. +Geo maps are drawn according to a given map [projection](https://en.wikipedia.org/wiki/Map_projection) that flattens the Earth's roughly-spherical surface into a 2-dimensional space. In the following examples, we show the `'orthographic'` and `'natural earth'` projections, two of the many projection types available. For a full list of available projection types, see the [layout.geo reference documentation](https://plotly.com/python/reference/layout/geo/#layout-geo-projection-type). ```python import plotly.graph_objects as go @@ -221,7 +219,3 @@ fig.show() ### Reference See https://plotly.com/python/reference/layout/geo/ for more information and chart attribute options! - -```python - -``` \ No newline at end of file From 5f8d9c237d2d3bd23720f1e1cd0b0a111f256731 Mon Sep 17 00:00:00 2001 From: AtharvaKatre <45846529+AtharvaKatre@users.noreply.github.com> Date: Thu, 13 Jul 2023 11:32:03 +0530 Subject: [PATCH 15/15] Update treemaps.md Fixed typo --- doc/python/treemaps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/treemaps.md b/doc/python/treemaps.md index b86636e01d..98fbeadcd4 100644 --- a/doc/python/treemaps.md +++ b/doc/python/treemaps.md @@ -186,7 +186,7 @@ This example uses the following attributes: 1. [values](https://plotly.com/python/reference/treemap/#treemap-values): sets the values associated with each of the sectors. 2. [textinfo](https://plotly.com/python/reference/treemap/#treemap-textinfo): determines which trace information appear on the graph that can be 'text', 'value', 'current path', 'percent root', 'percent entry', and 'percent parent', or any combination of them. 3. [pathbar](https://plotly.com/python/reference/treemap/#treemap-pathbar): a main extra feature of treemap to display the current path of the visible portion of the hierarchical map. It may also be useful for zooming out of the graph. -4. [branchvalues](https://plotly.com/python/reference/treemap/#treemap-branchvalues): determines how the items in `values` are summed. When set to "total", items in `values` are taken to be value of all its descendants. In the example below Eva = 65, which is equal to 14 + 12 + 10 + 2 + 6 + 6 + 1 + 4. +4. [branchvalues](https://plotly.com/python/reference/treemap/#treemap-branchvalues): determines how the items in `values` are summed. When set to "total", items in `values` are taken to be value of all its descendants. In the example below Eve = 65, which is equal to 14 + 12 + 10 + 2 + 6 + 6 + 1 + 4. When set to "remainder", items in `values` corresponding to the root and the branches sectors are taken to be the extra part not part of the sum of the values at their leaves. ```python