Skip to content

Commit 1b419ad

Browse files
committed
Minor fixes
A typo in the docstring and a confusing error message.
1 parent 7b6a594 commit 1b419ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/python/plotly/_plotly_utils/colors/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ def sample_colorscale(colorscale, samplepoints, low=0.0, high=1.0, colortype="rg
815815
Interpolates between colors in a colorscale to find the specific colors
816816
corresponding to the specified sample values. The colorscale can be specified
817817
as a list of `[scale, color]` pairs, as a list of colors, or as a named
818-
plotly colorscale. The samplepoints can be specefies an iterable of specific
818+
plotly colorscale. The samplepoints can be specefied as an iterable of specific
819819
points in the range [0.0, 1.0], or as an integer number of points which will
820820
be spaced equally between the low value (default 0.0) and the high value
821821
(default 1.0). The output is a list of colors, formatted according to the
@@ -831,8 +831,8 @@ def sample_colorscale(colorscale, samplepoints, low=0.0, high=1.0, colortype="rg
831831
colorscale = PLOTLY_SCALES[colorscale]
832832
else:
833833
raise exceptions.PlotlyError(
834-
"If your colors variable is a string, it must be a "
835-
"Plotly scale, an rgb color or a hex color."
834+
"If your colorscale variable is a string, "
835+
"it must be a Plotly scale."
836836
)
837837
else:
838838
colorscale = make_colorscale(colorscale)

0 commit comments

Comments
 (0)