Remove data in figure after plot

52 次查看(过去 30 天)
I have the following situation, and I would like to select only some of that curves. Is there a manner?
  3 个评论
Gabriele Curcio
Gabriele Curcio 2023-6-8
But I can make the curves invisible inside the "Figure" window?

请先登录,再进行评论。

采纳的回答

the cyclist
the cyclist 2023-6-8
Similar to @Dyuman Joshi's answer, you can make the line "invisible", rather than deleting:
x = 0:0.01:10;
%5 curves
y1 = 10*sin(x);
y2 = 10*cos(x);
y3 = 0*x+10;
y4 = x.^2;
y5 = 10*(sin(x)-cos(x));
%plotting the curves
figure
h = plot(x,y1,x,y2,x,y3,x,y4,x,y5);
% Turn off the visibility of the first curve
set(h(1),"Visible","off")
  2 个评论
Gabriele Curcio
Gabriele Curcio 2023-6-8
But I can make the curves invisible inside the "Figure" window?
the cyclist
the cyclist 2023-6-8
编辑:the cyclist 2023-6-8
I'm confused. Here, I'm making all the curves invisible.
x = 0:0.01:10;
%5 curves
y1 = 10*sin(x);
y2 = 10*cos(x);
y3 = 0*x+10;
y4 = x.^2;
y5 = 10*(sin(x)-cos(x));
%plotting the curves
figure
h = plot(x,y1,x,y2,x,y3,x,y4,x,y5);
% Turn off the visibility of all curves
set(h,"Visible","off")

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by