Axes objects order - multiple plot types

2 ビュー (過去 30 日間)
curoi
curoi 2013 年 5 月 10 日
I'm trying to plot different axes objects in a particular order. I have multiple plots that are overlayed on top of one another as follows:
Fig2 = figure( 'Color', 'w', 'PaperPositionMode', 'auto', ...
'Units', 'inches', 'Position', [ 0.01 0.01 6.99 8.74 ] );
hold off;
cla;
hold on;
ax1 = gca;
h6 = imagesc( x, y, ( sqrt( K1.uamp' .^ 2 + K1.vamp' .^ 2 ) ) );
set( h6, 'alphadata', ~isnan( sqrt( K1.uamp' .^ 2 + K1.vamp' .^ 2 ) ) );
h7 = quiver( indx.x, indx.y, K1.uamp, K1.vamp, 1.5 );
set( h7, 'Color', 'black' );
h8 = plot( coast.x, coast.y, 'Color', [ 0.8 0.8 0.8 ] );
h9 = scatter( source.x, source.y, 70, 'm', 'fill', '^' );
axis equal;
set( ax1, 'Layer', 'top' );
xlim( [ -9 7 ] );
ylim( [ -9 7 ] );
xlabel( 'X (km)' );
ylabel( 'Y (km)' );
box on;
But for whatever reason the line plot object (h8) still overrides the scatterplot object (h9). I tried using:
h10 = get( ax1, 'Children' );
uistack( h10(1), 'top' );
How do I get the scatterplot to lie on top of the line plot?
Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by