필터 지우기
필터 지우기

How to set markers in custome intervals?

조회 수: 6 (최근 30일)
ayat
ayat 2013년 10월 18일
댓글: Image Analyst 2013년 10월 19일
The problem I have here is that using the default add marker in the code or the Fig editor, doesn't really work since I have tons of data points. Is there anyway to set markers on specific intervals so they do not over lap? Below is the code I am using for three figures:
figure(Fig_true);
plot(true_strain(1:a,1),true_stress(1:a,1),'b','linewidth',3);
figure(Fig_eng);
plot(eng_strain,eng_stress,'b','linewidth',3);
figure(Fig_strain_h);
plot(true_strain(1:a,1), strain_h,'b');
  댓글 수: 3
ayat
ayat 2013년 10월 19일
:D, those are just names of the figures, I named them so when I run the code they don't get confused with each other. With marker, I just mean plain markers on the curves, like circle or cross or whatever. As I understand matlab puts a marker on each of the data points, since I have 1000+ points it messes up the curve.
Image Analyst
Image Analyst 2013년 10월 19일
I knew that, but why did my code suggestion below not meet your needs?

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

답변 (1개)

Image Analyst
Image Analyst 2013년 10월 19일
편집: Image Analyst 2013년 10월 19일
Sure. You can try
% Plot elements 1-100 in blue dots
plot(true_strain(1:100,1),true_stress(1:100,1),'b.');
hold on;
% Plot elements 101-200 in red crosses
plot(true_strain(101:200,1),true_stress(101:200,1),'r+');
% Plot elements 201:300 in green squares
plot(true_strain(201:300,1),true_stress(201:300,1),'gs');

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by