Borrar filtros
Borrar filtros

how to shift a pcolor figure ?

8 visualizaciones (últimos 30 días)
Rabih Sokhen
Rabih Sokhen el 25 de Mzo. de 2021
Comentada: Mathieu NOE el 26 de Mzo. de 2021
hello !
is their a way to shift a pcolor figure to the center?

Respuestas (1)

Mathieu NOE
Mathieu NOE el 25 de Mzo. de 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
  2 comentarios
Rabih Sokhen
Rabih Sokhen el 25 de Mzo. de 2021
Thank you!
Mathieu NOE
Mathieu NOE el 26 de Mzo. de 2021
you're welcome

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by