Skip to content

Conversation

@mbostock
Copy link
Member

@mbostock mbostock commented Mar 2, 2023

Fixes #1308; adds automatic opt-out of opacity scale.
Fixes #1309; adds per-channel scale overrides for bin & group transform outputs.

@mbostock mbostock requested a review from Fil March 2, 2023 19:41
@mbostock mbostock marked this pull request as ready for review March 4, 2023 01:47
@mbostock
Copy link
Member Author

mbostock commented Mar 4, 2023

What do you think, @Fil? If you don’t think automatic opt-out of the opacity scale is a good idea, I could extract the fix for #1309 into a separate PR. I have mixed feelings about this because it feels like it’s more likely to get a false positive (false negative?) where numbers that happen to be in the interval [0, 1] are erroneously interpreted as literal opacities.

Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me that we would consider values in [0, 1] as literal opacities—the risks and benefits are similar to what we do for colors, and it would be more consistent.

I'm going to change the markov-chain example back to "auto", because it's what I had in mind when I wrote it — even though it ended up scaled up by 1/0.8 :-)

Fil and others added 2 commits March 6, 2023 17:15
@net
Copy link

net commented May 17, 2023

Could we get this for just "opacity" (in addition to "strokeOpacity" and "fillOpacity")?

@Fil Fil mentioned this pull request May 17, 2023
@Fil
Copy link
Contributor

Fil commented May 17, 2023

good catch, @net! this is fixed now in main (issue #1570, merged PR #1571).

@net
Copy link

net commented May 17, 2023

@Fil awesome!

chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* automatic opt-out of opacity scale

* reducer scale overrides

* use 'auto' scaling for markov-chain (in this case, 'auto' is identity, since all the numbers are in [0.1, 0.8])

* shorter

---------

Co-authored-by: Philippe Rivière <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants