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

396 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

TAB
TAB il 10 Set 2012
Modificato: TAB il 12 Set 2012
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')

Più risposte (3)

Dominik Grochowski
Dominik Grochowski il 2 Apr 2022
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 il 18 Mag 2018
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 il 13 Set 2013
when the name has grec character,it not appear in the graph

Categorie

Scopri di più su Simulink Environment Customization in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by