Session Ready
Exercise

Positioning and styling legends

Properties of the legend can be changed by using the legend member attribute of a Bokeh figure after the glyphs have been plotted.

In this exercise, you'll adjust the background color and legend location of the female literacy vs fertility plot from the previous exercise.

The figure object p has been created for you along with the circle glyphs.

Instructions
100 XP
  • Use p.legend.location to adjust the legend location to be on the 'bottom_left'.
  • Use p.legend.background_fill_color to set the background color of the legend to 'lightgray'.