简体   繁体   中英

Scatter plot in 2D

I have been facing in a great problem in doing scatter plot. Let,in X-axis i have to put the values of a variable x=5,6,7....,10.

For x=5, I have got 1000 values . Similarly, for x=6 i have another 1000 values and so on and let they are as Y. How can I create a 2D scatter plot in matlab for "X" versus "Y"? What will be the matlab command for it? please help me out.

If you are working on a "recent" - less than 4 yo - version of Matlab, you can access the scatter plot from the GUI by selectionning the x and y in the variable panel, and then click on plot to choose the scatter plot.

Otherwise, you can just follow the example given in the official documentation : http://www.mathworks.com/help/matlab/ref/scatter.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM