Plot an image with an irregular grid.

image_irreg(x,y,R) % Matlab & Octave
image_irreg(x,y,R) #R

Plot an image with an irregular grid. This is useful for plotting matrix data (i.e., sampled data that is a function of two parameters) in which one or both of the sampling schemes is not regularly spaced. image_irreg plots R(i,j) as a coloured patch centered on x(i),y(j) and with dimension determined by x(i)-x(i-1) and y(i)-y(i-1).

Input var Description Default value
x is a vector with the horizontal axis coordinates of each value in R. N/A
y is a vector with the vertical axis coordinates of each value in R. N/A
R is a matrix of measurements to display. N/A
• The values in R are converted to colours in the current colormap and caxis. R must be length(x) by length(y). Use NaN to have a patch not display.
• image_irreg plots R(i,j) as a coloured patch centered on x(i),y(j) and with dimension determined by x(i)-x(i-1) and y(i)-y(i-1).

### Matlab & Octave

image_irreg(1:5,1:5,repmat(1:5,5,1))

### R

image_irreg(1:5,1:5, pracma::repmat(1:5,5,1))