Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/python/axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jupyter:
thumbnail: thumbnail/axes.png
---

This tutorial explains 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/yaxis/).
This tutorial explains 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/yaxis/).

Other kinds of subplots and axes are described in other tutorials:

Expand Down Expand Up @@ -190,7 +190,7 @@ fig.show()

### Set axis title position

This example sets `standoff` attribute to cartesian axes to determine the distance between the tick labels and the axis title. Note that the axis title position is always constrained within the margins, so the actual standoff distance is always less than the set or default value. By default [automargin](https://plotly.com/python/setting-graph-size/#automatically-adjust-margins) is `True` in Plotly template for the cartesian axis, so the margins will be pushed to fit the axis title at given standoff distance.
This example sets `standoff` attribute to cartesian axes to determine the distance between the tick labels and the axis title. Note that the axis title position is always constrained within the margins, so the actual standoff distance is always less than the set or default value. By default [automargin](https://plotly.com/python/setting-graph-size/#Automatically-Adjust-Margins) is `True` in Plotly template for the cartesian axis, so the margins will be pushed to fit the axis title at given standoff distance.

```python
import plotly.graph_objects as go
Expand Down
2 changes: 1 addition & 1 deletion doc/python/box-plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ fig.show()

### Modifying The Algorithm For Computing Quartiles

For an explanation of how each algorithm works, see [Choosing The Algorithm For Computing Quartiles](#choosing-the-algorithm-for-computing-quartiles).
For an explanation of how each algorithm works, see [Choosing The Algorithm For Computing Quartiles](#Choosing-The-Algorithm-For-Computing-Quartiles).

```python
import plotly.graph_objects as go
Expand Down
2 changes: 1 addition & 1 deletion doc/python/builtin-colorscales.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ It is intentionally left in for backwards-compatibility reasons.
A collection of predefined diverging color scales is provided in the `plotly.colors.diverging` module.
Diverging color scales are appropriate for continuous data that has a natural midpoint
other otherwise informative special value, such as 0 altitude, or the boiling point
of a liquid. These scales are intended to be used when [explicitly setting the midpoint of the scale](/python/colorscales/#setting-the-midpoint-of-a-color-range-for-a-diverging-color-scale).
of a liquid. These scales are intended to be used when [explicitly setting the midpoint of the scale](/python/colorscales/#Setting-the-Midpoint-of-a-Color-Range-for-a-Diverging-Color-scale).

Here are all the built-in scales in the `plotly.colors.diverging` module:

Expand Down
2 changes: 1 addition & 1 deletion doc/python/categorical-axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jupyter:
---


This page shows examples of how to configure [2-dimensional Cartesian axes](/python/figure-structure/#2d-cartesian-trace-types-and-subplots) to visualize categorical (i.e. qualitative, nominal or ordinal data as opposed to continuous numerical data). Such axes are a natural fit for bar charts, waterfall charts, funnel charts, heatmaps, violin charts and box plots, but can also be used with scatter plots and line charts. [Configuring gridlines, ticks, tick labels and axis titles](/python/axes/) on logarithmic axes is done the same was as with [linear axes](/python/axes/).
This page shows examples of how to configure [2-dimensional Cartesian axes](/python/figure-structure/#2D-Cartesian-Trace-Types-and-Subplots) to visualize categorical (i.e. qualitative, nominal or ordinal data as opposed to continuous numerical data). Such axes are a natural fit for bar charts, waterfall charts, funnel charts, heatmaps, violin charts and box plots, but can also be used with scatter plots and line charts. [Configuring gridlines, ticks, tick labels and axis titles](/python/axes/) on logarithmic axes is done the same was as with [linear axes](/python/axes/).

### 2-D Cartesian Axis Type and Auto-Detection

Expand Down
4 changes: 2 additions & 2 deletions doc/python/choropleth-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ In **Plotly.py 6.3 and later**, the built-in countries geometry is created from

In **earlier versions of Plotly.py**, the built-in countries geometry is based on Natural Earth data only. Plotly includes data from Natural Earth "as-is". This dataset draws boundaries of countries according to de facto status. See the [Natural Earth page for more details](https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-admin-0-countries-2/).

To use the built-in countries geometry, provide `locations` as [three-letter ISO country codes](/python/outline-map-locations/#supported-iso-codes).
To use the built-in countries geometry, provide `locations` as [three-letter ISO country codes](/python/outline-map-locations/#Supported-ISO-Codes).

```python
import plotly.express as px
Expand All @@ -229,7 +229,7 @@ fig = px.choropleth(df, locations="iso_alpha",
fig.show()
```

To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as [two-letter state abbreviations](/python/outline-map-locations/#supported-us-state-codes) or [full state names](/python/outline-map-locations/#locationmodeusastates):
To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as [two-letter state abbreviations](/python/outline-map-locations/#Supported-US-State-Codes) or [full state names](/python/outline-map-locations/#locationmode='USA-states'):

```python
import plotly.express as px
Expand Down
4 changes: 2 additions & 2 deletions doc/python/colorscales.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fig.show()

The Plotly Express `color_continuous_scale` argument accepts explicitly-constructed color scales as well.

The Graph Objects `colorscale` parameter also accepts an explicitly-constructed color scale, as shown in the example [below](#custom-heatmap-color-scale-with-graph-objects).
The Graph Objects `colorscale` parameter also accepts an explicitly-constructed color scale, as shown in the example [below](#Custom-Heatmap-Color-scale-with-Graph-Objects).

```python
import plotly.express as px
Expand Down Expand Up @@ -642,7 +642,7 @@ fig.show()

Colorbars can be positioned by specifying x and y coordinates. By default, the x and y values are "paper" coordinates, which refer to the plot area. You can also use coordinates based on the "container" by setting `xref="container"` or `yref="container"`. The following example uses a container reference for the x position.

See the positioning section of [the figure data structure page](/python/figure-structure/#positioning-with-paper-container-coordinates-or-axis-domain-coordinates) for more details on "paper" vs "container" coordinates.
See the positioning section of [the figure data structure page](/python/figure-structure/#Positioning-With-Paper,-Container-Coordinates,-or-Axis-Domain-Coordinates) for more details on "paper" vs "container" coordinates.

```python
import plotly.graph_objects as go
Expand Down
2 changes: 1 addition & 1 deletion doc/python/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ fig.show()

*New in v4.7*

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-with-a-mouse-on-cartesian-plots) for more details.
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-with-a-Mouse-on-Cartesian-plots) for more details.

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/dropdowns.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ fig.show()

### Graph Selection Dropdowns in Jinja

It is straight forward to create each potential view as a separate graph and then use Jinja to insert each potential view into a div on a JavaScript enabled webpage with a dropdown that chooses which div to display. This approach produces code that requires little customization or updating as you e.g. add, drop, or reorder views or traces, so it is particularly compelling for prototyping and rapid iteration. It produces web pages that are larger than the webpages produced through the built in method which is a consideration for very large figures with hundreds or thousands of data points in traces that appear in multiple selections. This approach requires both a Python program and a Jinja template file. The documentation on [using Jinja templates with Plotly](https://plotly.com/python/interactive-html-export/#inserting-plotly-output-into-html-using-a-jinja2-template) is relevant background.
It is straight forward to create each potential view as a separate graph and then use Jinja to insert each potential view into a div on a JavaScript enabled webpage with a dropdown that chooses which div to display. This approach produces code that requires little customization or updating as you e.g. add, drop, or reorder views or traces, so it is particularly compelling for prototyping and rapid iteration. It produces web pages that are larger than the webpages produced through the built in method which is a consideration for very large figures with hundreds or thousands of data points in traces that appear in multiple selections. This approach requires both a Python program and a Jinja template file. The documentation on [using Jinja templates with Plotly](https://plotly.com/python/interactive-html-export/#Inserting-Plotly-Output-into-HTML-using-a-Jinja2-Template) is relevant background.

<!-- #region -->

Expand Down
4 changes: 2 additions & 2 deletions doc/python/figure-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Plotly.js supports inputs adhering to a well-defined schema, whose overall archi

Attributes are referred to in text and in the [Figure Reference](/python/reference/index/) by their full "path" i.e. the dot-delimited concatenation of their parents. For example `"layout.width"` refers to the attribute whose key is `"width"` inside a dict which is the value associated with a key `"layout"` at the root of the figure. If one of the parents is a list rather than a dict, a set of brackets is inserted in the path when referring to the attribute in the abstract, e.g. `"layout.annotations[].text"`. Finally, as explained below, the top-level "data" attribute defines a list of typed objects called "traces" with the schema dependent upon the type, and these attributes' paths are listed in the [Figure Reference](/python/reference/index/) as `"data[type=scatter].name"`.

The [`plotly.graph_objects` module contains an automatically-generated hierarchy of Python classes](/python/graph-objects/) which represent non-leaf attributes in the figure schema and provide a Pythonic API for them. When [manipulating a `plotly.graph_objects.Figure` object](/python/creating-and-updating-figures/), attributes can be set either directly using Python object attributes e.g. `fig.layout.title.font.family="Open Sans"` or using [update methods and "magic underscores"](/python/creating-and-updating-figures/#magic-underscore-notation) e.g. `fig.update_layout(title_font_family="Open Sans")`
The [`plotly.graph_objects` module contains an automatically-generated hierarchy of Python classes](/python/graph-objects/) which represent non-leaf attributes in the figure schema and provide a Pythonic API for them. When [manipulating a `plotly.graph_objects.Figure` object](/python/creating-and-updating-figures/), attributes can be set either directly using Python object attributes e.g. `fig.layout.title.font.family="Open Sans"` or using [update methods and "magic underscores"](/python/creating-and-updating-figures/#Magic-Underscore-Notation) e.g. `fig.update_layout(title_font_family="Open Sans")`

When building a figure, it is *not necessary to populate every attribute* of every object. At render-time, [the JavaScript layer will compute default values](/python/figure-introspection/) for each required unspecified attribute, depending upon the ones that are specified, as documented in the [Figure Reference](/python/reference/index/). An example of this would be `layout.xaxis.range`, which may be specified explicitly, but if not will be computed based on the range of `x` values for every trace linked to that axis. The JavaScript layer will ignore unknown attributes or malformed values, although the `plotly.graph_objects` module provides Python-side validation for attribute values. Note also that if [the `layout.template` key is present (as it is by default)](/python/templates/) then default values will be drawn first from the contents of the template and only if missing from there will the JavaScript layer infer further defaults. The built-in template can be disabled by setting `layout.template="none"`.

Expand Down Expand Up @@ -192,7 +192,7 @@ The following trace types are compatible with tile map subplots via the `map` at

* [`scattermap`](/python/tile-scatter-maps/), which can be used to draw [individual markers](/python/tile-scatter-maps/), [lines and curves](/python/lines-on-tile-maps/) and [filled areas](/python/filled-area-tile-maps/) on tile maps
* [`choroplethmap`](/python/tile-county-choropleth/): colored polygons on tile maps
* [`densitymap`](/python/tile-density-heatmaps/): density heatmaps on tile maps
* [`densitymap`](/python/density-heatmaps/): density heatmaps on tile maps

### Traces Which Are Their Own Subplots

Expand Down
2 changes: 1 addition & 1 deletion doc/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you want to use Plotly Express, install its required dependencies with:
pip install plotly[express]
```

You'll also need to install a [supported dataframe library](/python/px-arguments#supported-dataFrame-types).
You'll also need to install a [supported dataframe library](/python/px-arguments#Supported-DataFrame-Types).

### Plotly charts in Dash

Expand Down
Loading