Filter löschen
Filter löschen

Axes objects order - multiple plot types

3 Ansichten (letzte 30 Tage)
curoi
curoi am 10 Mai 2013
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

Antworten (0)

Kategorien

Mehr zu Discrete Data Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by