Skip to content

Higher-level plotting methods for scale bar, map direction rose and magnetic rose? #2831

Open
@seisman

Description

@seisman

The basemap and coast modules provide the exactly same options for adding scale bars (-L), direction rose (-Td) and magnetic rose (-Tm) to maps.

I think it's more intuitive if we can provide three different higher-level plotting methods, e.g., Figure.scale_bar, Figure.direction_rose, Figure.magnatic_rose?

I'll take the Figure.scale_bar as an example. The -L full syntax is:

-L[g|j|J|n|x]refpoint+wlength[e|f|k|M|n|u][+aalign][+c[[slon/]slat]][+f][+jjustify][+l[label]][+odx[/dy]][+u][+v]

and the function definition will be like:

Figure.scale_bar(
   location=None,  # [g|j|J|n|x]refpoint
   length=None,  # +w
   label_alignment=None,  # +a
   scale_latitude=None, # +c
   scale_longitude=None,  # +c
   fancy=False,  # +f or style="plain" or "fancy"
   justification=None, # +j
   label=None,  # +l
   offset=None, # +o 
   unit=None, # +u
   vertical=None, # +v 
)

Of course, we also need to decide what to do with the box parameter.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions