plot lines and stems behind the markers?

15 visualizaciones (últimos 30 días)
Sim
Sim el 21 de Oct. de 2020
Comentada: Sim el 21 de Oct. de 2020
Hi, How can I put the plot lines and stems behind the markers?

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 21 de Oct. de 2020
You can use uistack(). For example, consider this code
x = 1:10;
y = rand(1,10);
hold on
s = scatter(x, y, 'filled', 'SizeData', 100);
p = plot(x, y, 'LineWidth', 2);
the line will be over the scatter points. You can bring the scatter point on top using
uistack(s, 'top')
  3 comentarios
Ameer Hamza
Ameer Hamza el 21 de Oct. de 2020
You can also get the handle of stem object and arrange it using uistack
s = stem(..)
Sim
Sim el 21 de Oct. de 2020
thanks a lot!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Stem Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by