Complete the code to create a basic scatter plot of x and y.
x = 1:5; y = [2, 4, 6, 8, 10]; scatter(x, [1]);
The scatter function plots points using x and y coordinates. Here, y is the vertical data.
Complete the code to add red color to the scatter plot points.
x = 1:5; y = [3, 6, 9, 12, 15]; scatter(x, y, 36, [1]);
The fourth argument in scatter sets the color of the points. 'red' colors points red.
Fix the error in the code to plot a scatter with circle markers.
x = 1:4; y = [5, 10, 15, 20]; scatter(x, y, 100, 'b', [1]);
The marker type 'o' specifies circle markers in scatter plots.
Fill both blanks to create a scatter plot with blue square markers and size 50.
x = 1:3; y = [7, 14, 21]; scatter(x, y, [1], [2], 's');
The third argument sets marker size (50), the fourth sets color ('blue'), and 's' sets square markers.
Fill all three blanks to create a scatter plot with green diamond markers, size 75, and label the x-axis as 'Time'.
x = 1:4; y = [10, 20, 30, 40]; scatter(x, y, [1], [2], '[3]'); xlabel('Time');
Size is 75, color is 'green', and 'd' sets diamond markers. xlabel labels the x-axis.