I want to plot a graph showing me XY values for perticulur Z value i want z as a colour so i will get the data as XY for pertuculur Z
John Williams answered .
2025-11-20
I think you are looking for a scatterplot.
clear all; close all; clc;
x = rand(100,1);
y = rand(100,1);
z = rand(100,1);
figure();
scatter(x,y,20,z);
xlabel('x');
ylabel('y');
c = colorbar;
c.Label.String = 'z';
grid on;