When exported as png, contour map always become "connectgaps: true"

Hi,

I am trying to use plotly to produce a good looking 2D contour and then export it as a jpg. The image needs to be transparent were there is no data because I do not process full matrix. With “connected gap: false” this works great and the displayed image is fine. However one thing is never working:

When I either click on export on the toolbar OR automatically export as jpg (within java) the image suddenly become filled. The strange part is:

  1. This is not the case for heatmap

  2. This is not computer related as the plotly example is exporting correctly (https://plot.ly/python/contour-plots/ under Connect the Gaps Between None Values in the Z Matrix is fine)

I tried even copying the exact same code as in the example but it does still fail for my application. Is there a know issue with some versions?

Some informations:

I am using typescript and angular 2 for the applications. The following are the only relevant parts of the code but I can post any more if it is needed.

const data: Plotly.Data =
{
  z: z,
  colorscale:  colorscale,
  connectgaps: false,
  showscale: false,
  type: "contour",
  zsmooth: "best"
};

const layout = {displayModeBar: false,
showlegend: false,
xaxis: {
  autorange: true,
  showgrid: false,
  zeroline: false,
  showline: false,
  ticks: "",
  showticklabels: false,
  margin: 0
},
yaxis: {
  autorange: "reversed",
  showgrid: false,
  zeroline: false,
  showline: false,
  ticks: "",
  showticklabels: false,
  margin: 0
},
plot_bgcolor: "transparent",
paper_bgcolor: "transparent",
margin: {l: 0,
  r: 0,
  b: 0,
  t: 0,
},
};

this.cdRef.detectChanges();
Plotly.setPlotConfig({
    "displayModeBar": false,
     "connectgaps": false,
});

Plotly.newPlot("plotlyGeoUnit", [data], layout).then(
Plotly.toImage("plotlyGeoUnit", {format: "png", height: 400, width: 400}).then(result =>
    {
              //here I assign my image url
      }));

Results produced:

lower_jurrasic_filled
The result with contour

toto
The exact same code with just changing type to heatmap

I really need the contour lines as this is a topography and contour lines are the height of the terrain. This stupid bug is really locking me and any tip would be really appreciated. Thank you very much ^^.

Thanks for the report!

Could you share your z data to help us reproduce this bug?

I could yes but I highly doubt this has any link since I tried with your example matrix here:

'z': [[None, None, None, 12, 13, 14, 15, 16],
      [None, 1, None, 11, None, None, None, 17],
      [None, 2, 6, 7, None, None, None, 18],
      [None, 3, None, 8, None, None, None, 19],
      [5, 4, 10, 9, None, None, None, 20],
      [None, None, None, 27, None, None, None, 21],
      [None, None, None, 26, 25, 24, 23, 22]],

So it occurs with any z matrix really. Moreover I am using something like 32 tests map and it happen with all of them.

But here is an example (size 50 usually it is 500X500:

Summary

0: (50) [-872.3775024414062, -909.0910034179688, -980.7688598632812, -1022.72998046875, -1060.6099853515625, -1127.618408203125, -1174.239990234375, -1200.464599609375, -1250, -1273.310791015625, -1325.760009765625, -1325.760009765625, -1344.699951171875, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1439.3900146484375, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1515.1500244140625, -1520.435546875, -1553.030029296875, -1553.030029296875, -1553.030029296875]
1: (50) [-758.7415161132812, -831.0020751953125, -871.2119750976562, -909.0910034179688, -977.8551635742188, -1022.72998046875, -1050.702880859375, -1098.47998046875, -1136.3599853515625, -1174.239990234375, -1212.1199951171875, -1250, -1250, -1287.8800048828125, -1325.760009765625, -1325.760009765625, -1363.6400146484375, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1406.845458984375, -1439.3900146484375, -1439.3900146484375, -1439.3900146484375, -1439.3900146484375, -1439.3900146484375, -1439.3900146484375, -1439.3900146484375, -1408.2720947265625, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1439.3900146484375, -1439.3900146484375, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125, -1477.27001953125]
2: (50) [-645.1045532226562, -719.697021484375, -753.4967041015625, -828.0064086914062, -871.2119750976562, -909.0910034179688, -946.969970703125, -1022.72998046875, -1047.7890625, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1212.1199951171875, -1250, -1250, -1287.8800048828125, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1363.6400146484375, -1363.6400146484375, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1363.6400146484375, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1439.3900146484375, -1439.3900146484375, -1477.27001953125]
3: (50) [-531.468505859375, -603.72998046875, -643.9390258789062, -719.697021484375, -750.5829467773438, -795.4550170898438, -871.2119750976562, -897.4359130859375, -946.969970703125, -970.279541015625, -1022.72998046875, -1043.126953125, -1098.47998046875, -1115.9630126953125, -1174.239990234375, -1174.239990234375, -1212.1199951171875, -1250, -1250, -1258.2862548828125, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1363.6400146484375, -1371.862060546875, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125, -1401.52001953125]
4: (50) [-417.83245849609375, -454.5450134277344, -526.2236938476562, -600.7342529296875, -643.9390258789062, -681.8179931640625, -747.669189453125, -795.4550170898438, -833.3330078125, -871.2119750976562, -909.0910034179688, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1136.3599853515625, -1174.239990234375, -1174.239990234375, -1250, -1250, -1250, -1250, -1287.8800048828125, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1287.8800048828125, -1287.8800048828125, -1258.515625, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1287.8800048828125, -1303.7366943359375, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1363.6400146484375, -1363.6400146484375]
5: (50) [-304.19549560546875, -340.90899658203125, -416.6669921875, -454.5450134277344, -523.3099365234375, -568.1820068359375, -643.9390258789062, -670.1629028320312, -719.697021484375, -795.4550170898438, -817.5990600585938, -871.2119750976562, -890.1514892578125, -946.969970703125, -984.8480224609375, -1022.72998046875, -1060.6099853515625, -1098.47998046875, -1108.2459716796875, -1174.239990234375, -1174.239990234375, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1287.8800048828125, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625, -1325.760009765625]
6: (50) [-152.68051147460938, -224.94198608398438, -298.9508361816406, -340.90899658203125, -416.6669921875, -445.8039245605469, -520.3961791992188, -568.1820068359375, -606.0609741210938, -667.2491455078125, -719.697021484375, -757.5759887695312, -795.4550170898438, -871.2119750976562, -886.9463500976562, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1212.1199951171875, -1250, -1250, -1250, -1250, -1212.1199951171875, -1212.1199951171875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1212.1199951171875, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1287.8800048828125, -1291.9593505859375, -1325.760009765625, -1325.760009765625]
7: (50) [-39.0443000793457, -75.75759887695312, -147.33859252929688, -221.81942749023438, -265.1520080566406, -340.90899658203125, -378.7879943847656, -442.61273193359375, -492.42401123046875, -568.1820068359375, -589.9520263671875, -643.9390258789062, -719.697021484375, -757.5759887695312, -810.7433471679688, -871.2119750976562, -946.969970703125, -958.0618286132812, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1226.519775390625, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250]
8: (50) [112.47051239013672, 37.87879943847656, 0, -70.30406951904297, -144.35545349121094, -189.3939971923828, -265.1520080566406, -303.0299987792969, -365.66217041015625, -416.6669921875, -492.42401123046875, -568.1820068359375, -586.6792602539062, -660.9760131835938, -719.697021484375, -795.4550170898438, -871.2119750976562, -920.74609375, -956.2863159179688, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1136.3599853515625, -1136.3599853515625, -1136.3599853515625, -1136.3599853515625, -1158.2476806640625, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1250, -1250, -1250, -1250, -1250, -1250, -1250, -1250]
9: (50) [263.98651123046875, 189.3939971923828, 113.63600158691406, 75.75759887695312, 7.159508228302002, -66.80821228027344, -113.63600158691406, -189.3939971923828, -227.2729949951172, -288.11468505859375, -362.67901611328125, -436.6466064453125, -492.42401123046875, -568.1820068359375, -643.9390258789062, -719.697021484375, -795.4550170898438, -871.2119750976562, -946.969970703125, -1022.72998046875, -1067.601318359375, -1098.47998046875, -1101.8780517578125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1136.3599853515625, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1154.9346923828125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1221.911865234375, -1250, -1250, -1250, -1250, -1250, -1250]
10: (50) [415.5014953613281, 340.90899658203125, 265.1520080566406, 227.2729949951172, 151.51499938964844, 84.70689392089844, 10.142637252807617, -37.87879943847656, -113.63600158691406, -189.3939971923828, -265.1520080566406, -340.90899658203125, -416.6669921875, -492.42401123046875, -568.1820068359375, -643.9390258789062, -719.697021484375, -806.546875, -880.528564453125, -993.1347045898438, -1067.601318359375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1153.6397705078125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1212.1199951171875, -1212.1199951171875, -1212.1199951171875, -1174.239990234375, -1174.239990234375]
11: (50) [567.0164794921875, 492.42401123046875, 416.6669921875, 378.7879943847656, 303.0299987792969, 236.22242736816406, 161.65768432617188, 87.68998718261719, 37.87879943847656, -37.87879943847656, -113.63600158691406, -209.37413024902344, -283.6488037109375, -396.2705993652344, -492.42401123046875, -568.1820068359375, -656.31396484375, -769.2310791015625, -871.2119750976562, -946.969970703125, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375]
12: (50) [756.4375610351562, 681.8179931640625, 606.0609741210938, 530.302978515625, 454.5450134277344, 387.7374267578125, 313.1726989746094, 239.20558166503906, 164.64083862304688, 90.67308807373047, 16.10889434814453, -96.1536636352539, -189.3939971923828, -282.18853759765625, -394.5223388671875, -492.42401123046875, -618.8812255859375, -719.697021484375, -804.7713623046875, -917.3770141601562, -991.8416137695312, -1027.6112060546875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1060.6099853515625, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1085.37109375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1152.0323486328125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375]
13: (50) [907.9525756835938, 835.7195434570312, 757.5759887695312, 681.8179931640625, 613.2203369140625, 539.25244140625, 464.6877136230469, 390.7205810546875, 316.15582275390625, 242.188720703125, 113.63600158691406, 17.898773193359375, -94.6968002319336, -189.3939971923828, -318.76434326171875, -430.78973388671875, -543.1235961914062, -655.0311889648438, -767.4827880859375, -871.2119750976562, -946.969970703125, -1022.72998046875, -1026.1280517578125, -1060.6099853515625, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1046.040771484375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1114.2147216796875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375]
14: (50) [1059.4715576171875, 987.2347412109375, 913.2673950195312, 838.7865600585938, 764.7355346679688, 690.7674560546875, 616.2034301757812, 542.235595703125, 467.67083740234375, 340.90899658203125, 243.38198852539062, 169.4138641357422, 19.385032653808594, -93.23993682861328, -243.00735473632812, -355.0321960449219, -467.3656005859375, -617.7157592773438, -719.697021484375, -803.2952270507812, -877.5692749023438, -946.969970703125, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1046.040771484375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1098.47998046875]
15: (50) [1021.5643920898438, 1171.908935546875, 1098.47998046875, 990.05126953125, 878.2050170898438, 842.2824096679688, 767.7186889648438, 693.7506103515625, 619.1864624023438, 492.42401123046875, 394.89697265625, 265.1520080566406, 132.57550048828125, -17.48252296447754, -128.92477416992188, -279.27471923828125, -416.6669921875, -541.9580688476562, -653.2555541992188, -765.8619995117188, -840.3260498046875, -876.0930786132812, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -984.8480224609375, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1046.040771484375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1133.98291015625, -1098.47998046875]
16: (50) [-Infinity, 1096.1495361328125, 1064.688232421875, 876.5386962890625, 840.3260498046875, 795.4550170898438, 795.4550170898438, 795.4550170898438, 770.3966064453125, 643.9390258789062, 546.037353515625, 396.2705993652344, 246.21249389648438, 96.1536865234375, -53.61307144165039, -203.9628448486328, -315.8505859375, -466.2001037597656, -577.9476928710938, -690.10400390625, -795.4550170898438, -871.2119750976562, -871.2119750976562, -873.2835083007812, -909.0910034179688, -909.0910034179688, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1046.040771484375, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1153.843017578125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1170.16064453125, -1098.47998046875, -1098.47998046875]
17: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 795.4550170898438, 795.4550170898438, 795.4550170898438, 795.4550170898438, 795.4550170898438, 697.1864624023438, 547.3790283203125, 397.28704833984375, 247.22372436523438, 60.0233268737793, -90.32621765136719, -240.0935821533203, -390.4430847167969, -540.2097778320312, -643.9390258789062, -719.697021484375, -795.4550170898438, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -946.969970703125, -946.969970703125, -946.969970703125, -974.9414672851562, -1022.72998046875, -1022.72998046875, -1046.040771484375, -1098.47998046875, -1098.47998046875, -1117.419921875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1098.47998046875, -1098.47998046875, -1098.47998046875]
18: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 795.4550170898438, 795.4550170898438, 795.4550170898438, 795.4550170898438, 698.89404296875, 548.8020629882812, 398.73870849609375, 211.53863525390625, 22.864398956298828, -126.90231323242188, -314.6850891113281, -426.88153076171875, -568.1820068359375, -651.1945190429688, -725.4693603515625, -795.4550170898438, -797.9755859375, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -940.5869140625, -946.969970703125, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1168.9130859375, -1098.47998046875, -1098.47998046875, -1022.72998046875]
19: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 795.4550170898438, 795.4550170898438, 871.2119750976562, 795.4550170898438, 738.6365356445312, 550.2537231445312, 363.05364990234375, 174.3795166015625, -12.820517539978027, -201.4947052001953, -351.2614440917969, -462.8310546875, -575.4375, -649.7113647460938, -723.9932250976562, -795.4550170898438, -795.4550170898438, -795.4550170898438, -871.2119750976562, -871.2119750976562, -871.2119750976562, -871.2119750976562, -946.969970703125, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1118.876953125, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1098.47998046875, -1098.47998046875, -1096.1495361328125, -1022.72998046875]
20: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 871.2119750976562, 871.2119750976562, 871.2119750976562, 871.2119750976562, 777.5267333984375, 552.0020141601562, 325.89453125, 138.6944122314453, -49.97944641113281, -237.1798095703125, -387.07403564453125, -499.8626708984375, -611.3875732421875, -685.8972778320312, -719.697021484375, -795.4550170898438, -795.4550170898438, -795.4550170898438, -795.4550170898438, -871.2119750976562, -871.2119750976562, -900.3496704101562, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1167.2467041015625, -1098.47998046875, -1098.47998046875, -1022.72998046875, -1021.5643920898438]
21: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 924.762939453125, 966.9495849609375, 1041.227783203125, 1005.0863037109375, 779.2749633789062, 553.16748046875, 327.6427917480469, 101.53559112548828, -85.66426086425781, -273.8831481933594, -416.6669921875, -535.6296997070312, -610.14013671875, -684.1489868164062, -719.697021484375, -795.4550170898438, -795.4550170898438, -795.4550170898438, -828.0064086914062, -871.2119750976562, -900.3496704101562, -946.969970703125, -1022.72998046875, -1047.7890625, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1098.47998046875, -1098.47998046875, -1056.5780029296875, -1022.72998046875, -946.969970703125]
22: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1044.689697265625, 1174.239990234375, 1174.239990234375, 1174.239990234375, 1158.0595703125, 856.197509765625, 554.915771484375, 328.80828857421875, 65.85083770751953, -122.36782836914062, -272.5901794433594, -422.4388732910156, -534.3822631835938, -643.9390258789062, -719.697021484375, -719.697021484375, -795.4550170898438, -795.4550170898438, -828.0064086914062, -871.2119750976562, -900.3496704101562, -946.969970703125, -1022.72998046875, -1047.7890625, -1098.47998046875, -1120.625244140625, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1128.2335205078125, -1098.47998046875, -1093.154541015625, -1022.72998046875, -982.5263061523438, -945.804443359375]
23: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1174.239990234375, 1192.73779296875, 1250, 1250, 1234.985107421875, 933.70361328125, 556.081298828125, 254.79931640625, 29.147178649902344, -158.50804138183594, -308.3567199707031, -458.6242980957031, -568.1820068359375, -643.9390258789062, -719.256591796875, -755.2449951171875, -795.4550170898438, -828.0064086914062, -871.2119750976562, -946.969970703125, -974.9414672851562, -1022.72998046875, -1047.7890625, -1098.47998046875, -1120.625244140625, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1126.568115234375, -1098.47998046875, -1098.47998046875, -1022.72998046875, -980.8162841796875, -946.969970703125, -871.2119750976562]
24: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1269.18603515625, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1086.384033203125, 633.5870361328125, 256.4200439453125, 30.44015884399414, -195.16636657714844, -345.43389892578125, -456.87603759765625, -568.1820068359375, -643.9390258789062, -719.697021484375, -792.0432739257812, -828.0064086914062, -871.2119750976562, -946.969970703125, -974.9414672851562, -1022.72998046875, -1047.7890625, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1124.840087890625, -1098.47998046875, -1098.47998046875, -1022.72998046875, -1017.40283203125, -946.969970703125, -871.2119750976562, -832.1810913085938]
25: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1343.003173828125, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1401.52001953125, 1391.304931640625, 635.2078247070312, 257.7130126953125, -43.65113830566406, -193.91891479492188, -343.6856384277344, -492.42401123046875, -568.1820068359375, -643.9390258789062, -719.697021484375, -795.4550170898438, -871.2119750976562, -900.3496704101562, -946.969970703125, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1174.239990234375, -1174.239990234375, -1174.239990234375, -1136.3599853515625, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1022.72998046875, -1015.7363891601562, -946.969970703125, -871.2119750976562, -831.0112915039062, -756.4240112304688]
26: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1335.778076171875, 1401.52001953125, 560.7432861328125, 183.6216278076172, -42.4036865234375, -229.60400390625, -379.9534912109375, -491.7041320800781, -603.72998046875, -677.7387084960938, -752.249267578125, -795.4550170898438, -871.2119750976562, -946.969970703125, -973.1932373046875, -1022.72998046875, -1022.72998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1098.47998046875, -1049.090087890625, -1022.72998046875, -976.7220458984375, -946.969970703125, -871.2119750976562, -829.30126953125, -755.2542114257812, -680.666015625]
27: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1325.760009765625, 562.855224609375, 185.31472778320312, -40.209800720214844, -228.43850708007812, -377.62249755859375, -492.42401123046875, -601.981689453125, -714.3703002929688, -788.701416015625, -824.5919189453125, -871.2119750976562, -946.969970703125, -946.969970703125, -1022.72998046875, -1022.72998046875, -1060.6099853515625, -1079.398193359375, -1098.47998046875, -1060.6099853515625, -1046.040771484375, -1022.72998046875, -1022.72998046875, -946.969970703125, -946.969970703125, -871.2119750976562, -795.4550170898438, -753.4967041015625, -679.4689331054688, -604.8954467773438]
28: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1325.760009765625, 1250, 488.3447265625, 187.06298828125, -39.0443000793457, -226.10748291015625, -376.45697021484375, -492.42401123046875, -600.7342529296875, -712.9434204101562, -786.9395751953125, -795.4550170898438, -871.2119750976562, -934.1494140625, -946.969970703125, -984.8480224609375, -1022.72998046875, -1022.72998046875, -1022.72998046875, -1022.72998046875, -984.8480224609375, -946.969970703125, -946.969970703125, -871.2119750976562, -871.2119750976562, -795.4550170898438, -719.697021484375, -643.9390258789062, -568.1820068359375, -492.42401123046875]
29: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1297.787109375, 1250, 1250, 1250, 1250, 490.0929870605469, 188.22848510742188, -36.71329879760742, -224.94198608398438, -374.7087097167969, -487.0972595214844, -568.1820068359375, -643.9390258789062, -719.697021484375, -795.4550170898438, -858.3914184570312, -871.2119750976562, -909.0910034179688, -946.969970703125, -946.969970703125, -946.969970703125, -946.969970703125, -909.0910034179688, -871.2119750976562, -871.2119750976562, -795.4550170898438, -749.3541870117188, -674.824951171875, -643.9390258789062, -568.1820068359375, -452.19598388671875, -377.62249755859375]
30: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1296.166259765625, 1318.9534912109375, 1287.8800048828125, 1325.760009765625, 1325.760009765625, 491.25848388671875, 190.55950927734375, -35.54779815673828, -185.31472778320312, -335.582275390625, -485.6703796386719, -559.6665649414062, -634.249267578125, -708.2452392578125, -719.697021484375, -795.4550170898438, -795.4550170898438, -833.3330078125, -833.3330078125, -833.3330078125, -833.3330078125, -795.4550170898438, -795.4550170898438, -745.9208984375, -681.8179931640625, -643.9390258789062, -568.1820068359375, -525.0175170898438, -416.6669921875, -340.90899658203125, -226.10748291015625]
31: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1370.63330078125, 1401.52001953125, 1325.760009765625, 1325.760009765625, 1325.760009765625, 645.10498046875, 267.48248291015625, 41.95805358886719, -184.0672607421875, -265.1520080566406, -407.9254150390625, -482.5171813964844, -556.5269165039062, -631.1187744140625, -643.9390258789062, -703.962646484375, -719.697021484375, -719.697021484375, -719.697021484375, -719.697021484375, -681.8179931640625, -668.9974365234375, -606.0609741210938, -568.1820068359375, -522.0811767578125, -447.5521545410156, -373.5025634765625, -298.9508361816406, -189.3939971923828, -74.59209442138672]
32: (50) [-Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, -Infinity, 1368.9669189453125, 1325.760009765625, 1250, 1250, 1250, 722.0280151367188, 344.98828125, 118.96295166015625, -106.64325714111328, -180.65269470214844, -331.2190246582031, -405.2152099609375, -454.5450134277344, -530.302978515625, -552.4476318359375, -568.1820068359375, -606.0609741210938, -606.0609741210938, -568.1820068359375, -530.302978515625, -517.482421875, -454.5450134277344, -416.6669921875, -370.5661926269531, -296.0371398925781, -221.987548828125, -113.63600158691406, 0, 76.92308807373047]
length: 33
proto: Array(0)

I do not think that it could be z matrix related as this fail even with the plotly default example:

z: [[None, None, None, 12, 13, 14, 15, 16],
      [None, 1, None, 11, None, None, None, 17],
      [None, 2, 6, 7, None, None, None, 18],
      [None, 3, None, 8, None, None, None, 19],
      [5, 4, 10, 9, None, None, None, 20],
      [None, None, None, 27, None, None, None, 21],
      [None, None, None, 26, 25, 24, 23, 22]],

Moreover I used more than 10 topological maps (ans so more than 10 matrix) and varied the “null” value by testing either null, none or -infinity.

All resulted in the same connectgap failing, but ONLY when exporting. This is the view if I just display it:

Obviously it is a printScreen as the export button integrated in plotly complete the image

Any ideas? I still have not found any solutions.

I wasn’t able to reproduce this bug.

Would you mind sharing a fully reproducible example to help us out?

I redid a small project with the exact same features (yarn and typescript) but it worked.

It appeared to me that when I started my project plotly was version:
“plotly.js”: “^1.42.5”,
and right now it is:
“plotly.js”: “^1.43.2”,
Apparently this solves the problem. I also changed @types/plotly from 14.1 to 14.3 which might have helped too.

So I am absolutely sorry but this post was about an issue of the previous version that you already corrected. But it is okay now (and this is why I could not have been reproduced I guess)

No worries! Thank you for using plotly.js!