Borrar filtros
Borrar filtros

Bringing plots to the "front" to make them more visible?

316 visualizaciones (últimos 30 días)
HC98
HC98 el 16 de Mayo de 2023
Editada: Stephen23 el 16 de Mayo de 2023
I'm plotting 2 quantities: I'm plotting a seried of values and overlaying the mean on top.
The trouble is, the mean line is underneath the main data series which makes it very hard to pickout on the plot. Is there a way to change the ordering so that it sits on top of the other data series like layers in photoshop? I tried playing with the transparency with
p2 = plot(x, data, 'k');
p2.Color(4) = 0.2;
hold on
plot(x, means)
hold off

Respuestas (2)

VBBV
VBBV el 16 de Mayo de 2023
Editada: VBBV el 16 de Mayo de 2023
Use a marker and increase fontsize
p2 = plot(x, data, 'k');
p2.Color(4) = 0.2;
hold on
plot(x, means,'ro','MarkerSize',12,'MarkerFaceColor','r')
hold off

Stephen23
Stephen23 el 16 de Mayo de 2023
Editada: Stephen23 el 16 de Mayo de 2023
"s there a way to change the ordering so that it sits on top of the other data series like layers in photoshop?"
Of course, use UISTACK:
For example:
lnh = plot(2,3,'b-*'); % blue is plotted first
hold on
plot(1:3,2:4,'r-*') % and is underneath red,
uistack(lnh,'top') % but we can bring it to the front!

Categorías

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

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by