[Nanocubes-discuss] Visualization adjustments

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Nanocubes-discuss] Visualization adjustments

Alex Bongiovanni
I'm trying to adjust the visualization component of the 1.0 distribution to accommodate my shift to a more typical histogram.  Eventually I will shift to my own visualization engine, but I'm still just "proof-of-concept-ing".  

My primary problem right now has to do with the color scale for the heatmap.  The relevant code starts at line 137 in index.js.  I can change the colors used, but rather than transitioning from clear to red to yellow to white, I'd rather transition from blue to black to red.  I can achieve this more or less, but the blending is very jittery (clicking brighter or fainter will go from all red to all blue in one or two clicks).  Is there a way to achieve a more gradient-like affect, and is there any other information you can tell me about the color scale in general (I checked the Lux repository but I couldn't find anything called Shade)?

--
Alex Bongiovanni
Reply | Threaded
Open this post in threaded view
|

Re: [Nanocubes-discuss] Visualization adjustments

Carlos Scheidegger
Oh oh, this is on me :) I wrote Lux.

I'm not sure what you mean by jittery, but the current colormap in the nanocubes demo is in log space (this flattens out the color space so that you can see densities across a wide variety of scales).

If you want simply counts, then you can remove the "log()" portion of the computation. You'll need to play around with the standard value of color_compress to make sure it's nice.

(Shade is a big object in Lux: https://github.com/cscheid/lux/tree/master/src/shade) There's a Lux tutorial here, incidentally: http://cscheid.github.io/lux/demos/tutorial/)

-carlos

On Feb 20, 2014, at 1:25 PM, Alex Bongiovanni <[hidden email]> wrote:

I'm trying to adjust the visualization component of the 1.0 distribution to accommodate my shift to a more typical histogram.  Eventually I will shift to my own visualization engine, but I'm still just "proof-of-concept-ing".  

My primary problem right now has to do with the color scale for the heatmap.  The relevant code starts at line 137 in index.js.  I can change the colors used, but rather than transitioning from clear to red to yellow to white, I'd rather transition from blue to black to red.  I can achieve this more or less, but the blending is very jittery (clicking brighter or fainter will go from all red to all blue in one or two clicks).  Is there a way to achieve a more gradient-like affect, and is there any other information you can tell me about the color scale in general (I checked the Lux repository but I couldn't find anything called Shade)?

--
Alex Bongiovanni
_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net

Reply | Threaded
Open this post in threaded view
|

Re: [Nanocubes-discuss] Visualization adjustments

Alex Bongiovanni
So I did read through the tutorials and read through some of the source, and I understand a little better what's happening.  I still have some questions though:

If I wanted to hard code the colors for different counts I would remove both of the log calls here right:
var logx = scalar.log().div(Shade(10).log());

What if I wanted to hard code the colors but adjust the blending between them?


On Thu, Feb 20, 2014 at 3:24 PM, Carlos Scheidegger <[hidden email]> wrote:
Oh oh, this is on me :) I wrote Lux.

I'm not sure what you mean by jittery, but the current colormap in the nanocubes demo is in log space (this flattens out the color space so that you can see densities across a wide variety of scales).

If you want simply counts, then you can remove the "log()" portion of the computation. You'll need to play around with the standard value of color_compress to make sure it's nice.

(Shade is a big object in Lux: https://github.com/cscheid/lux/tree/master/src/shade) There's a Lux tutorial here, incidentally: http://cscheid.github.io/lux/demos/tutorial/)

-carlos

On Feb 20, 2014, at 1:25 PM, Alex Bongiovanni <[hidden email]> wrote:

I'm trying to adjust the visualization component of the 1.0 distribution to accommodate my shift to a more typical histogram.  Eventually I will shift to my own visualization engine, but I'm still just "proof-of-concept-ing".  

My primary problem right now has to do with the color scale for the heatmap.  The relevant code starts at line 137 in index.js.  I can change the colors used, but rather than transitioning from clear to red to yellow to white, I'd rather transition from blue to black to red.  I can achieve this more or less, but the blending is very jittery (clicking brighter or fainter will go from all red to all blue in one or two clicks).  Is there a way to achieve a more gradient-like affect, and is there any other information you can tell me about the color scale in general (I checked the Lux repository but I couldn't find anything called Shade)?

--
Alex Bongiovanni
_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net


_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net




--
Alex Bongiovanni