Next, we will see how to set a range of values with a fixed interval as the ticks of a plot. In the above 2 examples, we have passed all the values which we want to set as the ticks of a plot as arguments to the xticks function. We have also set the labels for these ticks using the xticklabels function. Xticklabels ()Īs we can see in the output, we have obtained ticks of our choice, i.e. In this example, we will use the plot function to plot a cos wave and then will set the ticks for it using the xticks function. Use the xticklabels function to set the labels for the ticks defined in the above step.Īs we can see in the output, we have obtained ticks of our choice, i.e.Use the xticks function to set the ticks for the x-axis.In this example, we will use the plot function to plot a sine wave and then will set the ticks for it using the xticks function. Given below are the examples of Matlab xticks: Example #1 xticks (A: B: C) is used to set the ticks defined by the range A: C, with a B gap between the ticks.Please note that A must have values in the ascending order. xticks (A) is used to set the ticks defined by the vector A.Hadoop, Data Science, Statistics & others
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |