필터 지우기
필터 지우기

How can I plot multiple dots in single graph?

조회 수: 10 (최근 30일)
sunnat
sunnat 2019년 3월 18일
답변: Dhanashree Mohite 2019년 3월 21일
Hi. I am new here. please help me. I have a set of coordinates. I need to plot them in a single graph.
4543.74 , 3001.91
4555.9 , 4841.96
-725.813 , -7273.17
-5090.14 , 1156
-2702.72 , 1668.4 ...... 200+
I tried this. x=[4543.74,4555.9,-725.813,-5090.14,-2702.72 ]; y=[3001.91,4841.96,-7273.17 ,1156,1668.4]; plot(x.y).
It shows an error: Dot indexing is not supported for variables of this type.
  댓글 수: 1
madhan ravi
madhan ravi 2019년 3월 18일
plot(x,y,'-ok')
%^-—- comma
I would like to draw something like that. I have a coordinations of dots but I do not know how to plot the dots. Your solutions is with lines. Here I need only dots (with different color if possible)

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

답변 (1개)

Dhanashree Mohite
Dhanashree Mohite 2019년 3월 21일
Try to use scatter plot. there is option to plot with different colors as well.
You can refer the below link:

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by