필터 지우기
필터 지우기

how to plot scatterplot for one attribute?

조회 수: 1 (최근 30일)
Priyanka Gaikwad
Priyanka Gaikwad 2017년 7월 7일
댓글: KL 2017년 7월 7일
lets say I have a data for attribute xyz is 23 12 43 21 43 21 334 65 32 12 and i want a graph where x axis will hold the location of data and y axis will hold the value for example,if i want data in form of point(xvalue,yvalue), then(1,23),(2,12),(3,43),(4,21) should get plotted on the graph and it should be scatterplot.
Please tell me the syntax for same. Thank you in advance!

답변 (1개)

José-Luis
José-Luis 2017년 7월 7일
data = rand(10,1);
figure
plot(data); %implicit
figure
plot(1:size(data,1), data); %explicit
Please read the documentation on plot();
  댓글 수: 2
Priyanka Gaikwad
Priyanka Gaikwad 2017년 7월 7일
Thank you. and what if I want it to be a scatterplot?
KL
KL 2017년 7월 7일
use scatter instead of plot. Please Read.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by