improve 'grid_str' code
improve 'grid_str' code

plotly/plotly.py,plotly/python-api,ee-in/python-api,ee-in/python-api,plotly/python-api,plotly/python-api,plotly/plotly.py,ee-in/python-api,plotly/plotly.py