In our application we need to sometimes plot contour lines from geoshow() on top of other geoshow() surface plots. In order to make them visible we need to raise them in Z by a few units. We can find the ZData for the contour lines but when we try to change it we get this error message "Insufficient number of outputs from function on right hand side of equal sign to satisfy overloaded assignment." The geoshow() call we're using is this. A = geoshow(latMat2, lonMat2, newRain2, 'DisplayType', 'contour', 'linewidth', 1.0); Once above command is executed, we can see the ZData (all zeros) with this A.Children(:).ZData We try to swap in new ZData values with this A.Children(:).ZData = 8; and get the above referenced error message. Obviously we're doing something wrong, but don't know what it is.
Kshitij Singh answered .
2025-11-20
C = 8; %some arbitrary height you want place your map at A.Children.ZData = C*ones(size(A.Children.XData)));
I think the issue was that XData, YData, and ZData need to be the same size. So you just need to create an array of all "8s" and assign it to ZData.