Now let’s see another example of color code as follows. The find output of the above example we illustrated by using the following screenshot as follows. This is a very simple example of plotting the graph, here we plot a graph with two different lines such as dotted and solid with the different color combinations as shown in the above example. Now let’s see how we can use the short names in Matlab as follows. The remaining part of this example is simple which means we plot the graph with color parameters. Notice here we use hexadecimal color code but we need to convert it into the RCG value as shown in the above example. In the above example we have two expressions for x-axis and y-axis as shown, after that, we specify the hexadecimal code that we want to use and that code we store into the hex variable. Now let’s see the different examples of color code in Matlab for better understanding as follows.Ĭolorcode = sscanf(hex(2:end),'%2x%2x%2x',)/255 There is another way to use color code is that hexadecimal code combination. Suppose we need to plot the graph with magenta and green at that time we can use the same name of the color that magenta and green. In this method, we can use the full name of color instead of RGB and short name as per user requirement that we call long name. Now let’s see the third way is that long name: Suppose we need to import the yellow and cyan color in Matlab at that time we can use the following short names of color as follows. This is a second way to import the color in Matlab, here instead of RGB value we can use short naming of color. Now let’s see the second way is that short name: for black and for red as per our requirement we can use any color code combination. Suppose we need to use black and red to plot the graph at that time we can use the following RGB value for that color as follows. The first way we use color code in Matlab, here we can use RGB value for color code and it contains the three different elements and that specify the basic color combination such as red, green, and blue, and range of this element is that.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |