diff --git a/_plotly_utils/basevalidators.py b/_plotly_utils/basevalidators.py index d094e27aae..9e7d203650 100644 --- a/_plotly_utils/basevalidators.py +++ b/_plotly_utils/basevalidators.py @@ -1274,9 +1274,11 @@ def validate_coerce(self, v): return v def present(self, v): - # Return tuple of tuples so that colorscale is immutable + # Return-type must be immutable if v is None: return None + elif isinstance(v, string_types): + return v else: return tuple([tuple(e) for e in v])