diff --git a/index.html b/index.html index b2659e3a3c..b9b07d4803 100644 --- a/index.html +++ b/index.html @@ -100,8 +100,9 @@ var co2color = d3.scale.linear() .domain([0, 250, 500]) .range(['green', 'orange', 'black']); + var maxWind = 15; var windColor = d3.scale.linear() - .domain(d3.range(0, 11).map( function (i) { return i * 4; } )) + .domain(d3.range(0, 11).map( function (i) { return d3.interpolate(0, maxWind)(i / 10.0); } )) .range([ "rgba(0, 255, 255, 0.5)", "rgba(100, 240, 255, 0.5)", @@ -113,7 +114,8 @@ "rgba(225, 133, 255, 0.5)", "rgba(236, 109, 255, 0.5)", "rgba(255, 30, 219, 0.5)" - ]); + ]) + .clamp(true); var solarColor = d3.scale.linear() .range(['black', 'orange']) .domain([300, 440]); diff --git a/scripts/horizontalcolorbar.js b/scripts/horizontalcolorbar.js index 00b05b567e..512ccb2f41 100644 --- a/scripts/horizontalcolorbar.js +++ b/scripts/horizontalcolorbar.js @@ -16,7 +16,8 @@ function HorizontalColorbar(selector, d3scale, d3TickFormat, d3TickValues) { // Linear scale this.scale = d3.scale.linear() .range([0, this.colorbarWidth]) - .domain(d3.extent(d3scale.domain())); + .domain(d3.extent(d3scale.domain())) + .clamp(d3scale.clamp()); this.gGradient = this.gColorbar.append('linearGradient') .attr('id', selector + 'gradient') .attr('x1', 0) diff --git a/vendor/wind-js/windy.js b/vendor/wind-js/windy.js index f209be58a5..871cc76160 100644 --- a/vendor/wind-js/windy.js +++ b/vendor/wind-js/windy.js @@ -15,7 +15,7 @@ var Windy = function( params ){ var VELOCITY_SCALE = 1/100000;//1/70000 // scale for wind velocity (completely arbitrary--this value looks nice) var INTENSITY_SCALE_STEP = 10; // step size of particle intensity color scale - var MAX_WIND_INTENSITY = 40; // wind velocity at which particle intensity is maximum (m/s) + var MAX_WIND_INTENSITY = 15; // wind velocity at which particle intensity is maximum (m/s) var MAX_PARTICLE_AGE = 100; // max number of frames a particle is drawn before regeneration var PARTICLE_LINE_WIDTH = 2; // line width of a drawn particle var PARTICLE_MULTIPLIER = 1;//8 // particle count scalar (completely arbitrary--this values looks nice)