- pcolor(G, outline=(0.5,:dot), show=true)
- # Now use the G x,y coordinates in the non-regular form
- pcolor(G.x, G.y, G.z, show=true)
- # An irregular grid
- X,Y = GMT.meshgrid(-3:6/17:3);
- XX = 2*X .* Y; YY = X.^2 .- Y.^2;
- pcolor(XX,YY, reshape(repeat([1:18; 18:-1:1], 9,1), size(XX)), lc=:black, show=true)
- """
- function pcolor(X::VMr, Y::VMr, C::Matrix{<:Real}; first::Bool=true, kwargs...)
- (isvector(X) && !isvector(Y)) && error("X and Y must be both vectors or matrices, not one of each color.")
- if (isvector(X))
- gridreg = (length(X) == size(C,2)) && (length(Y) == size(C,1))
- (!gridreg && ((length(X) != size(C,2) + 1) || (length(Y) != size(C,1) + 1))) &&
- error("The X,Y vectors sizes are not compatible with the size(C)")
- else
- (size(X) != size(Y)) && error("When X,Y are 2D matrices they MUST have the same size.")
- (size(C) == size(X)) && (C = C[1:end-1, 1:end-1])
- (size(X) != size(C) .+ 1) && error("X,Y and C matrices must either have the same size or X,Y exceed C by 1 row and 1 column.")
- end