glue-jupyter icon indicating copy to clipboard operation
glue-jupyter copied to clipboard

There should be an way to set a subset's color from the subset

Open eteq opened this issue 7 years ago • 4 comments

Continuing in a series of issues that are "confusing elements of the API" from work on #28 :

It would be useful to have programatic control of the color used for a subset across all visualizations. Alternatively/ideally, also set the color of a non-subset in the same manner.

eteq avatar Sep 18 '18 22:09 eteq

Just to check, does this work? app.data_collection[0].subsets[0].style.color = 'blue'? Clearly an intuitive API, no? 😉 If you have a reference to the dataset you can do data.subsets[0].style.color = 'blue'.

astrofrog avatar Sep 18 '18 22:09 astrofrog

Aha! That does indeed work. So if you like, @astrofrog, you can rename this issue to "make app.data_collection[0].subsets[0].style.color = 'color' easier to intuit" :wink:

eteq avatar Sep 24 '18 02:09 eteq

I think adding the style argument (color, opacity) to add_data might be useful.

maartenbreddels avatar Sep 24 '18 08:09 maartenbreddels

I agree, and same when making new subsets

astrofrog avatar Sep 24 '18 10:09 astrofrog