R-Axis Tick Angles

We can change the orientation of r-tick labels in which they are displayed. There is a simple function for the same.

Syntax:

rtickangle(<angle of rotation>)

We can use the above function without an argument to query the current r-tick angle. Getting the current rotation angle. Consider the following plot.

 

We can query its rtickangle like following.

Example 4:

Matlab




% MATLAB code
ax=polaraxes;
r=linspace(-pi,pi);
plot(ax,r,sin(r).^2+cos(r).^2)
 
% Getting the rtickvalue
ang=rtickangle


Output:

 

As we can see, the default angle of r-ticks is 0 degrees.

Example 5:

Matlab




% Changing the r-tick angle in MATLAB
ax=polaraxes;
r=linspace(-pi,pi);
plot(ax,r,sin(r).^2+cos(r).^2)
 
% Rotating rtick labels to 310 degree
rtickangle(ax,310)


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:

...