Allow set_view_function_1d to take strings as input, rather than objects