Difference between revisions of "Faq color order images"

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
(Created page with "===Issue:=== How can I change the color order for scores images? ===Possible Solutions:=== For images (any image displayed in Plotgui) with 3 "slabs" (layers/variables) you...")
 
imported>Scott
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
http://wiki.eigenvector.com/index.php?title=Plotgui#Image_Specific_Properties
 
http://wiki.eigenvector.com/index.php?title=Plotgui#Image_Specific_Properties
 +
<hr>
 +
 
For images displayed with more than 3 layers the color for each slab is defined by slabcolors.m function. You can create a custom order in 3 ways:
 
For images displayed with more than 3 layers the color for each slab is defined by slabcolors.m function. You can create a custom order in 3 ways:
  
Line 14: Line 16:
 
* Turn class viewing on with View>Classes>Quarry menu item.
 
* Turn class viewing on with View>Classes>Quarry menu item.
 
* Right-click on a line and select Change Class Colors.
 
* Right-click on a line and select Change Class Colors.
 +
 +
[[Image:ChangeClassColorMenuItem.jpg| |400px| ]]
 
* Adjust the color order and click OK. This is the new color order to apply to the image.
 
* Adjust the color order and click OK. This is the new color order to apply to the image.
 +
 +
[[Image:ClassColorOrderFigure.jpg| |400px| ]]
 
* Go to the image plot and select the View>Settings menu item in the Plot Controls.
 
* Go to the image plot and select the View>Settings menu item in the Plot Controls.
 
* Go to the Image Settings section and change the slab color mode to be "classes".
 
* Go to the Image Settings section and change the slab color mode to be "classes".
 
* Click OK and your plot should update to the new color order.
 
* Click OK and your plot should update to the new color order.
 
[[Image:plotguiimagecolorslabssetting.jpg| |600px| ]]
 
[[Image:plotguiimagecolorslabssetting.jpg| |600px| ]]
 +
  
 
2) For PLS_Toolbox users one can define a custom color order in the slabcolors.m function.
 
2) For PLS_Toolbox users one can define a custom color order in the slabcolors.m function.
Line 26: Line 33:
 
* Comment out the existing variable 'clr' definition and add a new one based on the colors desired.
 
* Comment out the existing variable 'clr' definition and add a new one based on the colors desired.
  
* Specify the map as a three-column matrix of RGB triplets where each row defines one color.  
+
* Specify the map as a three-column matrix of RGB triplets where each row defines one color.
 +
* Select 'lines' for the color slab mode (as described above).
 +
[[Image:EditSlabColorsFile.jpg| |400px| ]]
 +
 
  
 
3) Adjust the order (for all schemes) by changing it at the bottom of the slabcolors.m function. The following example would change the color order so that the second slab color becomes the first when there are 3 or more slabs displayed. This code could be used at the bottom of the function (slabcolors.m) to switch color order:
 
3) Adjust the order (for all schemes) by changing it at the bottom of the slabcolors.m function. The following example would change the color order so that the second slab color becomes the first when there are 3 or more slabs displayed. This code could be used at the bottom of the function (slabcolors.m) to switch color order:
Line 38: Line 48:
  
 
NOTE: The color scheme is governed by the 'slabcolormode' plotgui setting (see link above).
 
NOTE: The color scheme is governed by the 'slabcolormode' plotgui setting (see link above).
 +
 +
See the Matlab colormap function for more information on defining colormaps:
 +
 +
https://www.mathworks.com/help/matlab/ref/colormap.html
 +
 
[[Category:FAQ]]
 
[[Category:FAQ]]

Latest revision as of 10:47, 11 June 2019

Issue:

How can I change the color order for scores images?

Possible Solutions:

For images (any image displayed in Plotgui) with 3 "slabs" (layers/variables) you can adjust the "gun order" of the RBG via the 'imagegunorder' plotgui setting. The gun order is the order in which Red (1) Green (2) Blue (3) channels are arranged. See here:

http://wiki.eigenvector.com/index.php?title=Plotgui#Image_Specific_Properties


For images displayed with more than 3 layers the color for each slab is defined by slabcolors.m function. You can create a custom order in 3 ways:

1) For Solo and PLS_Toolbox users one can create a custom color order for classes and apply it to the image. To do this you need to open a plot of data with classes.

  • In the Workspace Browser go to the Model Cache double click the 'arch' Demo Data dataset.
  • Right-click on 'arch' and select Plot.
  • Turn class viewing on with View>Classes>Quarry menu item.
  • Right-click on a line and select Change Class Colors.

ChangeClassColorMenuItem.jpg

  • Adjust the color order and click OK. This is the new color order to apply to the image.

ClassColorOrderFigure.jpg

  • Go to the image plot and select the View>Settings menu item in the Plot Controls.
  • Go to the Image Settings section and change the slab color mode to be "classes".
  • Click OK and your plot should update to the new color order.

Plotguiimagecolorslabssetting.jpg


2) For PLS_Toolbox users one can define a custom color order in the slabcolors.m function.

  • Open the function and go to the 'otherwise' section of the switch statement.
  • Comment out the existing variable 'clr' definition and add a new one based on the colors desired.
  • Specify the map as a three-column matrix of RGB triplets where each row defines one color.
  • Select 'lines' for the color slab mode (as described above).

EditSlabColorsFile.jpg


3) Adjust the order (for all schemes) by changing it at the bottom of the slabcolors.m function. The following example would change the color order so that the second slab color becomes the first when there are 3 or more slabs displayed. This code could be used at the bottom of the function (slabcolors.m) to switch color order:


if num>=3
  clr = clr([2 1 3:end],:)
end

NOTE: The color scheme is governed by the 'slabcolormode' plotgui setting (see link above).

See the Matlab colormap function for more information on defining colormaps:

https://www.mathworks.com/help/matlab/ref/colormap.html