Axis ticklabels grouping with subgroups for grid plot

I have a grid that I want to plot via surface / meshgrid / imagesc etc in 2D plot. Instead of showing
For example:
x=1:0.1:4
y=1:0.1:4
[X,Y]=meshgrid(x,y)
Z=sin(X).^2+cos(Y).^2
surf(X,Y,Z)
view(2)
======================
Instead of showing non-informative tick labels both on X, Y axis, I need to group them in some arbitrary logic and subgroup certain XY elements within a group to get following result:
Is this possible at all via MATLAB plot?

댓글 수: 1

Dyuman Joshi
Dyuman Joshi 2023년 2월 3일
편집: Dyuman Joshi 2023년 2월 3일
I don't think it's possible to draw boxes as you have indicated (unless you draw them as a part of a plot, which is going to be a hassle), but you can modify the x and y tick labels to get the text accordingly.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2023년 2월 3일

편집:

2023년 2월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by