Three-dimensional plots using Octave
In this tutorial, we will learn how to produce a three-dimensional plot using Octave. Octave has the capability to plot data in both 2D and 3D.
Octave 2D Plots:
The 3D plot has three axes i.e x-axis, the y-axis, and the z-axis. The basic 3D plot function in Octave is the plot3 command.
x,y and z are vectors that represent the (x,y,z) coordinates in the three dimensions.
There are several 3D plot functions available in Octave. Some of the functions are as follows:
plot3 is a three-dimensional line plot. To plot surfaces, we can use the surface plot surf command.
Let’s plot a 3D line plot using the plot3 command.
% plot3 command Demo
% Octave Tutorials – www.TestingDocs.com
% Generate z, x, y vectors
z = [0:0.05:10];
x = cos (2*pi*z);
y = sin (2*pi*z);
title (“plot3() demo of a Helix – www.TestingDocs.com”);
Octave Tutorial on this website can be found at:
More information on Octave can be found on the official website: