Skip to content

Consider making marker private and instead only set it in add_markers or start_marking #29

Closed
@eteq

Description

@eteq

Right now there's a mix of a stateful and a non-stateful idiom in how you set the style of markers. self.markers is settable by the user, but it can also be set in start_marking. add_markers also uses self.markers, but does not have a markers keyword.

So I see two ways to fix this:

  1. Add a markers keyword to add_markers
  2. Do 1 and also make self.markers private
  3. remove markers from start_marking

I really don't like 3 because I think it just makes sense to be able to set your marker style when you add the marks. So that leaves 1 and 2 - 2 is more "pure" (i.e., there's then one way to do it), but has the downside of breaking backwards compatibility (which we may or may not care about).

Triggered by spacetelescope/jdaviz#699

cc @pllim @mwcraig

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions