How to I give a title and axes names to the graph generated by the XY Graph Block In Simulink

394 次查看(过去 30 天)
I am using Simulink for a certain co-simulation as a part of my project. The results to my work can be best explained through a bunch of XY Graphs generated in Simulink. The only downside is I am unable to change the axes names and the graph title as seen in the Graph Window. Is there a way to do this? It would greatly help me compile my results faster.
If it is not possible, kindly give me other alternatives if any.
Thanks in advance.
Regards, Avinash

采纳的回答

TAB
TAB 2012-9-10
编辑:TAB 2012-9-12
Unfortunately there is no option to automatically set the axes labels or name in figure generated by simulink X-Y graph.
However, after simulation, you can manually add axes names from figure GUI or from command window.
From Figure GUI
  • Select the X-Y graph generated by simulink. Run below cammands in command window
set(0,'ShowHiddenHandles','on')
set(gcf,'menubar','figure')
  • These commands will enable the toolbar in X-Y graph figure window. You can add axes names from Insert >> X Label and Insert >> Y Label.
From command window
After the simulation, select X-Y plot window and run these command in command window
xlabel('X_Axis_Name')
ylabel('Y_Axis_Name')
set(gcf,'name','Figure Name')

更多回答(3 个)

Dominik Grochowski
right-click on the figure
select "Print Display to Figure"
In the new window:
Go to Insert
there you can add/remove labels such as xlabel and ylabel

Muhammad Hamza Tariq
Adding a title to Simulink' scope window:
- Open the scope window
- Right click on the figure and go to " Axes Properties "
- Mention your desired title in the textbox, below the Y-max, Y-min setting blocks.
- Re-run the simulation

usdb usdb1
usdb usdb1 2013-9-13
when the name has grec character,it not appear in the graph

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by