@@ -13,21 +13,25 @@ var Axes = require('../../plots/cartesian/axes');
13
13
var heatmapCalc = require ( '../heatmap/calc' ) ;
14
14
15
15
16
+ // most is the same as heatmap calc, then adjust it
17
+ // though a few things inside heatmap calc still look for
18
+ // contour maps, because the makeBoundArray calls are too entangled
16
19
module . exports = function calc ( gd , trace ) {
17
- // most is the same as heatmap calc, then adjust it
18
- // though a few things inside heatmap calc still look for
19
- // contour maps, because the makeBoundArray calls are too entangled
20
20
var cd = heatmapCalc ( gd , trace ) ,
21
21
contours = trace . contours ;
22
22
23
23
// check if we need to auto-choose contour levels
24
- if ( trace . autocontour !== false ) {
24
+ if ( trace . autocontour !== false ) {
25
25
var dummyAx = {
26
26
type : 'linear' ,
27
27
range : [ trace . zmin , trace . zmax ]
28
28
} ;
29
- Axes . autoTicks ( dummyAx ,
30
- ( trace . zmax - trace . zmin ) / ( trace . ncontours || 15 ) ) ;
29
+
30
+ Axes . autoTicks (
31
+ dummyAx ,
32
+ ( trace . zmax - trace . zmin ) / ( trace . ncontours || 15 )
33
+ ) ;
34
+
31
35
contours . start = Axes . tickFirst ( dummyAx ) ;
32
36
contours . size = dummyAx . dtick ;
33
37
dummyAx . range . reverse ( ) ;
@@ -37,7 +41,7 @@ module.exports = function calc(gd, trace) {
37
41
if ( contours . end === trace . zmax ) contours . end -= contours . size ;
38
42
39
43
// so rounding errors don't cause us to miss the last contour
40
- contours . end += contours . size / 100 ;
44
+ contours . end += contours . size / 100 ;
41
45
42
46
// copy auto-contour info back to the source data.
43
47
trace . _input . contours = contours ;
0 commit comments