MATLAB: Simple question regarding plot plots Hello all I have 2 set of data let say Given_data and Obtained_data now I want to draw first Given_data on x axis as red points and Obtained_data on y axis as blue points. How that can be done? Please Guide Best Answer Given_data = rand(10,1);Obtained_data = rand(10,1);plot(zeros(size(Given_data)),Given_data,'r+');hold onxlabel('Given_data');plot(Obtained_data,zeros(size(Obtained_data)),'b+');hold offylabel('Obtained_data'); Related SolutionsMATLAB: How can a draw a line between two points Assuming that x, average, and average_2 are all row vectorsaxes;hold on;plot(x, average,'o', 'MarkerEdgeColor', 'b', 'MarkerFaceColor', 'b'); % Blue pointsplot(x, average_2,'o', 'MarkerEdgeColor', 'r', 'MarkerFaceColor', 'r'); % Red pointsplot([x;x], [average; average_2], '-k');If the data are column vectors you'll have to transpose the arrays. MATLAB: Plotting curve in matlab Tryplot(of_traffic, block_Pb,'*r-');to draw lines between the points. Related QuestionHow to change color of x and y axis by red and bluePlot3 error barsDisable border blue in scatter plot
Best Answer