Skip to content

Commit

Permalink
OWColor: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Feb 1, 2020
1 parent 4c47704 commit 4e57843
Showing 1 changed file with 10 additions and 25 deletions.
35 changes: 10 additions & 25 deletions doc/visual-programming/source/widgets/data/color.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,26 @@ Set color legend for variables.

- Data: data set with a new color legend

The **Color** widget enables you to set the color legend in your visualizations according to your own preferences. This option provides you with the tools for emphasizing your results and offers a great variety of color options for presenting your data. It can be combined with most visualizations widgets.
The **Color** widget sets the color legend for visualizations.

![](images/Color-stamped.png)

1. A list of discrete variables. You can set the color of each variable by double-clicking on it and opening the *Color palette* or the *Select color* window. The widget also enables text-editing. By clicking on a variable, you can change its name.
2. A list of continuous variables. You can customize the color gradients by double-clicking on them. The widget also enables text-editing. By clicking on a variable, you can change its name. If you hover over the right side side of the gradient, *Copy to all* appears. You can then apply your customized color gradient to all variables.
1. A list of discrete variables. Set the color of each variable by double-clicking on it. The widget also enables renaming variables by clicking on their names.
2. A list of continuous variables. Click on the color strip to choose a different palette. To use the same palette for all variables, change it for one variable and click *Copy to all* that appears on the right. The widget also enables renaming variables by clicking on their names.
3. Produce a report.
4. Apply changes. If *Apply automatically* is ticked, changes will be communicated automatically. Alternatively, just click *Apply*.

Discrete variables
------------------
Palettes for numeric variables are grouped and tagged by their properties.

![](images/Color-palette-discrete-stamped.png)
- Diverging palettes have two colors on its ends and a central color (white or black) in the middle. Such palettes are particularly useful when the the values can be positive or negative, as some widgets (for instance the Heat map) will put the 0 at the middle point in the palette.

1. Choose a desired color from the palette of basic colors.
2. Move the cursor to choose a custom color from the color palette.
3. Choose a custom color from your previously saved color choices.
4. Specify the custom color by:
- entering the red, green, and blue components of the color as values between 0 (darkest) and 255 (brightest)
- entering the hue, saturation and luminescence components of the color as values in the range 0 to 255
5. Add the created color to your custom colors.
6. Click *OK* to save your choices or *Cancel* to exit the the color palette.
- Linear palettes are constructed so that human perception of the color change is linear with the change of the value.

Numeric variables
-----------------
- Color blind palettes cover different types of color blindness, and can also be linear or diverging.

![](images/Color-palette-numeric-stamped.png)
- In isoluminant palettes, all colors have equal brightness.

1. Choose a gradient from your saved profiles. The default profile is already set.
2. The gradient palette
3. Select the left side of the gradient. Double clicking the color opens the *Select Color* window.
4. Select the right side of the gradient. Double clicking the color opens the *Select Color* window.
5. Pass through black.
6. Click *OK* to save your choices or *Cancel* to exit the color palette.
- Rainbow palettes are particularly nice in widgets that bin numeric values in visualizations.

Example
-------
Expand All @@ -53,7 +39,6 @@ We chose to work with the *Iris* data set. We opened the color palette and selec

![](images/Color-Example-1.png)

For our second example, we wished to demonstrate the use of the **Color** widget with continuous variables. We put different types of Irises on the x axis and petal length on the y axis. We created a new color gradient and named it greed (green + red).
In order to show that sepal length is not a deciding factor in differentiating between different types of Irises, we chose to color the points according to sepal width.
To see the effect of color palettes for numeric variables, we color the points in the scatter plot by sepal width and change the palette for this attribute in the Color widget.

![](images/Color-Example-2.png)

0 comments on commit 4e57843

Please sign in to comment.