MATLAB: How to plot graph with color for xy vs z

3d plotscountours

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

Best Answer

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;
Related Question