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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ Items in this section may be considered backwards-incompatible changes for the p
- if either `x` or `y` (but not both) may now be provided as a list of column references into `data_frame` or columns of data, in which case the imputed data frame will be treated as "wide" data and `melt()`ed internally before applying the usual mapping rules, with function-specific defaults.
- if neither `x` nor `y` is provided but `data_frame` is, the data frame will be treated as "wide" with defaults depending on the value of `orientation` (and `orientation` has accordingly been added to `scatter`, `line`, `density_heatmap`, and `density_contour` for this purpose). Previously this would have resulted in an empty figure.
- if both `x` and `y` are provided to `histogram`, and if `x`, `y` and `z` are provided to `density_heatmap` or `density_contour`, then `histfunc` now defaults to `sum` so as to avoid ignoring the provided data, and to cause `histogram` and `bar` to behave more similarly.
- `violinmode`, `boxmode` and `stripmode` now default to `overlay` if `x` (`y`) in in `v` (`h`) orientation is also mapped to `color`, to avoid strange spacing issues with the previous default of `group` in all cases.
- `violinmode`, `boxmode` and `stripmode` now default to `overlay` if `x` (`y`) in `v` (`h`) orientation is also mapped to `color`, to avoid strange spacing issues with the previous default of `group` in all cases.
- The Plotly Express arguments `color_discrete_map`, `symbol_map` and `line_dash_map` now accept the string `"identity"` which causes the corresponding input data to be used as-is rather than mapped into `color_discrete_sequence`, `symbol_sequence` or `line_dash_sequence`, respectively. ([#2336](https://github.com/plotly/plotly.py/pull/2336))
- Plotly Express now accepts `px.Constant` or `px.Range` objects in the place of column references so as to express constant or increasing integer values. ([#2336](https://github.com/plotly/plotly.py/pull/2336))

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ When creating your pull request, please follow the guidelines below.
### Code pull request

- *Make sure you have reviewed the full [contributing notes (this file)](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md) and understand the structure of the package.*
- If your PR modifies code of `plotly.graph_objects`, the modifications should be made to the the code generator, *not* the generated files.
- If your PR modifies code of `plotly.graph_objects`, the modifications should be made to the code generator, *not* the generated files.
- You have added tests or modified existing tests, as needed.
- For a new feature, you have added documentation examples (please see the doc checklist as well).
- You have added a CHANGELOG entry if changing anything substantial.
Expand Down
2 changes: 1 addition & 1 deletion _plotly_utils/basevalidators.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def __init__(

def description(self):
desc = """\
The '{plotly_name}' property is a integer and may be specified as:""".format(
The '{plotly_name}' property is an integer and may be specified as:""".format(
plotly_name=self.plotly_name
)

Expand Down
8 changes: 4 additions & 4 deletions _plotly_utils/colors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ def convert_colors_to_same_type(

Takes a single color or an iterable of colors, as well as a list of scale
values, and outputs a 2-pair of the list of color(s) converted all to an
rgb or tuple color type, aswell as the scale as the second element. If
rgb or tuple color type, as well as the scale as the second element. If
colors is a Plotly Scale name, then 'scale' will be forced to the scale
from the respective colorscale and the colors in that colorscale will also
be coverted to the selected colortype. If colors is None, then there is an
be converted to the selected colortype. If colors is None, then there is an
option to return portion of the DEFAULT_PLOTLY_COLORS

:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
Expand Down Expand Up @@ -567,8 +567,8 @@ def make_colorscale(colors, scale=None):

Takes a list of colors and scales and constructs a colorscale based
on the colors in sequential order. If 'scale' is left empty, a linear-
interpolated colorscale will be generated. If 'scale' is a specificed
list, it must be the same legnth as colors and must contain all floats
interpolated colorscale will be generated. If 'scale' is a specified
list, it must be the same length as colors and must contain all floats
For documentation regarding to the form of the output, see
https://plot.ly/python/reference/#mesh3d-colorscale

Expand Down
2 changes: 1 addition & 1 deletion _plotly_utils/png.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class ChunkError(FormatError):


class Default:
"""The default for the greyscale paramter."""
"""The default for the greyscale parameter."""


class Writer:
Expand Down
2 changes: 1 addition & 1 deletion doc/python/axes.md
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ fig.show()

*New in 5.17*

You can also set just a lower or upper bound manually and have autorange applied to the other bound by setting it to `None`. In the following example, we set a an upper bound of 4.5 on the x axes, while specifying `None` for the lower bound, meaning it will use autorange. On the y axes, we set the lower bound, and use `None` for the upper bound, meaning that uses autorange.
You can also set just a lower or upper bound manually and have autorange applied to the other bound by setting it to `None`. In the following example, we set an upper bound of 4.5 on the x axes, while specifying `None` for the lower bound, meaning it will use autorange. On the y axes, we set the lower bound, and use `None` for the upper bound, meaning that uses autorange.

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


The layout of cheater plots is not unique and depends upon the `cheaterslope` and axis `cheatertype` parameters. If `x` is not specified, each row of the `x` array is constructed based on the the formula `a + cheaterslope * b`, where `a` and `b` are either the value or the integer index of `a` and `b` respectively, depending on the corresponding axis `cheatertype`. Although the layout of the axis below is different than the plots above, it represents the same data as the axes above.
The layout of cheater plots is not unique and depends upon the `cheaterslope` and axis `cheatertype` parameters. If `x` is not specified, each row of the `x` array is constructed based on the formula `a + cheaterslope * b`, where `a` and `b` are either the value or the integer index of `a` and `b` respectively, depending on the corresponding axis `cheatertype`. Although the layout of the axis below is different than the plots above, it represents the same data as the axes above.

```python
import plotly.graph_objects as go
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 @@ -79,7 +79,7 @@ fig.update_traces(marker_size=10)
fig.show()
```

[Box plots]() and [violin plots]() are often shown with one categorical and one continuous axis.
[Box plots](/python/box-plots/) and [violin plots](/python/violin/) are often shown with one categorical and one continuous axis.

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

### Reversed and Complementary CDF plots

By default, the Y value represents the fraction of the data that is *at or below* the value on on the X axis. Setting `ecdfmode` to `"reversed"` reverses this, with the Y axis representing the fraction of the data *at or above* the X value. Setting `ecdfmode` to `"complementary"` plots `1-ECDF`, meaning that the Y values represent the fraction of the data *above* the X value.
By default, the Y value represents the fraction of the data that is *at or below* the value on the X axis. Setting `ecdfmode` to `"reversed"` reverses this, with the Y axis representing the fraction of the data *at or above* the X value. Setting `ecdfmode` to `"complementary"` plots `1-ECDF`, meaning that the Y values represent the fraction of the data *above* the X value.

In `standard` mode (the default), the right-most point is at 1 (or the total count/sum, depending on `ecdfnorm`) and the right-most point is above 0.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/marker-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ fig.show()

To maximise visibility of each point, set the color as an `rgba` string that includes an alpha value of 0.5.

This example sets the marker color to `'rgba(135, 206, 250, 0.5)'`. The rgb values of 135, 206, and 250 are from the definition of the `LightSkyBlue` named CSS color that is is used in the previous examples (See https://www.color-hex.com/color/87cefa). The marker line will remain opaque.
This example sets the marker color to `'rgba(135, 206, 250, 0.5)'`. The rgb values of 135, 206, and 250 are from the definition of the `LightSkyBlue` named CSS color that is used in the previous examples (See https://www.color-hex.com/color/87cefa). The marker line will remain opaque.

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

### Enhanced prediction error analysis using `plotly.express`

Add marginal histograms to quickly diagnoses any prediction bias your model might have. The built-in `OLS` functionality let you visualize how well your model generalizes by comparing it with the theoretical optimal fit (black dotted line).
Add marginal histograms to quickly diagnose any prediction bias your model might have. The built-in `OLS` functionality let you visualize how well your model generalizes by comparing it with the theoretical optimal fit (black dotted line).

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

#### Multi-Color Parallel Categories Diagram

The color of the ribbons can be specified with the `line.color` property. Similar to other trace types, this property may be set to an array of numbers, which are then mapped to colors according to the the colorscale specified in the `line.colorscale` property.
The color of the ribbons can be specified with the `line.color` property. Similar to other trace types, this property may be set to an array of numbers, which are then mapped to colors according to the colorscale specified in the `line.colorscale` property.

Here is an example of visualizing the survival rate of passengers in the titanic dataset, where the ribbons are colored based on survival outcome.

Expand Down
2 changes: 1 addition & 1 deletion doc/python/pattern-hatching-texture.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fig = px.bar(df, x="medal", y="count", color="nation",
fig.show()
```

Here we use `pattern_shape_map` to explictly assign a shape to each value of `nation`, regardless of order:
Here we use `pattern_shape_map` to explicitly assign a shape to each value of `nation`, regardless of order:

```python
import plotly.express as px
Expand Down
2 changes: 1 addition & 1 deletion doc/python/selections.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fig.show()
## Referencing Selections on Multiple Cartesian Subplots


You can add selections to multiple Cartesian subplots by specifying `xref` and/or `yref`. Here, we add one selection on the plot with axis ids `x` and `y2` and two selections to the the plot with axis ids `x` and `y`.
You can add selections to multiple Cartesian subplots by specifying `xref` and/or `yref`. Here, we add one selection on the plot with axis ids `x` and `y2` and two selections to the plot with axis ids `x` and `y`.

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

### Controlling Maximum Text Size

The `textfont_size` parameter of the the [pie](/python/pie-charts), [bar](/python/bar-charts)-like, [sunburst](/python/sunburst-charts) and [treemap](/python/treemaps) traces can be used to set the **maximum font size** used in the chart. Note that the `textfont` parameter sets the `insidetextfont` and `outsidetextfont` parameter, which can also be set independently.
The `textfont_size` parameter of the [pie](/python/pie-charts), [bar](/python/bar-charts)-like, [sunburst](/python/sunburst-charts) and [treemap](/python/treemaps) traces can be used to set the **maximum font size** used in the chart. Note that the `textfont` parameter sets the `insidetextfont` and `outsidetextfont` parameter, which can also be set independently.

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

#### Implementation of shared axes with `make_subplots`
The implementation of shared axis support in the `make_subplots` function has been simplified. Prior to version 4, shared y-axes were implemented by associating a single `yaxis` object with multiple `xaxis` objects, and vica versa.
The implementation of shared axis support in the `make_subplots` function has been simplified. Prior to version 4, shared y-axes were implemented by associating a single `yaxis` object with multiple `xaxis` objects, and vice versa.

In version 4, every 2D Cartesian subplot has a dedicated x-axis and and a dedicated y-axis. Axes are now "shared" by being linked together using the `matches` axis property.
In version 4, every 2D Cartesian subplot has a dedicated x-axis and a dedicated y-axis. Axes are now "shared" by being linked together using the `matches` axis property.

For legacy code that makes use of the `make_subplots` and add trace APIs, this change does not require any action on the user's part. However, legacy code that uses `make_subplots` to create a figure with shared axes, and then manipulates the axes directly, may require updates. The output of the `.print_grid` method on a figure created using `make_subplots` can be used to identify which axis objects are associated with each subplot.

Expand Down
2 changes: 1 addition & 1 deletion doc/unconverted/python/2d-projection-of-3d-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Namely, if $x, y, z$ are numpy arrays of shape (m, n), defined by a discretizati

This method allows to project a surface onto planes perpendicular to the z, x or y-direction in the 3d space
and interpret the projection as a planar surface colored according to the z, x or y value at each point
of the coresponding plane.
of the corresponding plane.

First, define the surface and its discretization:

Expand Down
2 changes: 1 addition & 1 deletion doc/unconverted/python/normality-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Each test will return at least two things:

Each test calculates a test-specific statistic. This statistic can aid in the interpretation of the result, although it may require a deeper proficiency with statistics and a deeper knowledge of the specific statistical test. Instead, the p-value can be used to quickly and accurately interpret the statistic in practical applications.

The tests assume that that the sample was drawn from a Gaussian distribution. Technically this is called the null hypothesis, or H0. A threshold level is chosen called alpha, typically 5% (or 0.05), that is used to interpret the p-value.
The tests assume that the sample was drawn from a Gaussian distribution. Technically this is called the null hypothesis, or H0. A threshold level is chosen called alpha, typically 5% (or 0.05), that is used to interpret the p-value.

In the SciPy implementation of these tests, you can interpret the p value as follows.
- **_p <= alpha_**: reject H0, not normal.
Expand Down
2 changes: 1 addition & 1 deletion doc/unconverted/python/outlier-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ table = FF.create_table(df)
py.iplot(table, filename='wind-data-sample')
```

In any set of data, an `outlier` is a a datum point that is not consistent with the other data points. If the data sampled from a particular distribution then with high probability, an outlier would not belong to that distribution. There are various tests used for testing if a particular point is an outlier, and this is done with the same null-hypothesis testing used in Normality Tests.
In any set of data, an `outlier` is a datum point that is not consistent with the other data points. If the data sampled from a particular distribution then with high probability, an outlier would not belong to that distribution. There are various tests used for testing if a particular point is an outlier, and this is done with the same null-hypothesis testing used in Normality Tests.


#### Q Test
Expand Down
2 changes: 1 addition & 1 deletion plotly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"__version__",
]

# Set default template (for >= 3.7 this is done in ploty/io/__init__.py)
# Set default template (for >= 3.7 this is done in plotly/io/__init__.py)
from plotly.io import templates

templates._default = "plotly"
Expand Down
6 changes: 3 additions & 3 deletions plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class is a subclass of both BaseFigure and widgets.DOMWidget.
for trace_ind, trace in enumerate(data):
# By setting the trace's parent to be this figure, we tell the
# trace object to use the figure's _data and _data_defaults
# dicts to get/set it's properties, rather than using the trace
# dicts to get/set its properties, rather than using the trace
# object's internal _orphan_props dict.
trace._parent = self

Expand Down Expand Up @@ -1921,7 +1921,7 @@ def _set_in(d, key_path_str, v):

val_parent = val_parent[key_path_el]

# Assign value to to final parent dict or list
# Assign value to final parent dict or list
# --------------------------------------------
# ### Get reference to final key path element ###
last_key = key_path[-1]
Expand Down Expand Up @@ -4281,7 +4281,7 @@ def _subplot_not_empty(self, xref, yref, selector="all"):
ret |= any(
t == (xref, yref)
for t in [
# if a object exists but has no xaxis or yaxis keys, then it
# if an object exists but has no xaxis or yaxis keys, then it
# is plotted with xaxis/xref 'x' and yaxis/yref 'y'
(
"x" if d[xaxiskw] is None else d[xaxiskw],
Expand Down
2 changes: 1 addition & 1 deletion plotly/basewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BaseFigureWidget(BaseFigure, anywidget.AnyWidget):
# ### Python -> JS message properties ###
# These properties are used to send messages from Python to the
# frontend. Messages are sent by assigning the message contents to the
# appropriate _py2js_* property and then immediatly assigning None to the
# appropriate _py2js_* property and then immediately assigning None to the
# property.
#
# See JSDoc comments in the FigureModel class in js/src/Figure.js for
Expand Down
4 changes: 2 additions & 2 deletions plotly/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ def buttons(self):
- 0: No button or un-initialized
- 1: Primary button (usually left)
- 2: Secondary button (usually right)
- 4: Auxilary button (usually middle or mouse wheel button)
- 4: Auxiliary button (usually middle or mouse wheel button)
- 8: 4th button (typically the "Browser Back" button)
- 16: 5th button (typically the "Browser Forward" button)

Combinations of buttons are represented as the decimal form of the
bitmask of the values above.

For example, pressing both the primary (1) and auxilary (4) buttons
For example, pressing both the primary (1) and auxiliary (4) buttons
will result in a code of 5

Returns
Expand Down
2 changes: 1 addition & 1 deletion plotly/figure_factory/_facet_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def create_facet_grid(
else:
SUBPLOT_SPACING = 0.015

# seperate kwargs for marker and else
# separate kwargs for marker and else
if "marker" in kwargs:
kwargs_marker = kwargs["marker"]
else:
Expand Down
2 changes: 1 addition & 1 deletion plotly/figure_factory/_trisurf.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def create_trisurf(
:param (array) z: data values of z in a 1D array
:param (array) simplices: an array of shape (ntri, 3) where ntri is
the number of triangles in the triangularization. Each row of the
array contains the indicies of the verticies of each triangle
array contains the indices of the vertices of each triangle
:param (str|tuple|list) colormap: either a plotly scale name, an rgb
or hex color, a color tuple or a list of colors. An rgb color is
of the form 'rgb(x, y, z)' where x, y, z belong to the interval
Expand Down
2 changes: 1 addition & 1 deletion plotly/figure_factory/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def annotation_dict_for_label(

def list_of_options(iterable, conj="and", period=True):
"""
Returns an English listing of objects seperated by commas ','
Returns an English listing of objects separated by commas ','

For example, ['foo', 'bar', 'baz'] becomes 'foo, bar and baz'
if the conjunction 'and' is selected.
Expand Down
2 changes: 1 addition & 1 deletion plotly/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
],
)

# Set default template (for < 3.7 this is done in ploty/__init__.py)
# Set default template (for < 3.7 this is done in plotly/__init__.py)
from plotly.io import templates

templates._default = "plotly"
Loading