Plot 2D graph - parameters explanation?

조회 수: 10 (최근 30일)
Faris Hajdarpasic
Faris Hajdarpasic 2019년 10월 19일
댓글: Faris Hajdarpasic 2019년 10월 20일
Hello, I have a few questions about editing my graph in MATLAB.
Questions are:
1) How can I have a grid like this (you can see dots starting at every section on y axis (0.5, and 1), and on x axis)
2) This line of code
stem(x,y,'bv:','MarkerSize',6,'LineWidth',2)
does not give me exactly the same output as here in the picture. I can't figure it out why (I tried many combinations, but didn't work)
Thanks in advance
examp.png

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 19일
Hi,
if I have understood your question correctly, the answer lies in ylim:
ylim([-1.5 1.5])
And this plot is not obtained with stem() alone, but also plot().First, it's been plotted with plot() using: plot(x,y, 'g--', 'linewidth', 8) or like in this around, and then with stem().
Good luck.
  댓글 수: 2
Faris Hajdarpasic
Faris Hajdarpasic 2019년 10월 19일
편집: Faris Hajdarpasic 2019년 10월 19일
Yes, plot is already included. I was just asking for stem.
So how to have grid like this, and what is wrong here
stem(x,y,'bv:','MarkerSize',6,'LineWidth',2)
Faris Hajdarpasic
Faris Hajdarpasic 2019년 10월 20일
It seems the problem is with resolution. My screen id 1920x1080, and MATLAB resolution is lower, so now I am looking for solution for this problem.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by