Revised pixelRatio in 3D plots to address multiple bugs#3573
Revised pixelRatio in 3D plots to address multiple bugs#3573
Conversation
…tly.js side to work fine on iOS and FireFox bug fix issue 3572 to preserve line widths in save 3d plots as image button as well as CI removed an unused ortho argument from plot_api subroutine improved ticks distances in orthographic views using latest gl-axes3d
package.json
Outdated
| "gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#3580a0eedd81b9f212186caa8e7018d8016274fe", | ||
| "gl-pointcloud2d": "^1.0.2", | ||
| "gl-scatter3d": "^1.1.6", | ||
| "gl-scatter3d": "git://github.com/gl-vis/gl-scatter3d.git#6292ada845bdcd44a8e2db2d3c5e18c96c9ac210", |
There was a problem hiding this comment.
package.json
Outdated
| "gl-mesh3d": "git://github.com/gl-vis/gl-mesh3d.git#31d34ba3cec063697cc3891e141532cd80d95ba3", | ||
| "gl-plot2d": "^1.4.2", | ||
| "gl-plot3d": "^2.0.0", | ||
| "gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#3580a0eedd81b9f212186caa8e7018d8016274fe", |
There was a problem hiding this comment.
package.json
Outdated
| "gl-cone3d": "git://github.com/gl-vis/gl-cone3d.git#ec71aa87233d04b543ae53854c9a1182d40fc8ac", | ||
| "gl-contour2d": "^1.1.5", | ||
| "gl-error3d": "^1.0.13", | ||
| "gl-error3d": "git://github.com/gl-vis/gl-error3d.git#75ec29dd1dde51a697f718cdacf76e36a7bfd38c", |
There was a problem hiding this comment.
package.json
Outdated
| "gl-streamtube3d": "^1.1.2", | ||
| "gl-surface3d": "^1.4.1", | ||
| "gl-streamtube3d": "git://github.com/gl-vis/gl-streamtube3d.git#ecdaa1dbbcd315ba06133aeccf870c98b993a8ae", | ||
| "gl-surface3d": "git://github.com/gl-vis/gl-surface3d.git#96e61eebac18e9b525f7f3e6b714291b5d1b4bad", |
There was a problem hiding this comment.
|
Wow. Fantastic PR @archmoj !
Are there any noticeable differences in the new baselines? Glancing at them quickly didn't reveal anything, but I'd like to double-check with you. |
test/image/mocks/gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges.json
Outdated
Show resolved
Hide resolved
| }); | ||
|
|
||
| it('@gl should display correct hover labels (mesh3d case)', function(done) { | ||
| it('@noCI @gl should display correct hover labels (mesh3d case)', function(done) { |
There was a problem hiding this comment.
Does this test still pass locally using
(plotly.js) $ ./tasks/noci_test.sh
?
There was a problem hiding this comment.
Unfortunately no. The mock is unexpectedly rotated after the click possibly related to uirevision.
But I need to figure that out.`
There was a problem hiding this comment.
Yes please,
(plotly.js) $ ./tasks/noci_test.sh
should (always 😄 ) pass.
| this.container = sceneContainer; | ||
| this.staticMode = !!options.staticPlot; | ||
| this.pixelRatio = options.plotGlPixelRatio || 2; | ||
| this.pixelRatio = this.pixelRatio || options.plotGlPixelRatio || 2; |
There was a problem hiding this comment.
This may break graphs where users set config option plotGlPixelRatio:
plotly.js/src/plot_api/plot_config.js
Lines 309 to 319 in 13b925c
Orca does it here:
using (a strange) value:
There was a problem hiding this comment.
Oh wait nevermind, this.pixelRatio isn't set by default (correct?) so options.plotGlPixelRatio is honoured.
There was a problem hiding this comment.
Ok great. Can you try generating the gl3d_* baseline using orca with a few different plotGlPixelRatio values?
You may want to modify:
Lines 31 to 39 in 3e15f17
to get orca started easily and you might have to tweak the orca src files e.g. here:
or
to pass the different plotGlPixelRatio values down to plotly.js
There was a problem hiding this comment.
@etpinard Thank you so much for the links. Using orca I was able to produce gl3d_* images from this branch and compared them against the master branch. I also tweaked the pixelRatio of orca module and the configuration has an impact.
Well the primary goal of this PR was to possibly improve rendering of 3-D plots on different browsers & OS. Although in the other PR #3571 I was able to improve the quality of CI images by doubling the |
new baselines using previous dims
baseline with original width
I don't think that's necessary, but we should make sure that users setting |
Regarding your question changes are noticeable in the following examples i.e. mainly related to surface contour lines and error bars. |
|
Going to slip this in 1.45.0. This is the last PR for 1.45.0 I promise 😄 |
|
|
💃 💃 💃 |

Supersedes #3571.
pixelRatioin various 3d modules and on theplotly.jsside to work well on iOS, FireFox as well as Chrome.orthoargument fromplot_api/subroutines.jsadded in Orthographic projection for 3D plots - finalist #3550.Codepen to test the fix for #3387.
Codepen to test the fix for #3572.
Codepen to test the fix for #3014.
@plotly/plotly_js