Format axes in plot
조회 수: 1 (최근 30일)
이전 댓글 표시
Is it possible to color a single number (or a set of numbers) on one of the axes in Matlab?
Suppose I have a plot:
plot(1:10, rand(1,10))
Now, can I e.g. make the number 3 on the x-axis red?
Thanks!
댓글 수: 1
Hanif
2013년 5월 21일
try plot(1:10, rand(1,10), 'ForegroundColor','Red')
as for one number not too sure
답변 (1개)
Jan
2013년 5월 22일
Searching in the FileExchange for "tick label" finds a lot of interesting methods, e.g. http://www.mathworks.com/matlabcentral/fileexchange/36254-ticklabelformat-set-a-dynamic-format-of-axes-tick-labels. This will not solve the problem directly, but it contains enough details.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!