Skip to content

Commit c27f88a

Browse files
committed
modify error message + animation_frame label
1 parent 5d1d8d8 commit c27f88a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: packages/python/plotly/plotly/express/_imshow.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ def imshow(
331331
img = np.moveaxis(img, animation_frame, 0)
332332
animation_frame = True
333333
args["animation_frame"] = (
334-
"slice" if labels.get("animation") is None else labels["animation"]
334+
"animation_frame"
335+
if labels.get("animation_frame") is None
336+
else labels["animation_frame"]
335337
)
336338
iterables = ()
337339
if animation_frame is not None:
@@ -509,8 +511,8 @@ def imshow(
509511
raise ValueError(
510512
"px.imshow only accepts 2D single-channel, RGB or RGBA images. "
511513
"An image of shape %s was provided."
512-
"Alternatively, 3-D single or multichannel datasets can be"
513-
"visualized using the `facet_col` or `animation_frame` arguments."
514+
"Alternatively, 3- or 4-D single or multichannel datasets can be"
515+
"visualized using the `facet_col` or/and `animation_frame` arguments."
514516
% str(img.shape)
515517
)
516518

0 commit comments

Comments
 (0)