First, if you want to add colorbar to the generated image, you can do it in two ways:
1: Insert — Colorbar in the menu bar of the generated Figure image, or click on the shortcut area at the top to add Colorbar, as shown below:
2: Directly from the command line
colorbar;
If you want to specify the location at will:
colorbar('position',[0.95 0.1 0.04 0.8]);
The data in square brackets refer to the x-coordinate, y-coordinate, width, and height of the colorbar bottom-left point. You can try to change the data and see what happens.
Second, sometimes the resulting colorbar is not what we want it to be. How can we arbitrarily adjust the range and position of the colorbar?
Here is a control method for a program statement:
1、set(a, 'CLim', [0 1]);
2、caxis([0,1]);
before colorbar, you can set its upper and lower limits, usually the second method is relatively simple!
To adjust the value range of the colorbar, right-click on it and select Launch ColorMap Editor
So we want our colorbar to be as big, as long, as big, as wide as we want, and that’s pretty easy!
Click ColorBar, right-click — select Show Property Editor
Click on each of the small rectangles in Location to let our Colorbar position change.
We can even click colorbar in the image
Feel free to drag and resize.
Read More:
- VTK cultivation 26: basic operation of image_ Three dimensional image slice extraction
- Solution to “550 create directory operation failed” in FTP operation file
- Unsupported operation types unsupported operation data types
- The second operation of software engineering
- During a paging operation
- Simple understanding and basic operation of mongodb
- MySQL operation and maintenance slave_ skip_ errors
- IE8: this operation cannot be completed due to error 80020101
- Prompt 550 remove directory operation failed when FTP delete folder
- C# SevenZip simple operation
- MySQL error operation should contain 1 column (s)
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLError
- NPM install Error: EPERM: operation not permitted, mkdir solution
- Java retainAll throws an unsupported operation exception record
- EPERM: operation not permitted, symlink ‘../../’
- String operation to delete the character at the specified position
- hdfs-bug:DataXceiver error processing WRITE_BLOCK operation
- Xcode 5 solves the operation could’t be completed
- Basic formula of logarithm operation
- run.bat Operation flashback