Default Legend


In [1]:
from cartoframes.auth import set_default_credentials

set_default_credentials('cartoframes')

In [2]:
from cartoframes.viz import Map, Layer, color_bins_style, default_legend

Map(
  Layer(
    'demographics_sf',
    style=color_bins_style('masters_percent'),
    legends=default_legend(
        title="Percent Master's Degree",
        format='.0%'
    )
  )
)


Out[2]:
:
StackTrace
    ">
    
    
    In [3]:
    from cartoframes.viz import Map, Layer, color_bins_style, default_legend
    
    Map(
      Layer(
        'demographics_sf',
        style=color_bins_style('masters_percent'),
        default_legend=True
      )
    )
    
    
    
    
    Out[3]:
    :
    StackTrace
      ">