How could i displace the values of X axis under X axis (Y negative) ?
조회 수: 3 (최근 30일)
이전 댓글 표시
+
댓글 수: 0
채택된 답변
Star Strider
2019년 2월 13일
Use the equation (or values) for the line, and plot the numbers just as you have plotted them under the circles. If you do not have an equation for the line that gives you the values for it at every ‘x’ value, use the interp1 function to calculate them.
댓글 수: 4
Star Strider
2019년 2월 15일
I don‘t have your data, so I can’t run your script.
I also have no idea what you want to do.
I gave you valid code. If it doesn’t work for you, I need to know the reason. Your posted code — especially without necessary data — gives me no useful information.
추가 답변 (1개)
Yair Altman
2019년 2월 16일
편집: Yair Altman
2019년 2월 16일
A peculiarity of AxisLocation='origin' is that the X and Y tick labels automatically switch location (from below the X axis to above-it, and from left of the Y axis to right-of-it, respectively) depending on where the axes origin (0,0) is located. You can easily see this behavior by dragging (panning) the axes up/down and left/right, respectively.
If you want to ensure that the labels appear beneath the X axes, then make the YLimit above the axes larger than the one beneath it. For example:
ax.YLim = [-.80001,.8];
axis([-6 19 -0.80001 0.8]); % alternative
댓글 수: 2
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!