Changeset 19798


Ignore:
Timestamp:
11/24/15 22:51:44 (9 years ago)
Author:
dlcheng
Message:

CHG: Correcting colorbar calculations and labeling for test101.html

Location:
issm/trunk-jpl/src/m/plot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/applyoptions.js

    r19794 r19798  
    168168                                //set(c,'YTick',log(tick_vals)./log(logvalue));
    169169                                for (var i = cdivisions; i >= 0; i--) {
    170                                         labels[i] = (caxisdelta*i/cdivisions-caxis[0]).toFixed(2);
     170                                        labels[i] = (caxisdelta*i/cdivisions-caxis[0]).toPrecision(3);
    171171                                }
    172172                        } else {
    173173                                for (var i = cdivisions; i >= 0; i--) {
    174                                         labels[i] = (caxisdelta*i/cdivisions-caxis[0]).toFixed(2);
     174                                        labels[i] = (caxisdelta*i/cdivisions-caxis[0]).toPrecision(3);
    175175                                }
    176176                        }
  • issm/trunk-jpl/src/m/plot/webgl.js

    r19772 r19798  
    120120        colorbar=colorbars["rainbow"];
    121121
    122         value = clamp(value, min + 1.0, max);
     122        value = clamp(value, min, max);
    123123        var normalizedValue = (value - min) / (max - min);
    124124        var index = clamp(Math.round(normalizedValue * colorbar.length), 0, colorbar.length - 1);
Note: See TracChangeset for help on using the changeset viewer.