sperez8 / HivePanelExplorer

An interactive and explorative visualization tool in D3 based on hive plots built for complex networks.
Other
10 stars 11 forks source link

Linear colour scale? #14

Closed FranckLejzerowicz closed 5 years ago

FranckLejzerowicz commented 5 years ago

Hello, Your tool is amazing and I'm exploring it extensively! First - how shall I cite your tool if I'm to use it in a publication? Second - is there a way to apply a gradient / colormap to a node / link definition? Thanks! Franck

sperez8 commented 5 years ago

Hi Franck,

Glad you like it! The tool is not published in an academic journal yet (but will be in the next year!) so until then you can cite it using this:

Perez, S, Hahn, A, Hallam, S. (2015). Hive Panel Explorer: a tool for visualizing complex networks. Github Repository. https://github.com/hallamlab/HivePanelExplorer

As for a linear color scale, right now you would have to set it manually. SO for each node value you would determine the color (in HEX code). If you wanted to hard code your color scheme so that you don't have to recolor your nodes every time you open the panel, you can! By adding a line like this at the bottom of panel_methods.js:

color_marks("circle", "fill", "node_category", "node_category_value", "red", "=") color_marks("path", "stroke", "edge_category", "edge_category_value", "blue", ">")

Hope that helps!

Sarah

FranckLejzerowicz commented 5 years ago

Hooo I love these hacks! Because it give me the chance to fine tune all the colora and make gradients! That helps a lot - thanks a bunch! Best Franck

sperez8 commented 5 years ago

You are very welcome! Happy to help.