ColorScaleElement

From ZENBU documentation wiki
Jump to: navigation, search

Description

The ColorScale Element allows for a dynamic scaled legend showing the color mapping for an accompanying visualization. The colorscale can be configured both with fixed scales for min and max, or with dynamic scaling to either the min or max or both.

Heatmap-with-colors-scale.PNG Colorscale-dynamic.PNG

Configuration panel examples

The Colorscale element is best used by linking to another Element on the page and sharing its datasource. By doing this the Colorscale acts as a legend to interpret the signal coloring of the Element such as heatmaps, scatter plots, genomewide elements or any charts using the signal-color visualization option.

In all the examples below, we are using linked Heatmap Elements and have choosen to deactive the title bar and use the description within the Colorscale.

Example1 - fixed scale

The first one is set up as a fixed scale and linked to a heatmap210 on the page. The Colorscale is linked to the datatype fdr_val, with a fixed range of 0 to +6, with a color pattern of brewer-sequential BuPu 6. The description field will set the title for the Colorscale. If the description is left blank, no title will be displayed. If the user chooses to leave the title bar and widgets activated then the title of the Element can replace the function of the description. The corresponding Heatmap configuration is also shown below along with the combination of how these two elements can be combined on a page. The same configuration for the signal datatype, color, color options and min/max signal must be set for both the Colorscale and the linked Heatmap

Colorscale-fixed-config.PNG Heatmap-with-colors-scale.PNG Heatmap-fixedcolor-config.PNG

Example 2 - dynamic scale

The next example uses a dynamic max scale and is linked to heatmap206 on the page. The datatype is set to mean_expression and the dynamic min/max values are shared between the Elements. The color is set to a user defined color from white to a purple and the min signal is set to a fix value of 0 while the max is auto scaled based on the data in the shared Heatmap.

Colorscale-dynamic-config.PNG Colorscale-dynamic.PNG Heatmap-dynamic-color-config.PNG

Example : zero-center colors

The zero-center option is for some signal-colors which are symmetric with both positive and negative values. Although the tool will function with dynamic scaling and the center color will correspond to zero, it is best to use this option with fixed min/max scaling values. In this example we are using the zenbu-spectrum divergent3 color for both the Colorscale and the linked Heatmap

Colorscale-fixed-config-centered.PNG Colorscale-fixed-centered.PNG Heatmap-fixedcolor-centered-config.PNG