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
While investigating #104 I noticed that the x/y domain of the axes are incorrectly bound to x/y data domain instead of the x/y scale domain. This is a problem as it makes the axis show the data domain while the x/y scale function might have re-scaled the data.
For instance, in the following the x data domain is [-10, 10] and the y data domain is [-1, 1]. To render the points on a common range, e.g., [-10, 10], we would pass (-10, 10) to x_scale and y_scale. Internally, the data is normalized to [0, 1] using the scale functions. By default, jscatter uses a linear scale that maps [min, max] linearly to [0, 1] but here we enforce the mapping to be [-10, 10] to [0, 1]. Now the issue is that on the JS kernel, the x/y axis would use the pre-normalized data domain (i.e., [-10, 10] for x and [-1, 1] for y). But this is incorrect. The x/y axis should use the post-normalized data domain, i.e., [-10, 10] for both: x and y.
While investigating #104 I noticed that the x/y domain of the axes are incorrectly bound to x/y data domain instead of the x/y scale domain. This is a problem as it makes the axis show the data domain while the x/y scale function might have re-scaled the data.
For instance, in the following the x data domain is
[-10, 10]
and the y data domain is[-1, 1]
. To render the points on a common range, e.g.,[-10, 10]
, we would pass(-10, 10)
tox_scale
andy_scale
. Internally, the data is normalized to[0, 1]
using the scale functions. By default, jscatter uses a linear scale that maps[min, max]
linearly to[0, 1]
but here we enforce the mapping to be[-10, 10]
to[0, 1]
. Now the issue is that on the JS kernel, the x/y axis would use the pre-normalized data domain (i.e.,[-10, 10]
for x and[-1, 1]
for y). But this is incorrect. The x/y axis should use the post-normalized data domain, i.e.,[-10, 10]
for both: x and y.The code below leads to the following issue:
The data is appropriated rendered at the common
[-10, 10]
range but the y axis reports[-0.1, 0.1]
By manually assigning the correct x/y domain, as follows, we get the correct y axis:
The text was updated successfully, but these errors were encountered: