Matlab image Operation--colorbar All the details of Operation __matlab

Source: Internet
Author: User

recently in the paper using MATLAB to generate Height field, online search a lot, do a small sum of their own.


First, if you want to add colorbar to the resulting picture, there are two ways:

1: In the generated figure image of the menu bar : insert-colorbar, or click the upper shortcut area to add Colorbar, see the following figure:



2: The command line is written directly

Colorbar;

If you want to specify a location at random:

Colorbar (' position ', [0.95 0.1 0.04 0.8]);
The data in square brackets refer to the horizontal axis, ordinate, width, and height of the lower left corner of the Colorbar. You can try changing the data to see the change.


Second, sometimes the generated colorbar is not what we want, how to adjust the colorbar of the numerical range and position .


Here is a control method for the 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 simpler.


We can click Colorbar, right-click--Select Launch ColorMap editor, you can adjust the Colorbar range of values at random



So we want to let our colorbar size, length, position, width are arbitrary, this is also very simple.

Click Colorbar, right-click--Select Show Property Editor



click on each small rectangle in the location to let our colorbar position change randomly.


Even, we can click the Colorbar in the image


can drag and resize arbitrarily.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.