Teach you how to use Matlab to draw scatter plots.

Source: Internet
Author: User
Method/Step 1, since to draw a scatter plot, naturally need some discrete data, the following we use MATLAB to generate this data, the actual application of the data we obtained is obtained from other means. The specific instructions and results are as follows: 2, first need to draw a point chart, that is, the location of each number of points drawn out, the use of the Directive is: Scatter (x,y1, ' K '), the directive is mainly used to draw a point map, the "inside of the K mark is every point in black paint, It is also possible to add some other parameters together: as shown in the following figure: 3, the following is the first step to generate data and the second step of the instructions to draw a point graph, as shown in the figure below, green is Y1 data, red is y2 data. 4, the following point string up, it is done, the use of the command is: Plotyy (x,y1,x,y2, ' plot '), the specific figure is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.