Among all the posts I made in the last year, one that received many comments is How to customize the Simulink Scope. In this post, I suggested to use the simplot function to customize the way you visualize simulation data. The comments received sounded like:
- That is just a work-around, and not very convenient to be honest!
- One should be able to change the color of the signals easily with a palette
Today I am happy to welcome my colleague Roshin Kadanna Pally to introduce a feature he recently developed that addresses these concerns directly.
Graphical Property Editor for Simulink Scopes
Starting in release R2011b, graphical properties of Simulink Scopes can be customized using the new Simulink Scope graphical property editor. Using this feature, you can change the figure color, axes background and foreground colors, and line properties like color, style, width, and marker.
How does that work? You launch the graphical properties editor by clicking on the Simulink Scope parameters button:
You will notice a new third tab:
When plotting multiple lines on the same axes, the Simulink Scope block assigns colors to each line in the order – Yellow, Magenta, Cyan, Red, Green, and Dark Blue. When there are more than six lines on the same axes, the Scope block will cycle through these six colors. Using the graphical property editor, you can now change the color, style, width, and marker of each of these six lines. Here is an example:
The graphical properties of the Simulink Scope window can be changed before starting the simulation, when it is paused or after it is completed. Furthermore, the customized settings can be saved permanently by saving the Simulink model. When a Simulink Scope block with customized graphical properties is copied to create a new block, the graphical properties are copied as well.
Now it's your turn
Are you planning to create your own library of customized Scopes for different tasks? Leave a comment here.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.