フィルターのクリア

Controlling the elevation (Z value) of vector plots

1 回表示 (過去 30 日間)
Mike Wilson
Mike Wilson 2015 年 7 月 8 日
コメント済み: Mike Wilson 2015 年 7 月 8 日
I'm using the quiverm() function to plot ocean surface wind vectors. Plots include multiple scalar properties as well. Those are being plotted with geoshow() which by default puts ZData for those scalar properties at zero (elevation). Example would be:
A = geoshow(updatedLat, updatedLon, div_D2, 'DisplayType', 'Texturemap', 'FaceAlpha', 1);
For visual interpretation, one of the scalar properties needs to be plotted with transparency. When that's done, MATLAB's openGL renderer has difficulty sorting the two surfaces (both at Z = 0) properly. Draw order is not factored in. The symptom is that even opaque surfaces are rendered as slightly transparent.
A possible remedy is to force separation between the two scalar property surfaces. Leave the transparent scalar property surface at Z = 0. Move the opaque surface upward by a small increment. Using the "A" surface created with above geoshow() call, you can accomplish the elevation change with
A.ZData(:) = 10;
That works to solve the transparency problem. The opaque scalar data plots properly over the top of the transparent data, and it stays opaque.
However, it leaves the accompanying vector plot behind. That's still at Z = 0.
Is it possible to control the elevation (Z value) of a guiverm() vector plot?
Thanks,
Mike

採用された回答

Sean de Wolski
Sean de Wolski 2015 年 7 月 8 日
Adjust the 'ZData' of the lines In the quiverm plot:
load coast
axesm('eqaconic','MapLatLimit',[30 60],'MapLonLimit',[-10 10])
framem; plotm(lat,long)
lat0 = [50 39.7]; lon0 = [-5.4 2.9];
u = [5 5]; v = [3 3];
% Grab line handles
q = quiverm(lat0,lon0,u,v,'r')
% Adjust first line height
q(1).ZData = q(1).ZData + 100; % (14b or greater), otherwise use set/get
  1 件のコメント
Mike Wilson
Mike Wilson 2015 年 7 月 8 日
Thanks Sean! That's done it. I didn't know I had access at that level. Big help!

サインインしてコメントする。

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by