diff --git a/draftlogs/5500_fix.md b/draftlogs/5500_fix.md new file mode 100644 index 00000000000..9b21190b3cc --- /dev/null +++ b/draftlogs/5500_fix.md @@ -0,0 +1 @@ + - Improve rendering of scattergl, splom and parcoords by implementing plotGlPixelRatio for those traces [[#5500](https://github.com/plotly/plotly.js/pull/5500)] \ No newline at end of file diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js index a31e5189d06..2848063d2e4 100644 --- a/src/plot_api/plot_api.js +++ b/src/plot_api/plot_api.js @@ -222,17 +222,20 @@ function _doPlot(gd, data, layout, config) { }); } + var plotGlPixelRatio = gd._context.plotGlPixelRatio; if(fullLayout._glcanvas) { fullLayout._glcanvas - .attr('width', fullLayout.width) - .attr('height', fullLayout.height); + .attr('width', fullLayout.width * plotGlPixelRatio) + .attr('height', fullLayout.height * plotGlPixelRatio) + .style('width', fullLayout.width + 'px') + .style('height', fullLayout.height + 'px'); var regl = fullLayout._glcanvas.data()[0].regl; if(regl) { // Unfortunately, this can happen when relayouting to large // width/height on some browsers. - if(Math.floor(fullLayout.width) !== regl._gl.drawingBufferWidth || - Math.floor(fullLayout.height) !== regl._gl.drawingBufferHeight + if(Math.floor(fullLayout.width * plotGlPixelRatio) !== regl._gl.drawingBufferWidth || + Math.floor(fullLayout.height * plotGlPixelRatio) !== regl._gl.drawingBufferHeight ) { var msg = 'WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.'; if(drawFrameworkCalls) { diff --git a/src/plots/cartesian/index.js b/src/plots/cartesian/index.js index 04b38ed6735..591f85c2bf5 100644 --- a/src/plots/cartesian/index.js +++ b/src/plots/cartesian/index.js @@ -596,8 +596,8 @@ exports.toSVG = function(gd) { preserveAspectRatio: 'none', x: 0, y: 0, - width: canvas.width, - height: canvas.height + width: canvas.style.width, + height: canvas.style.height }); } diff --git a/src/traces/parcoords/base_plot.js b/src/traces/parcoords/base_plot.js index 8a63c8822f2..7de1cdbd313 100644 --- a/src/traces/parcoords/base_plot.js +++ b/src/traces/parcoords/base_plot.js @@ -39,8 +39,8 @@ exports.toSVG = function(gd) { preserveAspectRatio: 'none', x: 0, y: 0, - width: canvas.width, - height: canvas.height + width: canvas.style.width, + height: canvas.style.height }); } diff --git a/src/traces/parcoords/lines.js b/src/traces/parcoords/lines.js index a17b14001b1..fc1440edfaa 100644 --- a/src/traces/parcoords/lines.js +++ b/src/traces/parcoords/lines.js @@ -160,17 +160,27 @@ function emptyAttributes(regl) { return attributes; } -function makeItem(model, leftmost, rightmost, itemNumber, i0, i1, x, y, panelSizeX, panelSizeY, crossfilterDimensionIndex, drwLayer, constraints) { +function makeItem( + model, leftmost, rightmost, itemNumber, i0, i1, x, y, panelSizeX, panelSizeY, + crossfilterDimensionIndex, drwLayer, constraints, plotGlPixelRatio +) { var dims = [[], []]; for(var k = 0; k < 64; k++) { dims[0][k] = (k === i0) ? 1 : 0; dims[1][k] = (k === i1) ? 1 : 0; } - - var overdrag = model.lines.canvasOverdrag; + x *= plotGlPixelRatio; + y *= plotGlPixelRatio; + panelSizeX *= plotGlPixelRatio; + panelSizeY *= plotGlPixelRatio; + var overdrag = model.lines.canvasOverdrag * plotGlPixelRatio; var domain = model.domain; - var canvasWidth = model.canvasWidth; - var canvasHeight = model.canvasHeight; + var canvasWidth = model.canvasWidth * plotGlPixelRatio; + var canvasHeight = model.canvasHeight * plotGlPixelRatio; + var padL = model.pad.l * plotGlPixelRatio; + var padB = model.pad.b * plotGlPixelRatio; + var layoutHeight = model.layoutHeight * plotGlPixelRatio; + var layoutWidth = model.layoutWidth * plotGlPixelRatio; var deselectedLinesColor = model.deselectedLines.color; @@ -201,13 +211,13 @@ function makeItem(model, leftmost, rightmost, itemNumber, i0, i1, x, y, panelSiz Math.max(1 / 255, Math.pow(1 / model.lines.color.length, 1 / 3)) ], - scissorX: (itemNumber === leftmost ? 0 : x + overdrag) + (model.pad.l - overdrag) + model.layoutWidth * domain.x[0], + scissorX: (itemNumber === leftmost ? 0 : x + overdrag) + (padL - overdrag) + layoutWidth * domain.x[0], scissorWidth: (itemNumber === rightmost ? canvasWidth - x + overdrag : panelSizeX + 0.5) + (itemNumber === leftmost ? x + overdrag : 0), - scissorY: y + model.pad.b + model.layoutHeight * domain.y[0], + scissorY: y + padB + layoutHeight * domain.y[0], scissorHeight: panelSizeY, - viewportX: model.pad.l - overdrag + model.layoutWidth * domain.x[0], - viewportY: model.pad.b + model.layoutHeight * domain.y[0], + viewportX: padL - overdrag + layoutWidth * domain.x[0], + viewportY: padB + layoutHeight * domain.y[0], viewportWidth: canvasWidth, viewportHeight: canvasHeight }, constraints); @@ -231,6 +241,16 @@ module.exports = function(canvasGL, d) { var isPick = d.pick; var regl = d.regl; + var gl = regl._gl; + var supportedLineWidth = gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE); + // ensure here that plotGlPixelRatio is within supported range; otherwise regl throws error + var plotGlPixelRatio = Math.max( + supportedLineWidth[0], + Math.min( + supportedLineWidth[1], + d.viewModel.plotGlPixelRatio + ) + ); var renderState = { currentRafs: {}, @@ -307,7 +327,7 @@ module.exports = function(canvasGL, d) { frag: fragmentShaderSource, primitive: 'lines', - lineWidth: 1, + lineWidth: plotGlPixelRatio, attributes: attributes, uniforms: { resolution: regl.prop('resolution'), @@ -454,6 +474,7 @@ module.exports = function(canvasGL, d) { var x = p.canvasX; var y = p.canvasY; var nextX = x + p.panelSizeX; + var plotGlPixelRatio = p.plotGlPixelRatio; if(setChanged || !prevAxisOrder[i0] || prevAxisOrder[i0][0] !== x || @@ -467,7 +488,8 @@ module.exports = function(canvasGL, d) { p.panelSizeX, p.panelSizeY, p.dim0.crossfilterDimensionIndex, isContext ? 0 : isPick ? 2 : 1, - constraints + constraints, + plotGlPixelRatio ); renderState.clearOnly = clearOnly; diff --git a/src/traces/parcoords/parcoords.js b/src/traces/parcoords/parcoords.js index af65f2e0131..2670e3e7d5c 100644 --- a/src/traces/parcoords/parcoords.js +++ b/src/traces/parcoords/parcoords.js @@ -369,7 +369,7 @@ function calcTilt(angle, position) { }; } -function updatePanelLayout(yAxis, vm) { +function updatePanelLayout(yAxis, vm, plotGlPixelRatio) { var panels = vm.panels || (vm.panels = []); var data = yAxis.data(); for(var i = 0; i < data.length - 1; i++) { @@ -383,6 +383,7 @@ function updatePanelLayout(yAxis, vm) { p.panelSizeY = vm.model.canvasHeight; p.y = 0; p.canvasY = 0; + p.plotGlPixelRatio = plotGlPixelRatio; } } @@ -433,6 +434,7 @@ module.exports = function parcoords(gd, cdModule, layout, callbacks) { var fullLayout = gd._fullLayout; var svg = fullLayout._toppaper; var glContainer = fullLayout._glcontainer; + var plotGlPixelRatio = gd._context.plotGlPixelRatio; var paperColor = gd._fullLayout.paper_bgcolor; calcAllTicks(cdModule); @@ -452,6 +454,7 @@ module.exports = function parcoords(gd, cdModule, layout, callbacks) { .each(function(d) { // FIXME: figure out how to handle multiple instances d.viewModel = vm[0]; + d.viewModel.plotGlPixelRatio = plotGlPixelRatio; d.viewModel.paperColor = paperColor; d.model = d.viewModel ? d.viewModel.model : null; }); @@ -536,7 +539,7 @@ module.exports = function parcoords(gd, cdModule, layout, callbacks) { .classed(c.cn.yAxis, true); parcoordsControlView.each(function(p) { - updatePanelLayout(yAxis, p); + updatePanelLayout(yAxis, p, plotGlPixelRatio); }); glLayers @@ -575,7 +578,7 @@ module.exports = function parcoords(gd, cdModule, layout, callbacks) { e.canvasX = e.x * e.model.canvasPixelRatio; }); - updatePanelLayout(yAxis, p); + updatePanelLayout(yAxis, p, plotGlPixelRatio); yAxis.filter(function(e) { return Math.abs(d.xIndex - e.xIndex) !== 0; }) .attr('transform', function(d) { return strTranslate(d.xScale(d.xIndex), 0); }); @@ -588,7 +591,7 @@ module.exports = function parcoords(gd, cdModule, layout, callbacks) { var p = d.parent; d.x = d.xScale(d.xIndex); d.canvasX = d.x * d.model.canvasPixelRatio; - updatePanelLayout(yAxis, p); + updatePanelLayout(yAxis, p, plotGlPixelRatio); d3.select(this) .attr('transform', function(d) { return strTranslate(d.x, 0); }); p.contextLayer && p.contextLayer.render(p.panels, false, !someFiltersActive(p)); diff --git a/src/traces/scatter/make_bubble_size_func.js b/src/traces/scatter/make_bubble_size_func.js index 644a26dcab8..26cc5db7b90 100644 --- a/src/traces/scatter/make_bubble_size_func.js +++ b/src/traces/scatter/make_bubble_size_func.js @@ -5,7 +5,10 @@ var isNumeric = require('fast-isnumeric'); // used in the drawing step for 'scatter' and 'scattegeo' and // in the convert step for 'scatter3d' -module.exports = function makeBubbleSizeFn(trace) { +module.exports = function makeBubbleSizeFn(trace, factor) { + if(!factor) { + factor = 2; + } var marker = trace.marker; var sizeRef = marker.sizeref || 1; var sizeMin = marker.sizemin || 0; @@ -21,7 +24,7 @@ module.exports = function makeBubbleSizeFn(trace) { // TODO add support for position/negative bubbles? // TODO add 'sizeoffset' attribute? return function(v) { - var baseSize = baseFn(v / 2); + var baseSize = baseFn(v / factor); // don't show non-numeric and negative sizes return (isNumeric(baseSize) && (baseSize > 0)) ? diff --git a/src/traces/scattergl/calc.js b/src/traces/scattergl/calc.js index b090ee48bcd..2f65c916d0f 100644 --- a/src/traces/scattergl/calc.js +++ b/src/traces/scattergl/calc.js @@ -83,7 +83,7 @@ module.exports = function calc(gd, trace) { if(!hasTooManyPoints) { ppad = calcMarkerSize(trace, len); } else if(opts.marker) { - ppad = 2 * (opts.marker.sizeAvg || Math.max(opts.marker.size, 3)); + ppad = opts.marker.sizeAvg || Math.max(opts.marker.size, 3); } calcAxisExpansion(gd, trace, xa, ya, x, y, ppad); if(opts.errorX) expandForErrorBars(trace, xa, opts.errorX); diff --git a/src/traces/scattergl/convert.js b/src/traces/scattergl/convert.js index 165f500c181..3a42dc4050c 100644 --- a/src/traces/scattergl/convert.js +++ b/src/traces/scattergl/convert.js @@ -39,6 +39,8 @@ function convertStyle(gd, trace) { textUnsel: undefined }; + var plotGlPixelRatio = gd._context.plotGlPixelRatio; + if(trace.visible !== true) return opts; if(subTypes.hasText(trace)) { @@ -64,24 +66,24 @@ function convertStyle(gd, trace) { if(subTypes.hasLines(trace)) { opts.line = { overlay: true, - thickness: trace.line.width, + thickness: trace.line.width * plotGlPixelRatio, color: trace.line.color, opacity: trace.opacity }; var dashes = (constants.DASHES[trace.line.dash] || [1]).slice(); for(i = 0; i < dashes.length; ++i) { - dashes[i] *= trace.line.width; + dashes[i] *= trace.line.width * plotGlPixelRatio; } opts.line.dashes = dashes; } if(trace.error_x && trace.error_x.visible) { - opts.errorX = convertErrorBarStyle(trace, trace.error_x); + opts.errorX = convertErrorBarStyle(trace, trace.error_x, plotGlPixelRatio); } if(trace.error_y && trace.error_y.visible) { - opts.errorY = convertErrorBarStyle(trace, trace.error_y); + opts.errorY = convertErrorBarStyle(trace, trace.error_y, plotGlPixelRatio); } if(!!trace.fill && trace.fill !== 'none') { @@ -106,6 +108,7 @@ function convertTextStyle(gd, trace) { var tff = textfontIn.family; var optsOut = {}; var i; + var plotGlPixelRatio = gd._context.plotGlPixelRatio; var texttemplate = trace.texttemplate; if(texttemplate) { @@ -191,13 +194,13 @@ function convertTextStyle(gd, trace) { Array.isArray(tfs) ? ( isNumeric(tfs[i]) ? tfs[i] : 0 ) : tfs - ); + ) * plotGlPixelRatio; fonti.family = Array.isArray(tff) ? tff[i] : tff; } } else { // if both are single values, make render fast single-value - optsOut.font = {size: tfs, family: tff}; + optsOut.font = {size: tfs * plotGlPixelRatio, family: tff}; } return optsOut; @@ -283,7 +286,8 @@ function convertMarkerStyle(trace) { } // prepare sizes - var markerSizeFunc = makeBubbleSizeFn(trace); + var sizeFactor = 1; + var markerSizeFunc = makeBubbleSizeFn(trace, sizeFactor); var s; if(multiSize || multiLineWidth) { @@ -308,10 +312,10 @@ function convertMarkerStyle(trace) { // See https://github.com/plotly/plotly.js/pull/1781#discussion_r121820798 if(multiLineWidth) { for(i = 0; i < count; i++) { - borderSizes[i] = optsIn.line.width[i] / 2; + borderSizes[i] = optsIn.line.width[i]; } } else { - s = optsIn.line.width / 2; + s = optsIn.line.width; for(i = 0; i < count; i++) { borderSizes[i] = s; } @@ -335,7 +339,7 @@ function convertMarkerSelection(trace, target) { if(target.marker && target.marker.symbol) { optsOut = convertMarkerStyle(Lib.extendFlat({}, optsIn, target.marker)); } else if(target.marker) { - if(target.marker.size) optsOut.size = target.marker.size / 2; + if(target.marker.size) optsOut.size = target.marker.size; if(target.marker.color) optsOut.colors = target.marker.color; if(target.marker.opacity !== undefined) optsOut.opacity = target.marker.opacity; } @@ -365,10 +369,10 @@ function convertTextSelection(gd, trace, target) { return optsOut; } -function convertErrorBarStyle(trace, target) { +function convertErrorBarStyle(trace, target, plotGlPixelRatio) { var optsOut = { - capSize: target.width * 2, - lineWidth: target.thickness, + capSize: target.width * 2 * plotGlPixelRatio, + lineWidth: target.thickness * plotGlPixelRatio, color: target.color }; diff --git a/src/traces/scattergl/plot.js b/src/traces/scattergl/plot.js index 74acc1b533e..fbc4c2a3610 100644 --- a/src/traces/scattergl/plot.js +++ b/src/traces/scattergl/plot.js @@ -14,15 +14,23 @@ var linkTraces = require('../scatter/link_traces'); var styleTextSelection = require('./edit_style').styleTextSelection; -function getViewport(fullLayout, xaxis, yaxis) { + +function getViewport(fullLayout, xaxis, yaxis, plotGlPixelRatio) { var gs = fullLayout._size; - var width = fullLayout.width; - var height = fullLayout.height; + var width = fullLayout.width * plotGlPixelRatio; + var height = fullLayout.height * plotGlPixelRatio; + + var l = gs.l * plotGlPixelRatio; + var b = gs.b * plotGlPixelRatio; + var r = gs.r * plotGlPixelRatio; + var t = gs.t * plotGlPixelRatio; + var w = gs.w * plotGlPixelRatio; + var h = gs.h * plotGlPixelRatio; return [ - gs.l + xaxis.domain[0] * gs.w, - gs.b + yaxis.domain[0] * gs.h, - (width - gs.r) - (1 - xaxis.domain[1]) * gs.w, - (height - gs.t) - (1 - yaxis.domain[1]) * gs.h + l + xaxis.domain[0] * w, + b + yaxis.domain[0] * h, + (width - r) - (1 - xaxis.domain[1]) * w, + (height - t) - (1 - yaxis.domain[1]) * h ]; } @@ -59,7 +67,7 @@ module.exports = function plot(gd, subplot, cdata) { scene.line2d = createLine(regl); } if(scene.scatter2d === true) { - scene.scatter2d = createScatter(regl, { constPointSize: true }); + scene.scatter2d = createScatter(regl); } if(scene.fill2d === true) { scene.fill2d = createLine(regl); @@ -330,7 +338,7 @@ module.exports = function plot(gd, subplot, cdata) { // provide viewport and range var vpRange0 = { - viewport: getViewport(fullLayout, xaxis, yaxis), + viewport: getViewport(fullLayout, xaxis, yaxis, gd._context.plotGlPixelRatio), // TODO do we need those fallbacks? range: [ (xaxis._rl || xaxis.range)[0], diff --git a/src/traces/splom/base_plot.js b/src/traces/splom/base_plot.js index 4e305006591..e96e28da814 100644 --- a/src/traces/splom/base_plot.js +++ b/src/traces/splom/base_plot.js @@ -86,13 +86,23 @@ function updateGrid(gd) { } function makeGridData(gd) { + var plotGlPixelRatio = gd._context.plotGlPixelRatio; var fullLayout = gd._fullLayout; var gs = fullLayout._size; - var fullView = [0, 0, fullLayout.width, fullLayout.height]; + var fullView = [ + 0, 0, + fullLayout.width * plotGlPixelRatio, + fullLayout.height * plotGlPixelRatio + ]; var lookup = {}; var k; function push(prefix, ax, x0, x1, y0, y1) { + x0 *= plotGlPixelRatio; + x1 *= plotGlPixelRatio; + y0 *= plotGlPixelRatio; + y1 *= plotGlPixelRatio; + var lcolor = ax[prefix + 'color']; var lwidth = ax[prefix + 'width']; var key = String(lcolor + lwidth); @@ -103,7 +113,7 @@ function makeGridData(gd) { lookup[key] = { data: [x0, x1, y0, y1], join: 'rect', - thickness: lwidth, + thickness: lwidth * plotGlPixelRatio, color: lcolor, viewport: fullView, range: fullView, @@ -118,6 +128,10 @@ function makeGridData(gd) { var ya = sp.yaxis; var xVals = xa._gridVals; var yVals = ya._gridVals; + var xOffset = xa._offset; + var xLength = xa._length; + var yLength = ya._length; + // ya.l2p assumes top-to-bottom coordinate system (a la SVG), // we need to compute bottom-to-top offsets and slopes: var yOffset = gs.b + ya.domain[0] * gs.h; @@ -127,23 +141,23 @@ function makeGridData(gd) { if(xa.showgrid) { for(k = 0; k < xVals.length; k++) { - x = xa._offset + xa.l2p(xVals[k].x); - push('grid', xa, x, yOffset, x, yOffset + ya._length); + x = xOffset + xa.l2p(xVals[k].x); + push('grid', xa, x, yOffset, x, yOffset + yLength); } } if(ya.showgrid) { for(k = 0; k < yVals.length; k++) { y = yOffset + yb + ym * yVals[k].x; - push('grid', ya, xa._offset, y, xa._offset + xa._length, y); + push('grid', ya, xOffset, y, xOffset + xLength, y); } } if(shouldShowZeroLine(gd, xa, ya)) { - x = xa._offset + xa.l2p(0); - push('zeroline', xa, x, yOffset, x, yOffset + ya._length); + x = xOffset + xa.l2p(0); + push('zeroline', xa, x, yOffset, x, yOffset + yLength); } if(shouldShowZeroLine(gd, ya, xa)) { y = yOffset + yb + 0; - push('zeroline', ya, xa._offset, y, xa._offset + xa._length, y); + push('zeroline', ya, xOffset, y, xOffset + xLength, y); } } diff --git a/src/traces/splom/calc.js b/src/traces/splom/calc.js index 5f2c423f52c..c7544278866 100644 --- a/src/traces/splom/calc.js +++ b/src/traces/splom/calc.js @@ -77,7 +77,7 @@ module.exports = function calc(gd, trace) { // use average marker size instead to speed things up. var ppad; if(hasTooManyPoints) { - ppad = 2 * (opts.sizeAvg || Math.max(opts.size, 3)); + ppad = opts.sizeAvg || Math.max(opts.size, 3); } else { ppad = calcMarkerSize(trace, commonLength); } diff --git a/src/traces/splom/plot.js b/src/traces/splom/plot.js index 35c0b8b13e7..774268ca5e1 100644 --- a/src/traces/splom/plot.js +++ b/src/traces/splom/plot.js @@ -64,7 +64,13 @@ function plotOne(gd, cd0) { } } - viewOpts.viewport = [gs.l, gs.b, gs.w + gs.l, gs.h + gs.b]; + var plotGlPixelRatio = gd._context.plotGlPixelRatio; + var l = gs.l * plotGlPixelRatio; + var b = gs.b * plotGlPixelRatio; + var w = gs.w * plotGlPixelRatio; + var h = gs.h * plotGlPixelRatio; + + viewOpts.viewport = [l, b, w + l, h + b]; if(scene.matrix === true) { scene.matrix = createMatrix(regl); diff --git a/test/image/baselines/gl2d_10.png b/test/image/baselines/gl2d_10.png index de730c3c838..12c4c2d29c0 100644 Binary files a/test/image/baselines/gl2d_10.png and b/test/image/baselines/gl2d_10.png differ diff --git a/test/image/baselines/gl2d_12.png b/test/image/baselines/gl2d_12.png index 11fca914cc9..bef4ac83571 100644 Binary files a/test/image/baselines/gl2d_12.png and b/test/image/baselines/gl2d_12.png differ diff --git a/test/image/baselines/gl2d_14.png b/test/image/baselines/gl2d_14.png index 9b5b225a481..f6ede234635 100644 Binary files a/test/image/baselines/gl2d_14.png and b/test/image/baselines/gl2d_14.png differ diff --git a/test/image/baselines/gl2d_17.png b/test/image/baselines/gl2d_17.png index b8a5e35348c..58dd7ef8bf8 100644 Binary files a/test/image/baselines/gl2d_17.png and b/test/image/baselines/gl2d_17.png differ diff --git a/test/image/baselines/gl2d_annotations.png b/test/image/baselines/gl2d_annotations.png index b3ceeaaead3..05308aef8ca 100644 Binary files a/test/image/baselines/gl2d_annotations.png and b/test/image/baselines/gl2d_annotations.png differ diff --git a/test/image/baselines/gl2d_axes_booleans.png b/test/image/baselines/gl2d_axes_booleans.png index e1c97f26959..48dfac6e23e 100644 Binary files a/test/image/baselines/gl2d_axes_booleans.png and b/test/image/baselines/gl2d_axes_booleans.png differ diff --git a/test/image/baselines/gl2d_axes_labels.png b/test/image/baselines/gl2d_axes_labels.png index 653120c3c6b..0e837c388b0 100644 Binary files a/test/image/baselines/gl2d_axes_labels.png and b/test/image/baselines/gl2d_axes_labels.png differ diff --git a/test/image/baselines/gl2d_axes_labels2.png b/test/image/baselines/gl2d_axes_labels2.png index 9aecf84f8be..22365738435 100644 Binary files a/test/image/baselines/gl2d_axes_labels2.png and b/test/image/baselines/gl2d_axes_labels2.png differ diff --git a/test/image/baselines/gl2d_axes_lines.png b/test/image/baselines/gl2d_axes_lines.png index 24c39ce87c8..4ff57dd1859 100644 Binary files a/test/image/baselines/gl2d_axes_lines.png and b/test/image/baselines/gl2d_axes_lines.png differ diff --git a/test/image/baselines/gl2d_axes_range_manual.png b/test/image/baselines/gl2d_axes_range_manual.png index 14ebea82fe5..05ada129916 100644 Binary files a/test/image/baselines/gl2d_axes_range_manual.png and b/test/image/baselines/gl2d_axes_range_manual.png differ diff --git a/test/image/baselines/gl2d_axes_range_mode.png b/test/image/baselines/gl2d_axes_range_mode.png index bcf97d2953e..c3932edb872 100644 Binary files a/test/image/baselines/gl2d_axes_range_mode.png and b/test/image/baselines/gl2d_axes_range_mode.png differ diff --git a/test/image/baselines/gl2d_axes_range_type.png b/test/image/baselines/gl2d_axes_range_type.png index 816ca3c382f..ff6aeb8e8be 100644 Binary files a/test/image/baselines/gl2d_axes_range_type.png and b/test/image/baselines/gl2d_axes_range_type.png differ diff --git a/test/image/baselines/gl2d_clean-number.png b/test/image/baselines/gl2d_clean-number.png index 0a46c34f9ed..b2e2f736f18 100644 Binary files a/test/image/baselines/gl2d_clean-number.png and b/test/image/baselines/gl2d_clean-number.png differ diff --git a/test/image/baselines/gl2d_clustering.png b/test/image/baselines/gl2d_clustering.png index 70f9691c18f..1aa694a9412 100644 Binary files a/test/image/baselines/gl2d_clustering.png and b/test/image/baselines/gl2d_clustering.png differ diff --git a/test/image/baselines/gl2d_connect_gaps.png b/test/image/baselines/gl2d_connect_gaps.png index 133ee55a125..5a0d2d9bf00 100644 Binary files a/test/image/baselines/gl2d_connect_gaps.png and b/test/image/baselines/gl2d_connect_gaps.png differ diff --git a/test/image/baselines/gl2d_date_axes.png b/test/image/baselines/gl2d_date_axes.png index 858f2508576..5c81447939d 100644 Binary files a/test/image/baselines/gl2d_date_axes.png and b/test/image/baselines/gl2d_date_axes.png differ diff --git a/test/image/baselines/gl2d_error_bars.png b/test/image/baselines/gl2d_error_bars.png index a6eaa787c35..871bd40844e 100644 Binary files a/test/image/baselines/gl2d_error_bars.png and b/test/image/baselines/gl2d_error_bars.png differ diff --git a/test/image/baselines/gl2d_error_bars_log.png b/test/image/baselines/gl2d_error_bars_log.png index 1aa89ddaecc..007ec26b84a 100644 Binary files a/test/image/baselines/gl2d_error_bars_log.png and b/test/image/baselines/gl2d_error_bars_log.png differ diff --git a/test/image/baselines/gl2d_fill-ordering.png b/test/image/baselines/gl2d_fill-ordering.png index 126e409af75..720156e8ad7 100644 Binary files a/test/image/baselines/gl2d_fill-ordering.png and b/test/image/baselines/gl2d_fill-ordering.png differ diff --git a/test/image/baselines/gl2d_fill_trace_tozero_order.png b/test/image/baselines/gl2d_fill_trace_tozero_order.png index 9101a292154..b8ada0c6013 100644 Binary files a/test/image/baselines/gl2d_fill_trace_tozero_order.png and b/test/image/baselines/gl2d_fill_trace_tozero_order.png differ diff --git a/test/image/baselines/gl2d_fonts.png b/test/image/baselines/gl2d_fonts.png index 891f1cf2241..a10de701926 100644 Binary files a/test/image/baselines/gl2d_fonts.png and b/test/image/baselines/gl2d_fonts.png differ diff --git a/test/image/baselines/gl2d_horiz-lines.png b/test/image/baselines/gl2d_horiz-lines.png index 52faa348942..4459525be8d 100644 Binary files a/test/image/baselines/gl2d_horiz-lines.png and b/test/image/baselines/gl2d_horiz-lines.png differ diff --git a/test/image/baselines/gl2d_layout_image.png b/test/image/baselines/gl2d_layout_image.png index 7d879a25ad0..8259eca3e50 100644 Binary files a/test/image/baselines/gl2d_layout_image.png and b/test/image/baselines/gl2d_layout_image.png differ diff --git a/test/image/baselines/gl2d_line_aligned.png b/test/image/baselines/gl2d_line_aligned.png index 65d7ea779bd..0ba1160e5b5 100644 Binary files a/test/image/baselines/gl2d_line_aligned.png and b/test/image/baselines/gl2d_line_aligned.png differ diff --git a/test/image/baselines/gl2d_line_dash.png b/test/image/baselines/gl2d_line_dash.png index 92538577431..868fabf1793 100644 Binary files a/test/image/baselines/gl2d_line_dash.png and b/test/image/baselines/gl2d_line_dash.png differ diff --git a/test/image/baselines/gl2d_line_limit.png b/test/image/baselines/gl2d_line_limit.png index 3db14fddca4..3b51b46a260 100644 Binary files a/test/image/baselines/gl2d_line_limit.png and b/test/image/baselines/gl2d_line_limit.png differ diff --git a/test/image/baselines/gl2d_line_select.png b/test/image/baselines/gl2d_line_select.png index 869f8d7e1e5..44efdd998d8 100644 Binary files a/test/image/baselines/gl2d_line_select.png and b/test/image/baselines/gl2d_line_select.png differ diff --git a/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png b/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png index 1a904a36094..d11d5b77898 100644 Binary files a/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png and b/test/image/baselines/gl2d_lines_almost_horizontal_vertical.png differ diff --git a/test/image/baselines/gl2d_marker_coloraxis.png b/test/image/baselines/gl2d_marker_coloraxis.png index ef83b808b5a..a04920de219 100644 Binary files a/test/image/baselines/gl2d_marker_coloraxis.png and b/test/image/baselines/gl2d_marker_coloraxis.png differ diff --git a/test/image/baselines/gl2d_marker_line_width.png b/test/image/baselines/gl2d_marker_line_width.png index 54d6f058389..887967078a9 100644 Binary files a/test/image/baselines/gl2d_marker_line_width.png and b/test/image/baselines/gl2d_marker_line_width.png differ diff --git a/test/image/baselines/gl2d_marker_size.png b/test/image/baselines/gl2d_marker_size.png index 3880cbc32b6..71f9dc3c454 100644 Binary files a/test/image/baselines/gl2d_marker_size.png and b/test/image/baselines/gl2d_marker_size.png differ diff --git a/test/image/baselines/gl2d_marker_symbols.png b/test/image/baselines/gl2d_marker_symbols.png index b7d920f89df..56246eea2ac 100644 Binary files a/test/image/baselines/gl2d_marker_symbols.png and b/test/image/baselines/gl2d_marker_symbols.png differ diff --git a/test/image/baselines/gl2d_multiple-traces-axes-labels.png b/test/image/baselines/gl2d_multiple-traces-axes-labels.png index 9e7d5df8495..de2281013cf 100644 Binary files a/test/image/baselines/gl2d_multiple-traces-axes-labels.png and b/test/image/baselines/gl2d_multiple-traces-axes-labels.png differ diff --git a/test/image/baselines/gl2d_multiple-traces-axes.png b/test/image/baselines/gl2d_multiple-traces-axes.png index 5a12dfe3219..f6510334441 100644 Binary files a/test/image/baselines/gl2d_multiple-traces-axes.png and b/test/image/baselines/gl2d_multiple-traces-axes.png differ diff --git a/test/image/baselines/gl2d_multiple_subplots.png b/test/image/baselines/gl2d_multiple_subplots.png index cdd38d0f48b..1c6f45b6b3a 100644 Binary files a/test/image/baselines/gl2d_multiple_subplots.png and b/test/image/baselines/gl2d_multiple_subplots.png differ diff --git a/test/image/baselines/gl2d_no-clustering.png b/test/image/baselines/gl2d_no-clustering.png index b8a443e8954..6439cfdfeba 100644 Binary files a/test/image/baselines/gl2d_no-clustering.png and b/test/image/baselines/gl2d_no-clustering.png differ diff --git a/test/image/baselines/gl2d_no-clustering2.png b/test/image/baselines/gl2d_no-clustering2.png index b66c5a93c4f..8a54ca589c0 100644 Binary files a/test/image/baselines/gl2d_no-clustering2.png and b/test/image/baselines/gl2d_no-clustering2.png differ diff --git a/test/image/baselines/gl2d_open_marker_line_width.png b/test/image/baselines/gl2d_open_marker_line_width.png index 9021fe1f473..510ea544c49 100644 Binary files a/test/image/baselines/gl2d_open_marker_line_width.png and b/test/image/baselines/gl2d_open_marker_line_width.png differ diff --git a/test/image/baselines/gl2d_order_error.png b/test/image/baselines/gl2d_order_error.png index 19a43004508..3667dc86ef0 100644 Binary files a/test/image/baselines/gl2d_order_error.png and b/test/image/baselines/gl2d_order_error.png differ diff --git a/test/image/baselines/gl2d_parcoords.png b/test/image/baselines/gl2d_parcoords.png index cfba203df6d..51ea8f963da 100644 Binary files a/test/image/baselines/gl2d_parcoords.png and b/test/image/baselines/gl2d_parcoords.png differ diff --git a/test/image/baselines/gl2d_parcoords_2.png b/test/image/baselines/gl2d_parcoords_2.png index e0b3ea6b0ae..50b1bd220db 100644 Binary files a/test/image/baselines/gl2d_parcoords_2.png and b/test/image/baselines/gl2d_parcoords_2.png differ diff --git a/test/image/baselines/gl2d_parcoords_256_colors.png b/test/image/baselines/gl2d_parcoords_256_colors.png index ea3b7a4dada..afd4bbd1ad8 100644 Binary files a/test/image/baselines/gl2d_parcoords_256_colors.png and b/test/image/baselines/gl2d_parcoords_256_colors.png differ diff --git a/test/image/baselines/gl2d_parcoords_60_dims.png b/test/image/baselines/gl2d_parcoords_60_dims.png index de30f4ca234..37135c0d78a 100644 Binary files a/test/image/baselines/gl2d_parcoords_60_dims.png and b/test/image/baselines/gl2d_parcoords_60_dims.png differ diff --git a/test/image/baselines/gl2d_parcoords_blocks.png b/test/image/baselines/gl2d_parcoords_blocks.png index f121aa6d731..3714f999534 100644 Binary files a/test/image/baselines/gl2d_parcoords_blocks.png and b/test/image/baselines/gl2d_parcoords_blocks.png differ diff --git a/test/image/baselines/gl2d_parcoords_coloraxis.png b/test/image/baselines/gl2d_parcoords_coloraxis.png index 92a7c6ee3c9..60c8641ea29 100644 Binary files a/test/image/baselines/gl2d_parcoords_coloraxis.png and b/test/image/baselines/gl2d_parcoords_coloraxis.png differ diff --git a/test/image/baselines/gl2d_parcoords_constraints.png b/test/image/baselines/gl2d_parcoords_constraints.png index 4d41651c9e8..56e3d280e44 100644 Binary files a/test/image/baselines/gl2d_parcoords_constraints.png and b/test/image/baselines/gl2d_parcoords_constraints.png differ diff --git a/test/image/baselines/gl2d_parcoords_dark_background.png b/test/image/baselines/gl2d_parcoords_dark_background.png index ee13f6cc60d..8ae5d8436bc 100644 Binary files a/test/image/baselines/gl2d_parcoords_dark_background.png and b/test/image/baselines/gl2d_parcoords_dark_background.png differ diff --git a/test/image/baselines/gl2d_parcoords_large.png b/test/image/baselines/gl2d_parcoords_large.png index 4850e2d4263..c7afe5c8561 100644 Binary files a/test/image/baselines/gl2d_parcoords_large.png and b/test/image/baselines/gl2d_parcoords_large.png differ diff --git a/test/image/baselines/gl2d_parcoords_out-of-range_selected-above-below.png b/test/image/baselines/gl2d_parcoords_out-of-range_selected-above-below.png index dc4241cd25d..6bc2125f620 100644 Binary files a/test/image/baselines/gl2d_parcoords_out-of-range_selected-above-below.png and b/test/image/baselines/gl2d_parcoords_out-of-range_selected-above-below.png differ diff --git a/test/image/baselines/gl2d_parcoords_out-of-range_selected-all.png b/test/image/baselines/gl2d_parcoords_out-of-range_selected-all.png index 73cb83c8921..bef6564d9ac 100644 Binary files a/test/image/baselines/gl2d_parcoords_out-of-range_selected-all.png and b/test/image/baselines/gl2d_parcoords_out-of-range_selected-all.png differ diff --git a/test/image/baselines/gl2d_parcoords_out-of-range_selected-below.png b/test/image/baselines/gl2d_parcoords_out-of-range_selected-below.png index c7ac27cc198..257b85b81eb 100644 Binary files a/test/image/baselines/gl2d_parcoords_out-of-range_selected-below.png and b/test/image/baselines/gl2d_parcoords_out-of-range_selected-below.png differ diff --git a/test/image/baselines/gl2d_parcoords_out-of-range_selected-none.png b/test/image/baselines/gl2d_parcoords_out-of-range_selected-none.png index 642db584dc4..1d02e406a36 100644 Binary files a/test/image/baselines/gl2d_parcoords_out-of-range_selected-none.png and b/test/image/baselines/gl2d_parcoords_out-of-range_selected-none.png differ diff --git a/test/image/baselines/gl2d_parcoords_rgba_colorscale.png b/test/image/baselines/gl2d_parcoords_rgba_colorscale.png index ec89008e27e..5da3a36e064 100644 Binary files a/test/image/baselines/gl2d_parcoords_rgba_colorscale.png and b/test/image/baselines/gl2d_parcoords_rgba_colorscale.png differ diff --git a/test/image/baselines/gl2d_parcoords_select_first_last_enum.png b/test/image/baselines/gl2d_parcoords_select_first_last_enum.png index 616aa52c9c0..fd3741d58a8 100644 Binary files a/test/image/baselines/gl2d_parcoords_select_first_last_enum.png and b/test/image/baselines/gl2d_parcoords_select_first_last_enum.png differ diff --git a/test/image/baselines/gl2d_parcoords_style_labels.png b/test/image/baselines/gl2d_parcoords_style_labels.png index 5f67ad35843..b0bb7efe47e 100644 Binary files a/test/image/baselines/gl2d_parcoords_style_labels.png and b/test/image/baselines/gl2d_parcoords_style_labels.png differ diff --git a/test/image/baselines/gl2d_parcoords_tick_format.png b/test/image/baselines/gl2d_parcoords_tick_format.png index 175561e4311..e0894faa41d 100644 Binary files a/test/image/baselines/gl2d_parcoords_tick_format.png and b/test/image/baselines/gl2d_parcoords_tick_format.png differ diff --git a/test/image/baselines/gl2d_period_positioning.png b/test/image/baselines/gl2d_period_positioning.png index bee982312f3..eb3fbd667a4 100644 Binary files a/test/image/baselines/gl2d_period_positioning.png and b/test/image/baselines/gl2d_period_positioning.png differ diff --git a/test/image/baselines/gl2d_point-selection.png b/test/image/baselines/gl2d_point-selection.png index 292248181c7..80ca7e073e4 100644 Binary files a/test/image/baselines/gl2d_point-selection.png and b/test/image/baselines/gl2d_point-selection.png differ diff --git a/test/image/baselines/gl2d_rgb_dont_accept_alpha_scattergl.png b/test/image/baselines/gl2d_rgb_dont_accept_alpha_scattergl.png index c89ab55e592..794f63340b6 100644 Binary files a/test/image/baselines/gl2d_rgb_dont_accept_alpha_scattergl.png and b/test/image/baselines/gl2d_rgb_dont_accept_alpha_scattergl.png differ diff --git a/test/image/baselines/gl2d_scatter-color-clustering.png b/test/image/baselines/gl2d_scatter-color-clustering.png index deb24811c15..52dd3097416 100644 Binary files a/test/image/baselines/gl2d_scatter-color-clustering.png and b/test/image/baselines/gl2d_scatter-color-clustering.png differ diff --git a/test/image/baselines/gl2d_scatter-colorscale-colorbar.png b/test/image/baselines/gl2d_scatter-colorscale-colorbar.png index d9922d7fb1a..65c5f50dd9d 100644 Binary files a/test/image/baselines/gl2d_scatter-colorscale-colorbar.png and b/test/image/baselines/gl2d_scatter-colorscale-colorbar.png differ diff --git a/test/image/baselines/gl2d_scatter-colorscale-points.png b/test/image/baselines/gl2d_scatter-colorscale-points.png index 2a55e856e97..a273c4dd2b4 100644 Binary files a/test/image/baselines/gl2d_scatter-colorscale-points.png and b/test/image/baselines/gl2d_scatter-colorscale-points.png differ diff --git a/test/image/baselines/gl2d_scatter-continuous-clustering.png b/test/image/baselines/gl2d_scatter-continuous-clustering.png index 8440848f553..8acf5b756b9 100644 Binary files a/test/image/baselines/gl2d_scatter-continuous-clustering.png and b/test/image/baselines/gl2d_scatter-continuous-clustering.png differ diff --git a/test/image/baselines/gl2d_scatter-marker-line-colorscales.png b/test/image/baselines/gl2d_scatter-marker-line-colorscales.png index 710b4206f03..265877a7485 100644 Binary files a/test/image/baselines/gl2d_scatter-marker-line-colorscales.png and b/test/image/baselines/gl2d_scatter-marker-line-colorscales.png differ diff --git a/test/image/baselines/gl2d_scatter-subplot-panel.png b/test/image/baselines/gl2d_scatter-subplot-panel.png index 2dbfc4e65c7..a414ea74224 100644 Binary files a/test/image/baselines/gl2d_scatter-subplot-panel.png and b/test/image/baselines/gl2d_scatter-subplot-panel.png differ diff --git a/test/image/baselines/gl2d_scatter2d-multiple-colors.png b/test/image/baselines/gl2d_scatter2d-multiple-colors.png index bdbd0e89990..d127739814f 100644 Binary files a/test/image/baselines/gl2d_scatter2d-multiple-colors.png and b/test/image/baselines/gl2d_scatter2d-multiple-colors.png differ diff --git a/test/image/baselines/gl2d_scatter_fill_self_next.png b/test/image/baselines/gl2d_scatter_fill_self_next.png index b3a0d1e4dc3..900d97df5be 100644 Binary files a/test/image/baselines/gl2d_scatter_fill_self_next.png and b/test/image/baselines/gl2d_scatter_fill_self_next.png differ diff --git a/test/image/baselines/gl2d_scatter_fill_self_next_vs_nogl.png b/test/image/baselines/gl2d_scatter_fill_self_next_vs_nogl.png index 54c655c5c7a..70f91541191 100644 Binary files a/test/image/baselines/gl2d_scatter_fill_self_next_vs_nogl.png and b/test/image/baselines/gl2d_scatter_fill_self_next_vs_nogl.png differ diff --git a/test/image/baselines/gl2d_scattergl_errorbars_inherit_color.png b/test/image/baselines/gl2d_scattergl_errorbars_inherit_color.png index 7a5f82d69d8..3fbd658462e 100644 Binary files a/test/image/baselines/gl2d_scattergl_errorbars_inherit_color.png and b/test/image/baselines/gl2d_scattergl_errorbars_inherit_color.png differ diff --git a/test/image/baselines/gl2d_scattergl_gaps.png b/test/image/baselines/gl2d_scattergl_gaps.png index e197f87d9dd..30e622de78a 100644 Binary files a/test/image/baselines/gl2d_scattergl_gaps.png and b/test/image/baselines/gl2d_scattergl_gaps.png differ diff --git a/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png b/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png index 833f0b07759..08a6f385ffe 100644 Binary files a/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png and b/test/image/baselines/gl2d_scattergl_simple_line_reversed_ranges.png differ diff --git a/test/image/baselines/gl2d_selectedpoints.png b/test/image/baselines/gl2d_selectedpoints.png index 8cf15068843..fab87d05772 100644 Binary files a/test/image/baselines/gl2d_selectedpoints.png and b/test/image/baselines/gl2d_selectedpoints.png differ diff --git a/test/image/baselines/gl2d_shape_line.png b/test/image/baselines/gl2d_shape_line.png index 1e43fa5fc5a..b2f59c90a14 100644 Binary files a/test/image/baselines/gl2d_shape_line.png and b/test/image/baselines/gl2d_shape_line.png differ diff --git a/test/image/baselines/gl2d_shapes_below_traces.png b/test/image/baselines/gl2d_shapes_below_traces.png index 7086d7413ae..c748d168a46 100644 Binary files a/test/image/baselines/gl2d_shapes_below_traces.png and b/test/image/baselines/gl2d_shapes_below_traces.png differ diff --git a/test/image/baselines/gl2d_simple_inset.png b/test/image/baselines/gl2d_simple_inset.png index 144951ef141..dd7ba8f3a20 100644 Binary files a/test/image/baselines/gl2d_simple_inset.png and b/test/image/baselines/gl2d_simple_inset.png differ diff --git a/test/image/baselines/gl2d_size_margins.png b/test/image/baselines/gl2d_size_margins.png index d21484d778d..9f174b7db2d 100644 Binary files a/test/image/baselines/gl2d_size_margins.png and b/test/image/baselines/gl2d_size_margins.png differ diff --git a/test/image/baselines/gl2d_stacked_coupled_subplots.png b/test/image/baselines/gl2d_stacked_coupled_subplots.png index a4196d4dbf0..a76d5e1489b 100644 Binary files a/test/image/baselines/gl2d_stacked_coupled_subplots.png and b/test/image/baselines/gl2d_stacked_coupled_subplots.png differ diff --git a/test/image/baselines/gl2d_stacked_subplots.png b/test/image/baselines/gl2d_stacked_subplots.png index 01a4f6874a5..abee69584e5 100644 Binary files a/test/image/baselines/gl2d_stacked_subplots.png and b/test/image/baselines/gl2d_stacked_subplots.png differ diff --git a/test/image/baselines/gl2d_subplots_anchor.png b/test/image/baselines/gl2d_subplots_anchor.png index a31d28db78a..cd8786e7023 100644 Binary files a/test/image/baselines/gl2d_subplots_anchor.png and b/test/image/baselines/gl2d_subplots_anchor.png differ diff --git a/test/image/baselines/gl2d_symbol_numbers.png b/test/image/baselines/gl2d_symbol_numbers.png index 967b5dc553b..67c31206969 100644 Binary files a/test/image/baselines/gl2d_symbol_numbers.png and b/test/image/baselines/gl2d_symbol_numbers.png differ diff --git a/test/image/baselines/gl2d_text_chart_arrays.png b/test/image/baselines/gl2d_text_chart_arrays.png index 1d68efef399..57e8022d25a 100644 Binary files a/test/image/baselines/gl2d_text_chart_arrays.png and b/test/image/baselines/gl2d_text_chart_arrays.png differ diff --git a/test/image/baselines/gl2d_text_chart_basic.png b/test/image/baselines/gl2d_text_chart_basic.png index 2f60d6a632c..9077c9f9728 100644 Binary files a/test/image/baselines/gl2d_text_chart_basic.png and b/test/image/baselines/gl2d_text_chart_basic.png differ diff --git a/test/image/baselines/gl2d_text_chart_invalid-arrays.png b/test/image/baselines/gl2d_text_chart_invalid-arrays.png index ffc59108d63..3921ff23328 100644 Binary files a/test/image/baselines/gl2d_text_chart_invalid-arrays.png and b/test/image/baselines/gl2d_text_chart_invalid-arrays.png differ diff --git a/test/image/baselines/gl2d_text_chart_single-string.png b/test/image/baselines/gl2d_text_chart_single-string.png index 6afcba0cbd1..f6c2395b38e 100644 Binary files a/test/image/baselines/gl2d_text_chart_single-string.png and b/test/image/baselines/gl2d_text_chart_single-string.png differ diff --git a/test/image/baselines/gl2d_text_chart_styling.png b/test/image/baselines/gl2d_text_chart_styling.png index 6bd84e65a50..cf26d7d828b 100644 Binary files a/test/image/baselines/gl2d_text_chart_styling.png and b/test/image/baselines/gl2d_text_chart_styling.png differ diff --git a/test/image/baselines/gl2d_texttemplate.png b/test/image/baselines/gl2d_texttemplate.png index 36cef60b79c..cf0d1594665 100644 Binary files a/test/image/baselines/gl2d_texttemplate.png and b/test/image/baselines/gl2d_texttemplate.png differ diff --git a/test/image/baselines/gl2d_tick-labels.png b/test/image/baselines/gl2d_tick-labels.png index 7f135d036e3..545b7b76357 100644 Binary files a/test/image/baselines/gl2d_tick-labels.png and b/test/image/baselines/gl2d_tick-labels.png differ diff --git a/test/image/baselines/gl2d_transforms.png b/test/image/baselines/gl2d_transforms.png index 6c5878026e2..a1c63c28fbc 100644 Binary files a/test/image/baselines/gl2d_transforms.png and b/test/image/baselines/gl2d_transforms.png differ diff --git a/test/image/baselines/glpolar_scatter.png b/test/image/baselines/glpolar_scatter.png index f50feac6c7b..8cca9139ba1 100644 Binary files a/test/image/baselines/glpolar_scatter.png and b/test/image/baselines/glpolar_scatter.png differ diff --git a/test/image/baselines/glpolar_style.png b/test/image/baselines/glpolar_style.png index 44aa16a20b4..b2e438f884e 100644 Binary files a/test/image/baselines/glpolar_style.png and b/test/image/baselines/glpolar_style.png differ diff --git a/test/image/baselines/glpolar_subplots.png b/test/image/baselines/glpolar_subplots.png index d76b9dbf65f..e603cdaa040 100644 Binary files a/test/image/baselines/glpolar_subplots.png and b/test/image/baselines/glpolar_subplots.png differ diff --git a/test/image/baselines/polar_r0dr-theta0dtheta.png b/test/image/baselines/polar_r0dr-theta0dtheta.png index 549bbc6289f..1ac5026caa7 100644 Binary files a/test/image/baselines/polar_r0dr-theta0dtheta.png and b/test/image/baselines/polar_r0dr-theta0dtheta.png differ diff --git a/test/image/baselines/splom_0.png b/test/image/baselines/splom_0.png index bb2b1021a18..a5d865cbb85 100644 Binary files a/test/image/baselines/splom_0.png and b/test/image/baselines/splom_0.png differ diff --git a/test/image/baselines/splom_array-styles.png b/test/image/baselines/splom_array-styles.png index 3503fc20882..1150111efe4 100644 Binary files a/test/image/baselines/splom_array-styles.png and b/test/image/baselines/splom_array-styles.png differ diff --git a/test/image/baselines/splom_dates.png b/test/image/baselines/splom_dates.png index 98ef657c445..8540579a604 100644 Binary files a/test/image/baselines/splom_dates.png and b/test/image/baselines/splom_dates.png differ diff --git a/test/image/baselines/splom_iris-matching.png b/test/image/baselines/splom_iris-matching.png index af99fbc8bf0..5db22d202f7 100644 Binary files a/test/image/baselines/splom_iris-matching.png and b/test/image/baselines/splom_iris-matching.png differ diff --git a/test/image/baselines/splom_iris.png b/test/image/baselines/splom_iris.png index ac6d3db4ae6..8858dfca29f 100644 Binary files a/test/image/baselines/splom_iris.png and b/test/image/baselines/splom_iris.png differ diff --git a/test/image/baselines/splom_large.png b/test/image/baselines/splom_large.png index bf174d48af0..1fddf55c719 100644 Binary files a/test/image/baselines/splom_large.png and b/test/image/baselines/splom_large.png differ diff --git a/test/image/baselines/splom_log.png b/test/image/baselines/splom_log.png index db9a9cfe695..39c842cc11d 100644 Binary files a/test/image/baselines/splom_log.png and b/test/image/baselines/splom_log.png differ diff --git a/test/image/baselines/splom_lower-nodiag-matching.png b/test/image/baselines/splom_lower-nodiag-matching.png index 145d34537f0..86d35f7e85c 100644 Binary files a/test/image/baselines/splom_lower-nodiag-matching.png and b/test/image/baselines/splom_lower-nodiag-matching.png differ diff --git a/test/image/baselines/splom_lower-nodiag.png b/test/image/baselines/splom_lower-nodiag.png index 92d0916ab8b..b821e3de147 100644 Binary files a/test/image/baselines/splom_lower-nodiag.png and b/test/image/baselines/splom_lower-nodiag.png differ diff --git a/test/image/baselines/splom_lower.png b/test/image/baselines/splom_lower.png index 303df896568..57dd1c585db 100644 Binary files a/test/image/baselines/splom_lower.png and b/test/image/baselines/splom_lower.png differ diff --git a/test/image/baselines/splom_mismatched-axis-types.png b/test/image/baselines/splom_mismatched-axis-types.png index 765480ee547..4b660daf549 100644 Binary files a/test/image/baselines/splom_mismatched-axis-types.png and b/test/image/baselines/splom_mismatched-axis-types.png differ diff --git a/test/image/baselines/splom_multi-axis-type.png b/test/image/baselines/splom_multi-axis-type.png index 5d90d9331ce..90796d6149e 100644 Binary files a/test/image/baselines/splom_multi-axis-type.png and b/test/image/baselines/splom_multi-axis-type.png differ diff --git a/test/image/baselines/splom_nodiag.png b/test/image/baselines/splom_nodiag.png index 527f2ed767c..ceb6abcb9f2 100644 Binary files a/test/image/baselines/splom_nodiag.png and b/test/image/baselines/splom_nodiag.png differ diff --git a/test/image/baselines/splom_ragged-via-axes.png b/test/image/baselines/splom_ragged-via-axes.png index 6c138e79907..e6b108f4eba 100644 Binary files a/test/image/baselines/splom_ragged-via-axes.png and b/test/image/baselines/splom_ragged-via-axes.png differ diff --git a/test/image/baselines/splom_ragged-via-visible-false.png b/test/image/baselines/splom_ragged-via-visible-false.png index 6a2769a6736..10a6c93d51b 100644 Binary files a/test/image/baselines/splom_ragged-via-visible-false.png and b/test/image/baselines/splom_ragged-via-visible-false.png differ diff --git a/test/image/baselines/splom_symbol_numbers.png b/test/image/baselines/splom_symbol_numbers.png index f1b11b44e26..9345bb47188 100644 Binary files a/test/image/baselines/splom_symbol_numbers.png and b/test/image/baselines/splom_symbol_numbers.png differ diff --git a/test/image/baselines/splom_upper-nodiag.png b/test/image/baselines/splom_upper-nodiag.png index d2c7af76eb6..daecbec646c 100644 Binary files a/test/image/baselines/splom_upper-nodiag.png and b/test/image/baselines/splom_upper-nodiag.png differ diff --git a/test/image/baselines/splom_upper.png b/test/image/baselines/splom_upper.png index 75638fd2349..348afb7f425 100644 Binary files a/test/image/baselines/splom_upper.png and b/test/image/baselines/splom_upper.png differ diff --git a/test/image/baselines/splom_with-cartesian.png b/test/image/baselines/splom_with-cartesian.png index 56bd7d84609..df7468c3877 100644 Binary files a/test/image/baselines/splom_with-cartesian.png and b/test/image/baselines/splom_with-cartesian.png differ diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js index a33c3ca3338..d3a79142c96 100644 --- a/test/jasmine/tests/config_test.js +++ b/test/jasmine/tests/config_test.js @@ -627,6 +627,17 @@ describe('config argument', function() { } } + function checkCanvasSize(canvases, width, height) { + var i; + for(i = 0; i < canvases.length; i++) { + var domRect = canvases[i].getBoundingClientRect(); + expect(domRect.width).toBe(width); + expect(domRect.height).toBe(height); + expect(+canvases[i].getAttribute('width')).toBe(width * 2); + expect(+canvases[i].getAttribute('height')).toBe(height * 2); + } + } + function testResponsive() { checkLayoutSize(elWidth, elHeight); viewport.set(width / 2, height / 2); @@ -640,7 +651,7 @@ describe('config argument', function() { checkElementsSize(mainSvgs, elWidth / 2, elHeight / 2); var canvases = document.getElementsByTagName('canvas'); - checkElementsSize(canvases, elWidth / 2, elHeight / 2); + checkCanvasSize(canvases, elWidth / 2, elHeight / 2); }) .catch(failTest); } diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js index 40a7cff9aef..b4cc4be18a8 100644 --- a/test/jasmine/tests/gl2d_plot_interact_test.js +++ b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -198,12 +198,12 @@ describe('Test gl plot side effects', function() { Plotly.newPlot(gd, _mock) .then(function() { - expect(gd.querySelector('.gl-canvas-context').width).toBe(600); + expect(gd.querySelector('.gl-canvas-context').width).toBe(1200); return Plotly.relayout(gd, {width: 300}); }) .then(function() { - expect(gd.querySelector('.gl-canvas-context').width).toBe(300); + expect(gd.querySelector('.gl-canvas-context').width).toBe(600); }) .then(done, done.fail); }); @@ -255,8 +255,8 @@ describe('Test gl plot side effects', function() { }); it('@gl should not clear context when dimensions are not integers', function(done) { - var w = 500.5; - var h = 400.5; + var w = 500.25; + var h = 400.25; var w0 = Math.floor(w); var h0 = Math.floor(h); @@ -266,12 +266,12 @@ describe('Test gl plot side effects', function() { expect(fullLayout.height).toBe(h, msg); var canvas = fullLayout._glcanvas; - expect(canvas.node().width).toBe(w0, msg); - expect(canvas.node().height).toBe(h0, msg); + expect(canvas.node().width).toBe(w0 * 2, msg); + expect(canvas.node().height).toBe(h0 * 2, msg); var gl = canvas.data()[0].regl._gl; - expect(gl.drawingBufferWidth).toBe(w0, msg); - expect(gl.drawingBufferHeight).toBe(h0, msg); + expect(gl.drawingBufferWidth).toBe(w0 * 2, msg); + expect(gl.drawingBufferHeight).toBe(h0 * 2, msg); } Plotly.newPlot(gd, [{ diff --git a/test/jasmine/tests/parcoords_test.js b/test/jasmine/tests/parcoords_test.js index ed0eed4c48c..cb02e44a018 100644 --- a/test/jasmine/tests/parcoords_test.js +++ b/test/jasmine/tests/parcoords_test.js @@ -894,6 +894,58 @@ describe('parcoords Lifecycle methods', function() { }); }); +describe('parcoords hover', function() { + var mockCopy; + var gd; + + beforeEach(function() { + jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; + + mockCopy = Lib.extendDeep({}, mock); + mockCopy.data[0].domain = { + x: [0.1, 0.9], + y: [0.05, 0.85] + }; + + if(!mockCopy.config) mockCopy.config = {}; + mockCopy.config.plotGlPixelRatio = 1; + + gd = createGraphDiv(); + }); + + afterEach(destroyGraphDiv); + + it('@gl Should emit a \'plotly_hover\' event', function(done) { + var hoverCalls = 0; + var unhoverCalls = 0; + + Plotly.react(gd, mockCopy) + .then(function() { + gd.on('plotly_hover', function() { hoverCalls++; }); + gd.on('plotly_unhover', function() { unhoverCalls++; }); + + expect(hoverCalls).toBe(0); + expect(unhoverCalls).toBe(0); + + mouseTo(324, 216); + mouseTo(315, 218); + + return delay(20)(); + }) + .then(function() { + expect(hoverCalls).toBe(1); + expect(unhoverCalls).toBe(0); + mouseTo(329, 153); + }) + .then(delay(20)) + .then(function() { + expect(hoverCalls).toBe(1); + expect(unhoverCalls).toBe(1); + }) + .then(done, done.fail); + }); +}); + describe('parcoords basic use', function() { var mockCopy; var gd; @@ -1065,36 +1117,6 @@ describe('parcoords basic use', function() { .then(done, done.fail); }); - it('@gl Should emit a \'plotly_hover\' event', function(done) { - var hoverCalls = 0; - var unhoverCalls = 0; - - Plotly.react(gd, mockCopy) - .then(function() { - gd.on('plotly_hover', function() { hoverCalls++; }); - gd.on('plotly_unhover', function() { unhoverCalls++; }); - - expect(hoverCalls).toBe(0); - expect(unhoverCalls).toBe(0); - - mouseTo(324, 216); - mouseTo(315, 218); - - return delay(20)(); - }) - .then(function() { - expect(hoverCalls).toBe(1); - expect(unhoverCalls).toBe(0); - mouseTo(329, 153); - }) - .then(delay(20)) - .then(function() { - expect(hoverCalls).toBe(1); - expect(unhoverCalls).toBe(1); - }) - .then(done, done.fail); - }); - it('@gl Calling `Plotly.relayout` with string should amend the preexisting parcoords', function(done) { Plotly.react(gd, mockCopy) .then(function() { diff --git a/test/jasmine/tests/scattergl_select_test.js b/test/jasmine/tests/scattergl_select_test.js index 44dfb38a34c..365f358fd0e 100644 --- a/test/jasmine/tests/scattergl_select_test.js +++ b/test/jasmine/tests/scattergl_select_test.js @@ -479,6 +479,7 @@ describe('Test displayed selections:', function() { } var mock = { + config: { plotGlPixelRatio: 1 }, data: [{ x: x, y: y, type: 'scattergl', mode: 'markers' }], @@ -522,6 +523,7 @@ describe('Test displayed selections:', function() { } var mock = { + config: { plotGlPixelRatio: 1 }, data: [{ x: x, y: y, type: 'scattergl', mode: 'markers', marker: {symbol: symbol, size: size, color: color} diff --git a/test/jasmine/tests/scattergl_test.js b/test/jasmine/tests/scattergl_test.js index 75d2c3d5a91..ee65b0a555e 100644 --- a/test/jasmine/tests/scattergl_test.js +++ b/test/jasmine/tests/scattergl_test.js @@ -146,26 +146,26 @@ describe('end-to-end scattergl tests', function() { return Plotly.restyle(gd, 'visible', 'legendonly'); }) .then(function() { - expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).toBe(0); assertDrawCall('legendonly', 0); return Plotly.restyle(gd, 'visible', true); }) .then(function() { - expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).not.toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).not.toBe(0); assertDrawCall('back to visible', 1); return Plotly.restyle(gd, 'visible', false); }) .then(function() { - expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).toBe(0); assertDrawCall('visible false', 0); return Plotly.restyle(gd, 'visible', true); }) .then(function() { assertDrawCall('back up', 1); - expect(readPixel(gd.querySelector('.gl-canvas-context'), 108, 100)[0]).not.toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 216, 200)[0]).not.toBe(0); }) .then(done, done.fail); }); @@ -346,12 +346,12 @@ describe('end-to-end scattergl tests', function() { Plotly.newPlot(gd, mock.data, mock.layout) .then(delay(1000)) .then(function() { - expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).not.toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 200, 160)[0]).not.toBe(0); return Plotly.restyle(gd, {fill: 'none'}); }) .then(function() { - expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).toBe(0); + expect(readPixel(gd.querySelector('.gl-canvas-context'), 200, 160)[0]).toBe(0); }) .then(done, done.fail); }); diff --git a/test/jasmine/tests/scatterpolargl_test.js b/test/jasmine/tests/scatterpolargl_test.js index 2e440456878..e966582e79d 100644 --- a/test/jasmine/tests/scatterpolargl_test.js +++ b/test/jasmine/tests/scatterpolargl_test.js @@ -235,6 +235,8 @@ describe('Test scatterpolargl interactions:', function() { polar: {domain: {column: 1}}, width: 400, height: 400 + }, { + plotGlPixelRatio: 1 }) .then(function() { expect(countCanvases()).toBe(3); @@ -415,7 +417,7 @@ describe('Test scatterpolargl autorange:', function() { type: 'scatterpolargl', mode: 'markers', r: r, - marker: {size: 10} + marker: {size: 5} }]) .then(function() { expect(gd._fullLayout.polar.radialaxis.range) @@ -434,7 +436,7 @@ describe('Test scatterpolargl autorange:', function() { }]) .then(function() { expect(gd._fullLayout.polar.radialaxis.range) - .toBeCloseToArray([0, 1.0465], 2, 'radial range'); + .toBeCloseToArray([0, 1.0975], 2, 'radial range'); expect(cnt).toBe(1, '# of plot call'); }) .then(done, done.fail); diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js index 5727394eba7..5b09602feb1 100644 --- a/test/jasmine/tests/splom_test.js +++ b/test/jasmine/tests/splom_test.js @@ -945,8 +945,8 @@ describe('Test splom interactions:', function() { function assertDims(msg, w, h) { var canvas = gd._fullLayout._glcanvas; - expect(canvas.node().width).toBe(w, msg + '| canvas width'); - expect(canvas.node().height).toBe(h, msg + '| canvas height'); + expect(canvas.node().width / 2).toBe(w, msg + '| canvas width'); + expect(canvas.node().height / 2).toBe(h, msg + '| canvas height'); var gl = canvas.data()[0].regl._gl; if(/Chrome\/78/.test(window.navigator.userAgent)) { @@ -954,8 +954,8 @@ describe('Test splom interactions:', function() { expect(gl.drawingBufferWidth).toBe(Math.min(w, 4096), msg + '| drawingBufferWidth'); expect(gl.drawingBufferHeight).toBe(Math.min(h, 4096), msg + '| drawingBufferHeight'); } else { - expect(gl.drawingBufferWidth).toBe(w, msg + '| drawingBufferWidth'); - expect(gl.drawingBufferHeight).toBe(h, msg + '| drawingBufferHeight'); + expect(gl.drawingBufferWidth / 2).toBe(w, msg + '| drawingBufferWidth'); + expect(gl.drawingBufferHeight / 2).toBe(h, msg + '| drawingBufferHeight'); } } @@ -1222,7 +1222,7 @@ describe('Test splom update switchboard:', function() { expect(toPlainArray(scene.matrixOptions.color)) .toBeCloseToArray([31, 119, 180, 255], 1, 'base color'); - expect(scene.matrixOptions.size).toBe(3, 'base size'); + expect(scene.matrixOptions.size).toBe(6, 'base size'); expect(fullLayout.xaxis.range).toBeCloseToArray([0.851, 3.148], 1, 'base xrng'); return Plotly.restyle(gd, 'marker.color', 'black'); @@ -1302,7 +1302,7 @@ describe('Test splom update switchboard:', function() { ['draw', 1] ]); - expect(scene.matrixOptions.size).toBe(10, msg); + expect(scene.matrixOptions.size).toBe(20, msg); expect(gd._fullLayout.xaxis.range) .toBeCloseToArray([0.753, 3.246], 1, 'xrng ' + msg); @@ -1320,7 +1320,7 @@ describe('Test splom update switchboard:', function() { ['draw', 1] ]); - expect(scene.matrixOptions.sizes).toBeCloseToArray([2, 5, 10], 1, msg); + expect(scene.matrixOptions.sizes).toBeCloseToArray([4, 10, 20], 1, msg); expect(gd._fullLayout.xaxis.range) .toBeCloseToArray([0.853, 3.235], 1, 'xrng ' + msg);