8000 Fix width of box plots with log-scale axis by s417-lama · Pull Request #1 · s417-lama/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix width of box plots with log-scale axis #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

s417-lama
Copy link
Owner

Fixes an issue of box plots that box width is also log-scaled with log axis (plotly#3508).
I changed the setting of box widths from raw-value-based one to linearized-value-based one.

@etpinard
Copy link

Hi @s417-lama, using linearized coordinates (l) is interesting solution. Judging by

image

looks like the gaps in-between the boxes are bit large (when compared to a corresponding type: 'linear' axis)


Moreover, have you ran the image and jasmine tests off your branch? I'd be interested to know your patch breaks any of our tests.

@s417-lama
Copy link
Owner Author

@etpinard Thank you for trying it!

... looks like the gaps in-between the boxes are bit large (when compared to a corresponding type: 'linear' axis)

That is an expected behaviour; the width of box plots is determined by the min distance among them (in this case, the distance between 50 and 100).

Without trace 1, it looks like this figure:
box_log_scale

Moreover, have you ran the image and jasmine tests off your branch? I'd be interested to know your patch breaks any of our tests.

I ran the tests. I think my change does not affect them.

Actually, in my local environment, some tests fail even in master branch.
Just to inform you, I put the test results below.

Running environment:

$ uname -a
Linux shiina-XPS-15-9570 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ google-chrome --version
Google Chrome 77.0.3865.120

$ npm -v
6.9.0

Result of npm test-jasmine:

> plotly.js@1.50.0 test-jasmine /home/shiina/workspace/github/plotly.js
> karma start test/jasmine/karma.conf.js

Deprecated private createPreprocessor() API
16 10 2019 20:07:53.765:INFO [framework.browserify]: registering rebuild (autoWatch=true)
16 10 2019 20:08:09.446:INFO [framework.browserify]: 49071639 bytes written (14.70 seconds)
16 10 2019 20:08:09.787:INFO [framework.browserify]: bundle built
16 10 2019 20:08:09.887:WARN [karma]: No captured browser, open http://localhost:9876/
16 10 2019 20:08:09.897:INFO [karma-server]: Karma v4.3.0 server started at http://0.0.0.0:9876/
16 10 2019 20:08:09.897:INFO [launcher]: Launching browsers _Chrome with concurrency unlimited
16 10 2019 20:08:09.900:INFO [launcher]: Starting browser Chrome
16 10 2019 20:08:10.345:INFO [Chrome 77.0.3865 (Linux 0.0.0)]: Connected on socket IkIVJhEdUM_a6sd4AAAA with id 82206751
16 10 2019 20:08:10.351:WARN [middleware:karma]: Invalid file type (json), defaulting to js.
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
...................................................................
Chrome 77.0.3865 (Linux 0.0.0) axis zoom/pan and main plot zoom updates matching axes no-constrained x-axes matching x-axes subplot case zoombox on x3y FAILED
        Error: Expected 1.9886646071934624 to be close to 1.974, 1.5, 'xaxis - after zoombox on x3y|event data [1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:877:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318142:60
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:871:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318136:25
        Error: Expected 1.9886646071934624 to be close to 1.974, 1.5, 'xaxis2 - after zoombox on x3y|event data [1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:877:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318142:60
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:871:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318136:25
        Error: Expected 1.9886646071934624 to be close to 1.974, 1.5, 'xaxis3 - after zoombox on x3y|event data [1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:877:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318142:60
            at <Jasmine>
            at /tmp/test/jasmine/tests/cartesian_interact_test.js:871:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:318136:25
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.......................................
Chrome 77.0.3865 (Linux 0.0.0) Test gl3d before/after plot @noCI @gl should not rotate camera on the very first click before scene is complete and then should rotate FAILED
        Error: Expected -0.35196114939349143 to be close to 0, 2, 'cameraBefore.up[0]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:97:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339867:40
        Error: Expected -0.3519611493934914 to be close to 0, 2, 'cameraBefore.up[1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:98:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339868:40
        Error: Expected 0.8673215658769386 to be close to 1, 2, 'cameraBefore.up[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:99:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339869:40
        Error: Expected 1.20607917778328 to be close to 1.2, 2, 'cameraBefore.eye[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:105:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339875:41
        Error: Expected -0.3015257334654786 to be close to 0, 2, 'cameraAfter.up[0]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339882:39
        Error: Expected -0.30152573346547856 to be close to 0, 2, 'cameraAfter.up[1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:113:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339883:39
        Error: Expected 0.9045244408617217 to be close to 1, 2, 'cameraAfter.up[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:114:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339884:39
        Error: Expected 1.2058605323023153 to be close to 1.2, 2, 'cameraAfter.eye[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:120:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339890:40
        Error: Expected -0.24018273792901546 to be close to 0, 2, 'cameraFinal.up[0]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:127:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339897:39
        Error: Expected -0.24018273792901543 to be close to 0, 2, 'cameraFinal.up[1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:128:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339898:39
        Error: Expected 0.940544791491529 to be close to 1, 2, 'cameraFinal.up[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:129:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339899:39
        Error: Expected 1.198968527531936 not to be close to 1.2, 2, 'cameraFinal.eye[0]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:133:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339903:44
        Error: Expected 1.1989685275319355 not to be close to 1.2, 2, 'cameraFinal.eye[1]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:134:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339904:44
        Error: Expected 1.2020602896593 not to be close to 1.2, 2, 'cameraFinal.eye[2]'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/gl3d_plot_interact_test.js:135:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:339905:44
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.......................................16 10 2019 20:12:10.081:WARN [web-server]: 404: /invalidUrl
.........................................
................................................................................
................................................................................
................................................................................
................................................................................
......................
WARN: 'Unable to perform style diff: Unimplemented: setSprite..  Rebuilding the style from scratch.'
..
WARN: 'Unable to perform style diff: Unimplemented: setSprite, setLayerProperty..  Rebuilding the style from scratch.'
.16 10 2019 20:13:01.571:WARN [web-server]: 404: /invalid
...................16 10 2019 20:13:17.375:WARN [web-server]: 404: /invalidUrl
16 10 2019 20:13:17.375:WARN [web-server]: 404: /invalidUrl-two

ERROR: Error: The user aborted a request.
Error: The user aborted a request.
    at http://localhost:9876/absolute/tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js?84fa39ad82139bdfa28469e772d383e65137c0fb:59968:17154
................................................................................
................................................................................
................................................................................
................................................................................
...................
WARN: 'Image "-15" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.'
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
.................................
Chrome 77.0.3865 (Linux 0.0.0) Test select box and lasso per trace: @flaky should work for waterfall traces FAILED
        Error: Expected 2 to be 4, '(call #0) selected points length'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1753:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387870:32
            at /tmp/test/jasmine/tests/select_test.js:2330:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388447:21
        Error: Expected 5,6 to be close to 5,6,7,8 (call #0) selectedpoints array for trace 0
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected 289.8550724637681,57.97101449275362,521.7391304347826,405.7971014492753 to be close to 288.8086,57.7617,288.8086,519.8555,404.3321 (call #0) lasso points x coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1830:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387947:22
            at /tmp/test/jasmine/tests/select_test.js:2339:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388456:21
        Error: Expected 4.338709677419355,6.758064516129031,6.758064516129031,5.548387096774193 to be close to 4.3387,6.758,9.1774,6.75806,5.54838 (call #0) lasso points y coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1832:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387949:22
            at /tmp/test/jasmine/tests/select_test.js:2339:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388456:21
        Error: Expected 3 to be 4, 'plotly_selecting call count: waterfall lasso (before dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1855:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387972:17
        Error: Expected 3 to be 4, 'plotly_selecting call count: waterfall lasso (after dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1860:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387977:17
        Error: Expected 173.91304347826087,289.8550724637681 to be close to 173.28519,288.8086 (call #0) select box range x coords
   
8000
         at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1808:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387925:22
            at /tmp/test/jasmine/tests/select_test.js:2361:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388478:21
Chrome 77.0.3865 (Linux 0.0.0) Test select box and lasso per trace: @flaky should work for funnel traces FAILED
        Error: Expected 2 to be 3, '(call #0) selected points length'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1753:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387870:32
            at /tmp/test/jasmine/tests/select_test.js:2388:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388505:21
        Error: Expected 1 to be close to 1,2 (call #0) selectedpoints array for trace 1
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected -154.56790123456787,-1700.2469135802467,1391.1111111111109,618.2716049382715 to be close to -161.6974,-1701.6728,-161.6974,1378.2779,608.2902 (call #0) lasso points x coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1830:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387947:22
            at /tmp/test/jasmine/tests/select_test.js:2397:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388514:21
        Error: Expected 1.1129032258064515,1.9193548387096775,1.9193548387096775,1.5161290322580645 to be close to 1.1129,1.9193,2.7258,1.9193,1.5161 (call #0) lasso points y coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1832:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387949:22
            at /tmp/test/jasmine/tests/select_test.js:2397:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388514:21
        Error: Expected 3 to be 4, 'plotly_selecting call count: funnel lasso (before dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1855:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387972:17
        Error: Expected 3 to be 4, 'plotly_selecting call count: funnel lasso (after dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1860:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387977:17
        Error: Timeout - Async callback was not invoked within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL)
            at <Jasmine>
ERROR: 'TypeError: Cannot read property 'lassoPoints' of undefined
    at http://localhost:9876/absolute/tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js?84fa39ad82139bdfa28469e772d383e65137c0fb:387940:44
    at http://localhost:9876/absolute/tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js?84fa39ad82139bdfa28469e772d383e65137c0fb:388579:21'
Chrome 77.0.3865 (Linux 0.0.0) Test select box and lasso per trace: @flaky should work for bar traces FAILED
        Error: Expected 0 to be 1, 'selection corner count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:53:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386170:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 2, 'selection outline count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:55:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386172:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 1, 'selection corner count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:53:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386170:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 2, 'selection outline count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:55:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386172:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 1, 'selection corner count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:53:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386170:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 2, 'selection outline count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:55:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386172:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 1, 'selection corner count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:53:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386170:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 2, 'selection outline count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:55:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386172:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 1, 'selection corner count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:53:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386170:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 2, 'selection outline count'.
            at <Jasmine>
            at assertSelectionNodes (/tmp/test/jasmine/tests/select_test.js:55:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386172:10)
            at EventEmitter.<anonymous> (/tmp/test/jasmine/tests/select_test.js:76:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386193:13)
            at emitOne (/tmp/node_modules/browserify/node_modules/events/events.js:106:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:12357:13)
        Error: Expected 0 to be 3, '(call #1) selected points length'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1753:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387870:32
            at /tmp/test/jasmine/tests/select_test.js:2412:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388529:21
        Error: Expected  to be close to 2 (call #1) selectedpoints array for trace 0
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected  to be close to 1,2 (call #1) selectedpoints array for trace 1
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected -927.4074074074073,-540.9876543209876 to be close to -931.6851,608.2902 (call #0) select box range x coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1808:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387925:22
            at /tmp/test/jasmine/tests/select_test.js:2421:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388538:21
        Error: Expected 0.3064516129032258,1.1129032258064515 to be close to 1.1129,2.7258 (call #0) select box range y coords
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1810:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387927:22
            at /tmp/test/jasmine/tests/select_test.js:2421:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388538:21
        Error: Expected 5 to be 1, 'plotly_selecting call count: funnel select (before dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1855:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387972:17
        Error: Expected 0 to be 20, '(call #0) selected points length'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1753:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387870:32
            at /tmp/test/jasmine/tests/select_test.js:2448:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:388565:21
        Error: Expected  to be close to 49,50,51,52,53,54,55,56,57 (call #0) selectedpoints array for trace 0
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected  to be close to 51,52,53,54,55,56 (call #0) selectedpoints array for trace 1
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected  to be close to 49,50,51,52,53 (call #0) selectedpoints array for trace 2
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1785:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387902:36
            at <Jasmine>
            at /tmp/test/jasmine/tests/select_test.js:1780:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387897:21
        Error: Expected TypeError: Cannot read property 'lassoPoints' of undefined to be undefined.
            at <Jasmine>
            at failTest (/tmp/test/jasmine/assets/fail_test.js:24:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:304191:23)
Chrome 77.0.3865 (Linux 0.0.0) Test select box and lasso per trace: @flaky should work for date/category traces FAILED
        Error: Expected 4 to be 1, 'plotly_selecting call count: funnel select (after dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:112:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386229:26)
            at /tmp/test/jasmine/tests/select_test.js:1860:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387977:17
        Error: Expected 3 to be 2, 'plotly_selected call count: funnel select (after dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:113:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386230:25)
            at /tmp/test/jasmine/tests/select_test.js:1860:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387977:17
        Error: Expected 3 to be 2, 'plotly_selected call count: date/category lasso (after dblclick)'.
            at <Jasmine>
            at assertEventCounts (/tmp/test/jasmine/tests/select_test.js:113:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:386230:25)
            at /tmp/test/jasmine/tests/select_test.js:1860:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:387977:17
................................................................................
................................................................................
.....................................................................
Chrome 77.0.3865 (Linux 0.0.0) Test splom interactions: @gl should clear graph and replot when canvas and WebGL context dimensions do not match FAILED
        Error: Expected spy cleanPlot to have been called 3 times. It was called 1 times.
            at <Jasmine>
            at /tmp/test/jasmine/tests/splom_test.js:966:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392894:34
            at <Jasmine>
            at assertFnCall (/tmp/test/jasmine/tests/splom_test.js:965:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392893:21)
        Error: Expected spy supplyDefaults to have been called 2 times. It was called 1 times.
            at <Jasmine>
            at /tmp/test/jasmine/tests/splom_test.js:966:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392894:34
            at <Jasmine>
            at assertFnCall (/tmp/test/jasmine/tests/splom_test.js:965:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392893:21)
        Error: Expected spy doCalcdata to have been called once. It was called 0 times.
            at <Jasmine>
            at /tmp/test/jasmine/tests/splom_test.js:966:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392894:34
            at <Jasmine>
            at assertFnCall (/tmp/test/jasmine/tests/splom_test.js:965:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392893:21)
        Error: Expected spy log to have been called with [ 'WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug. Clearing graph and plotting again.' ] but it was never called.
            at <Jasmine>
            at /tmp/test/jasmine/tests/splom_test.js:994:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:392922:18
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
...................
Chrome 77.0.3865 (Linux 0.0.0) Plotly.react transitions: @flaky should transition layout when one or more axis auto-ranged value changed FAILED
        Error: Failed: must transition autoranged axes, not the traces- Something went wrong when building "actual" callData list
            at <Jasmine>
            at assertSpies (/tmp/test/jasmine/tests/transition_test.js:375:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404532:20)
            at /tmp/test/jasmine/tests/transition_test.js:826:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404983:13
        Error: Expected true to be false, 'transition just traces, as now axis ranges are set | Item #1 | @method transitionAxes | did (not) get called'.
            at <Jasmine>
            at /tmp/test/jasmine/tests/transition_test.js:340:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404497:34
            at <Jasmine>
            at assertSpies (/tmp/test/jasmine/tests/transition_test.js:324:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404481:15)
        Error: Failed: transition just traces, as now axis ranges are set- Something went wrong when building "actual" callData list
            at <Jasmine>
            at assertSpies (/tmp/test/jasmine/tests/transition_test.js:375:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404532:20)
            at /tmp/test/jasmine/tests/transition_test.js:841:1 <- /tmp/088dc7eadc56d7d784a8ca4e3ab6a9ea.browserify.js:404998:13
......
Chrome 77.0.3865 (Linux 0.0.0) ERROR
  An error was thrown in afterAll
  Uncaught TypeError: Cannot read property 'xaxis' of undefined thrown
Chrome 77.0.3865 (Linux 0.0.0): Executed 4544 of 4796 (8 FAILED) ERROR (10 mins 53.566 secs / 10 mins 36.177 secs)
16 10 2019 20:19:35.887:WARN [Chrome 77.0.3865 (Linux 0.0.0)]: Disconnected (0 times), because no message in 30000 ms.
Chrome 77.0.3865 (Linux 0.0.0) ERROR
  Disconnected, because no message in 30000 ms.
Chrome 77.0.3865 (Linux 0.0.0): Executed 4544 of 4796 (8 FAILED) DISCONNECTED (11 mins 23.567 secs / 10 mins 36.177 secs)

Results of npm test-image:

...
ok 420 gl3d_ibm-plot should be pixel perfect
ok 421 gl3d_indicator_scatter3d should be pixel perfect
ok 422 gl3d_isosurface_1single-surface_middle-range should be pixel perfect
/home/shiina/workspace/github/plotly.js/tasks/util/common.js:7
    errorCb = errorCb ? errorCb : function(err) { if(err) throw err; };
                                                          ^

Error: Command failed: docker exec -i imagetest /bin/bash -c "cd /var/www/streambed/image_server/plotly.js && cp -f test/image/index.html ../server_app/index.html && sed -i s/process.env.PLOTLY_MAPBOX_DEFAULT_ACCESS_TOKEN/\'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ\'/ ../server_app/main.js && supervisorctl restart nw1 && wget --server-response --spider --tries=20 --retry-connrefused http://localhost:9010/ping && sleep 5 && node test/image/compare_pixels_test.js "
Spider mode enabled. Check if remote file exists.
--2019-10-17 02:12:07--  http://localhost:9010/ping
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:9010... failed: Connection refused.
Connecting to localhost (localhost)|::1|:9010... failed: Cannot assign requested address.
Retrying.

Spider mode enabled. Check if remote file exists.
--2019-10-17 02:12:08--  (try: 2)  http://localhost:9010/ping
Connecting to localhost (localhost)|127.0.0.1|:9010... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Content-Type: text/plain
  Date: Thu, 17 Oct 2019 02:12:08 GMT
  Connection: keep-alive
Length: unspecified [text/plain]
Remote file exists.

buffer.js:671
          throw new TypeError('Unknown encoding: ' + encoding);
          ^

TypeError: Unknown encoding: gl3d_isosurface_2surfaces-checker_spaceframe:
    at Buffer.write (buffer.js:671:17)
    at fromString (buffer.js:181:26)
    at new Buffer (buffer.js:61:12)
    at createWriteReq (net.js:746:38)
    at Socket._writeGeneric (net.js:698:11)
    at Socket._write (net.js:721:8)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:287:5)
    at Socket.Writable.write (_stream_writable.js:215:11)
    at Socket.write (net.js:648:40)

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:200:13)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'docker exec -i imagetest /bin/bash -c "cd ' +
    '/var/www/streambed/image_server/plotly.js && cp -f ' +
    'test/image/index.html ../server_app/index.html && sed -i ' +
    "s/process.env.PLOTLY_MAPBOX_DEFAULT_ACCESS_TOKEN/\\'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ\\'/ " +
    '../server_app/main.js && supervisorctl restart nw1 && wget ' +
    '--server-response --spider --tries=20 --retry-connrefused ' +
    'http://localhost:9010/ping && sleep 5 && node ' +
    'test/image/compare_pixels_test.js "'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plotly.js@1.50.0 test-image: `node tasks/test_image.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plotly.js@1.50.0 test-image script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/shiina/.npm/_logs/2019-10-17T02_17_57_712Z-debug.log

@s417-lama
Copy link
Owner Author

Fix in 370e61a is not related to any tests, but there was a problem when a value axis (y axis in the example) is also log scale.

@etpinard
Copy link
etpinard commented Oct 17, 2019

Hi again @s417-lama - you're right those test failures don't seem related to your patch.

I think you're ready to make a PR to the main plotly.js repo. We'll take a closer look at your logic there.

@s417-lama
Copy link
Owner Author

Thanks! I'll make a PR to the main repo.

@s417-lama s417-lama closed this Oct 17, 2019
s417-lama pushed a commit that referenced this pull request Oct 14, 2020
Pull all changes from original plotly to the fork
s417-lama pushed a commit that referenced this pull request Oct 14, 2020
s417-lama pushed a commit that referenced this pull request Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0