astrowidgets icon indicating copy to clipboard operation
astrowidgets copied to clipboard

Change marker from a dictionary to a class or `namedtuple`, and change the name from `marker` to `marker_style`

Open mwcraig opened this issue 4 years ago • 2 comments

Right now I have to either read the source code or set iw.marker to a value I know is bad so that I can be reminded of what the keys/values are for a marker.

If we changed it to a class (or a named tuple) then I could also introspect to get the attributes.

I would also find it clearer if the name were marker_style.

Finally, in an ideal world, we might agree on a few basic shapes and colors that viewers implementing the interface need to support.

mwcraig avatar Jul 02 '21 22:07 mwcraig

I agree marker_style is a better name. Nothing against new interface either but would like to see what @eteq thinks.

As for the "basic" supported values and validation, that is trickier because it is very backend specific. Over at glue-jupyter + bqplot, I can't even find a way to change the shape yet (always circles for now).

pllim avatar Jul 06 '21 16:07 pllim

Revisiting this, maybe better as https://docs.python.org/3/library/dataclasses.html

pllim avatar Jun 28 '23 16:06 pllim