Black Lives Matter. Please consider donating to Black Girls Code today.

Error using Plotly in Google Colab, uniformtext-options not available

Hi Plotly-Community,

I wanted to use plotly-express in Google Colab but couldn’t get the following example to work, which worked fine in jupyter notebooks locally:

Controlling text fontsize with uniformtext

I received the following error message:

ValueError                                Traceback (most recent call last)
<ipython-input-26-66f710cfe1f8> in <module>()
      4 fig =, y='pop', x='country', text='pop')
      5 fig.update_traces(texttemplate='%{text:.2s}', textposition='outside')
----> 6 fig.update_layout(uniformtext_minsize=8, uniformtext_mode='hide')

3 frames
/usr/local/lib/python3.6/dist-packages/plotly/ in _raise_on_invalid_property_error(self, *args)
   3664                     full_obj_name=full_obj_name,
   3665                     invalid_str=invalid_str,
-> 3666                     prop_descriptions=self._prop_descriptions,
   3667                 )
   3668             )

ValueError: Invalid properties specified for object of type plotly.graph_objs.Layout: ('uniformtext_minsize', 'uniformtext_mode')

I also checked the version of plotly, which is 0.4.1 locally and on Google Colab.

Is there a way to get the text-size functionality in Google Colab that I am missing?

thanks, Michael