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:
- Axes limits
- Axes ticks
- Axes tick labels
- R-axis tick angle
Let us see each of these with an example each.
Contact Us