function my_pcolor(x,y,z)
  
  nx=length(x);
  ny=length(y);
  
  dx=mean(diff(x));
  dy=mean(diff(y));

  xx=x; xx(nx+1)=x(end)+dx;
  yy=y; yy(ny+1)=y(end)+dy;
  
  xx=xx-dx/2;
  yy=yy-dy/2;

  zz=[z,zeros(ny,1);zeros(1,nx+1)];
  
  pcolor(xx,yy,zz)
  
  shading('flat')
  
  