![]() |
VOOZH | about |
Prerequisites: Matplotlib, NumPy
In this article, we will see how can we can view our graph from different angles, Here we use three different methods to plot our graph. Before starting let's see some basic concepts of the required module for this objective.
Approach:
Step 1: Import libraries.
Step 2: Plotting 3-D axis figure.
Step 3: Creating a Datasheet for all the 3-axis of the sample.
Step 4: Use view_init() can be used to rotate the axes programmatically.
Syntax: view_init(elev, azim)
Parameters:
- βelevβ stores the elevation angle in the z plane.
- βazimβ stores the azimuth angle in the x,y plane.D constructor.
Below is the full Implementation:
Example 1: In this example, we will plot a curve graph with an elevated angle of -140 degrees and a horizontal angle of 60 degrees.
Output:
π ImageExample 2: In this example, we will plot a curve graph with an elevated angle of 120 degrees and a horizontal angle of 30 degrees.
Output:
π ImageExample 3: In this example, we will plot a rectangular plate graph with an angle view of 50 degrees.