You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The normalizeX and normalizeY transforms mirror mapX and mapY, the only difference being that you specify a shorthand basis instead of a generic map. But the normalize method isn’t a transform, like the map transform: it returns a map implementation. And hence you have to use it in conjunction with the map transform like so:
If desired, we could retain the existing normalize method as Plot.normalizer or some such. (We might offer a similar Plot.reducer for reducer implementations in the future.) Possibly we could change Plot.normalize while retaining backwards compatibility by checking what you pass in, but it’s a little dicey. 🙂
I ran into this again because I wanted to apply a tip to a line with a window transform using the title channel. I was confused why the non-windowed values were appearing in the tip because the windowY transform doesn’t affect the title channel.
The normalizeX and normalizeY transforms mirror mapX and mapY, the only difference being that you specify a shorthand basis instead of a generic map. But the normalize method isn’t a transform, like the map transform: it returns a map implementation. And hence you have to use it in conjunction with the map transform like so:
It would be shorter and more consistent to have normalize be a transform just like map, where you declare outputs and inputs:
If desired, we could retain the existing normalize method as Plot.normalizer or some such. (We might offer a similar Plot.reducer for reducer implementations in the future.) Possibly we could change Plot.normalize while retaining backwards compatibility by checking what you pass in, but it’s a little dicey. 🙂
Inspired by #1354.
The text was updated successfully, but these errors were encountered: