How to change the dashboard x axis
6 views (last 30 days)
Show older comments
I want the Dashboard x axis based on other signal at current time step. how can i do this
2 Comments
Walter Roberson
on 11 Jun 2025
For certainty: You are referring to https://www.mathworks.com/help/simulink/slref/dashboardscope.html ?
Answers (1)
Abhishek
on 16 Jun 2025
I understand that you are trying to configure the Dashboard Scope block in Simulink such that the X-axis is based on another signal (not simulation time).
Unfortunately, the Dashboard Scope block does not support customizing the X-axis. It is designed to display connected signals against simulation time only, and this behavior is not configurable.
If your use case requires plotting one signal against another during simulation (e.g., plotting y versus x, where both are time-varying signals), here are a few alternatives you can try:
- Use the XY Graph Block: You can use the XY Graph block, which supports real-time plotting of one signal versus another during simulation. Simply connect your desired X-axis signal and Y-axis signal to this block. This block can be found under Simscape, then Utilities.
- MATLAB Plot: Another option is to log both signals using the ‘To Workspace’ blocks and then use MATLAB to plot the results post-simulation with the following command:
plot(x_signal, y_signal)
- Use Scope Block with Logging: You can use the standard Scope block to mark the signals for logging. After simulation, export the logged data to MATLAB and manually generate a custom XY plot.
I hope this helps.
3 Comments
Abhishek
on 19 Jun 2025
Abhishek
on 20 Jun 2025
Hi @Ajay Krishna Vasanthakumar, you can use the Selector block,by setting the index to 1, I was able to extract 'x[0]' and 'y[0]' (first element of the array signals, since Simulink uses 1-based indexing) and connect them to the XY Graph block. If you're plotting offline in MATLAB after simulation, you can use:
plot(x_signal(:,1), y_signal(:,1))
to get the same result.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!