how to shift a pcolor figure ?
9 次查看(过去 30 天)
显示 更早的评论
hello !
is their a way to shift a pcolor figure to the center?
0 个评论
回答(1 个)
Mathieu NOE
2021-3-25
yes for sure
% non centered plot
N = 21;
X = (1:N);
Y = (1:N);
C = rand(N,N);
figure(1),pcolor(X,Y,C)
colormap(gray(2))
axis ij
axis square
% centered plot
N = 10;
X = (-N:N);
Y = (-N:N);
C = rand(2*N+1,2*N+1);
figure(2),pcolor(X,Y,C)
colormap(gray(2))
axis ij
axis square
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!