how to shift origin or graph without changing the data value.
조회 수: 12 (최근 30일)
이전 댓글 표시
Let's say you have a (x,y) = (1,1) however is there a possible way to show another quadrant of the graph? Every time i try to set the limit, it just changes the interval and does nothing to it. Please help. i looked into x1 =gca?? ax.XAxisLocation? i am not too sure how to utilize these functions nor what they do please help!!
댓글 수: 0
채택된 답변
Star Strider
2018년 2월 3일
It’s easier to demonstrate if you plot something in all four quadrants.
Example —
x = [-1 1 -1 1];
y = [-1 1 1 -1];
figure(1)
plot(x, y, 'pg', 'MarkerSize',10, 'MarkerFaceColor','g')
Ax = gca;
Ax.XAxisLocation = 'origin';
Ax.YAxisLocation = 'origin';
axis([-1.5 1.5 -1.5 1.5])
grid on
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!