Matlab

GRAPHICS IN MATLAB

GRAPHICS IN MATLAB

There are many different ways to manipulate graphics, for such the commands may include i.e., type help graphics for general graphics, while help graph2d is used for two dimensional command and for specialized and three dimensions the commands are help graphg3d, help specgraph.

Two-dimensional graphics:

Their two types of plotting in two dimensional graphs one is parametric and another one is contour or implicit plotting.

Parametric plots:

   In a parametric plot, you give both the x and y coordinates of each point as a function of a third parameter, let us consider the parametric example.

r= linspace(0,4*pi,1000)

x=1.5*cos(t)-cos(10*r);

y=1.5*sin®-sin(10*t);

plot(x,y);

x label(‘x’);

y label(‘y’);

title(‘better parametric plot example’)

Contour plot:

A contour of a function of two variables may be a curve along which the function features a constant value. Contour lines are used for creating contour maps by joining points of equal elevation above a given level, like mean water level.

A command meshgrid is used to provide grids for the rectangular regions. While the grid used by contour to produce the contour plot for the given region.

a= linspace(-2*pi,2*pi);

b = linspace(0,3*pi);

[a,b] = meshgrid(a,b);

C= cos(a)+sin(b);

contour(a,b,C)

Three dimensional plots:

In three dimensional plots they have three vectors in the same graph (x, y,z) mainly there are five different type of three dimensional plot in matlab. They are;

Mesh plot:

The mesh plotting function is employed to display the mesh plot. Which produces an wireframe surface where the lines connecting the defining points are colored.

 [x,y] = meshgrid(-12:0.1:12);

t = sqrt(x.^2+y.^2);

z =(10*sin(t));

mesh(x,y,z)

Surface three dimensional plot:

Which is similar to mesh plot main different between them is in surface path the convecting lines and faces will be displayed in dark color. Let us consider the example.

[x,y] = peaks(30);

z = exp(-0.7*(x.^2+0.5*(x-y).^2));

surf(x,y,z);

xlabel(‘\bf X axis’);

ylabel(‘\bf Y axis’);

zlabel(‘\bf Z axis’);

title(‘\bf Surface Plot’)

colorbar

Rajeshwari Chiluveru

Rajeshwari (M.Tech) is the Technical Education Director at WebVidyalayam. She focuses on translating high-level systems engineering into accessible technology courses.

Share
Published by
Rajeshwari Chiluveru

Recent Posts

Samsung TV This Function is Not Available Error: Tizen OS Logic & Fixes (2026)

Introduction: Encountering the message 'This Function is Not Available' on a Samsung Smart TV is…

3 days ago

How to Use FlexClip AI PowerPoint to Video (Step-by-Step 2026)

We have all been there, you spend hours making a perfect PowerPoint presentation, but you…

5 days ago

Samsung Smart TV Screen Flickering On and OFF: 2026 Diagnostic & Fix Guide

🎓 Technical Learning Module: Display Engineering Verified 2026 👨‍🏫 Instructor: Lakshmi Durga (M.Tech) 🛡️ Oversight:…

3 weeks ago

Samsung Smart TV Remote Not Working: A Technical Analysis of IR & Bluetooth Logic

🎓 Technical Learning Module: Input Logic Verified 2026 Expert Solution 👨‍🏫 Instructor: Rajeshwari (M.Tech) 🛡️…

3 weeks ago

Samsung Smart TV Apps Not Loading: Tizen 9.0 Architecture & Logic Analysis

🎓 Technical Learning Module Verified 2026 Expert Solution 👨‍🏫 Instructor: Rajeshwari (M.Tech) 🛡️ Oversight: Ratan…

2 months ago

Google Spam Update 2025: Impact, Recovery Guide & SpamBrain Explained

Google released a spam update on 26th of August 2025 and this is affecting a…

7 months ago