how to shift a pcolor figure ?

6 visualizzazioni (ultimi 30 giorni)
Rabih Sokhen
Rabih Sokhen il 25 Mar 2021
Commentato: Mathieu NOE il 26 Mar 2021
hello !
is their a way to shift a pcolor figure to the center?

Risposte (1)

Mathieu NOE
Mathieu NOE il 25 Mar 2021
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

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by