Skip to content

Sub-optimal default attribution #51

@jorisvandenbossche

Description

@jorisvandenbossche

https://github.com/darribas/contextily/pull/43 added a default attribution text (original discussion about it in https://github.com/darribas/contextily/issues/25).

However, I am opening an issue to argue that this default is not really optimal IMO:

  • For many plots, the text is too big and "falls off" the image.

    Eg, just using all defaults and plotting the NYC boroughs gives me:

    import contextily
    import geopandas
    
    df = geopandas.read_file(geopandas.datasets.get_path('nybb'))
    df = df.to_crs(epsg=3857)
    
    ax = df.plot(ax=ax)
    contextily.add_basemap(ax)
    

    gives

    test

    (which doesn't give a good first impression I think)

  • It hardcodes the text, making this only applicable for the default tile provider.
    Which means that once you specify another provider / map style, you also need to specify the attribution text to make your figure not incorrect.

Both are probably fixable (for the first, we might need to somehow detect what the text size can be given the image size, not sure if that is possible with matplotlib. For the second we might need more complex provider definition with additional attributes).
But personally, until those are fixed, I would remove the default addition of the attribution text (in the idea of better no attribution than a sub-optimal one). To be clear, in that proposal, we of course would keep the generic functionality added in the other PR, so you can still manually add an attribution with add_attribution or specifying the text.

Thought on disabling the attribution text by default for now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions