Axes Ticks

We can change where the ticks are marked on r and theta axes using the following functions.

Syntax:

rticks(<vector with tick values>)

thetaticks(<vectors with tick values in degrees>)

See the following example for understanding the above functions.

Example 2:

Matlab




% MATLAB code for axes ticks
ax=polaraxes;
r=linspace(-pi,pi);
plot(ax,r,sin(r))
 
% Giving tick values
rticks([0 .23 .5 1 ])
thetaticks([0 23 31 180 203 211])


Output:

 

Polar Axes Appearance and Behavior in MATLAB

Polar axes are coordinate axes where the two coordinate axes are r-axis for magnitude and theta-axis for angles. MATLAB has many functions to change the properties of these polar axes which we shall see throughout this article. In this article we shall see how to modify following properties of polar axes in MATLAB:

  1. Axes limits
  2. Axes ticks
  3. Axes tick labels
  4. R-axis tick angle

Let us see each of these with an example each.

Similar Reads

Axes Limits:

MATLAB provides us with options to change the limits of r and theta axis by using the rlim() and thetalim() functions....

Axes Ticks:

...

Axes tick Labels:

We can change where the ticks are marked on r and theta axes using the following functions....

R-Axis Tick Angles:

...