ÌìÃÀ´«Ã½Ó°ÊÓ

print friendly version

Questions and answers

935
How do I manipulate or print a scope plot from Simulink (Matlab)


The menu in some Matlab/Simulink plots (scopes) or figures maybe hidden. Answer taken from the site. For more information see which states:

The ability to interact with Scope figure properities is not available because the handle of the Scope figure is not turned on. To turn the handle of your Scope figure on, and show the menus, type the following at the MATLAB command prompt (after opening the Scope figure):

shh = get(0,'ShowHiddenHandles');
set(0,'ShowHiddenHandles','On')
set(gcf,'menubar','figure')
set(gcf,'CloseRequestFcn','closereq')
set(gcf,'DefaultLineClipping','Off')
set(0,'ShowHiddenHandles',shh)

This will allow you to manipulate your Scope figure just like any other MATLAB figure, allowing you to make changes such as:

  • Background/foreground color
  • Line color
  • Add text or a legend
  • Add a print icon
  • Print the graph

NOTE: If you wish to change the color of the line go to:

View -> Figure Toolbar

This will allow you to interactively change the graph properties.

Note that there is no method to make Scope figure properties accessible by default, i.e., you must execute the aforementioned commands.

If you do not wish to change the visibility of your Scope, then you can export your data to MATLAB and use the command SIMPLOT to plot your data from MATLAB. This will generate a MATLAB figure that will allow you to change the figure properties. For more information, type 'help simplot' at the MATLAB command window prompt.

For more general printing help see Mathwork's How do I ...:

Help us to improve this answer

Please suggest an improvement
(login needed, link opens in new window)

Your views are welcome and will help other readers of this page.

Categories

This is question number 935, which appears in the following categories:

Created by Jason Bailey on 15 March 2002 and last updated by Mark Wilson on 8 August 2016