How to give option to change plot properties(e.g. color, line width, line style) in matlab app designer ?
45 次查看(过去 30 天)
显示 更早的评论
This will be similer to figure properties option available if graph is plotted in a matlab script.
Like shown in below figure...we can change the lineWidth and color of chosen line graph if we plot it using matlab scripts. I want give option like this in my app developed using matlab app designer
2 个评论
Ngo Nguyen
2021-4-19
Did you try this? https://www.mathworks.com/help/matlab/creating_guis/graphics-support-in-app-designer.html
采纳的回答
Aghamarsh Varanasi
2021-4-22
编辑:Aghamarsh Varanasi
2021-4-22
Hi Vinayak,
You can customize the plot in a app developed in MATLAB app designer by setting the properties of the plot. For example,
plot(app.UIAxes, 1:2:10, 1:5:25);
- The properties of the plotted line can be set as follows,
% get the handles to the plotted lines
h = app.UIAxes.Children;
% get handle of a single line plot
line1 = h(1);
% change the properties of the line plot based on user input.
line1.Color = 'r';
line1.LineWidth = 2;
Hope this helps
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!