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

조회 수: 112 (최근 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
Dominik Grochowski 2022년 4월 2일
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
Muhammad Hamza Tariq 2018년 5월 18일
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에서 General Applications에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by