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 CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by