The VIBES Toolbox has comprehensive plot functionality for the following classes:
This tutorial focusses on the plotting capabilities of the vibes.TimeSeries and vibes.TimeBlocks classes.
All plot settings are available by using the ‘property’, ‘value’ syntax. By default, the plot methods of the classes in the above scale the axes according to the units of the Channels and/or RefChannels.
The VIBES Toolbox has many plotting capabilities to make the visualization of measurement data easier. This will be illustrated using time data from a vehicle run-up.
% Load a vibes.TimeSeries object containing the time data
TS = vibes.load(‘VIBES,Examples,Datasets’,’mat’,’i3′,’i3Measurement.TimeSeries.mat’);
Create a figure and plot the Time Series. One can select specific measurement channels by inserting the Channel indices as input arguments, in this example the 1st Channel, corresponding to an accelerometer placed on the seat rail. The time data is plotted between 0 and 25 seconds.
Figure 2-9: Plotting time series
The first argument, the channel, accepts an array of class vibes.Channel as well. This can be especially useful for smart selection of the channels using the “find” and/or “select” methods on the properties of the channel objects.
Here’s an example of channel matching using the name ‘SeatRail’, corresponding to both acceleration channels.
ch_i = TS.Channels.select(‘Name’,’SeatRail’);
Figure 2-10: Plotting multiple channels as time series
The look of your plot can be customized using the third input argument. Use any vibes.plotStyle format to specify properties such as the line width, marker and color. For example, plot the time series as a green dotted line of width 2:
Figure 2-11: Changing plot settings
You can also specify the plot style as a structure:
S = struct();
S.LineWidth = 2;
S.Color = vibes.color(‘g’);
S.LineStyle = ‘:’;
The plotting settings mentioned can also be applied to the vibes.TimeBlocks class. Additionally, a selection can be made as to which block should be plotted.
% Load a vibes.TimeBlocks object containing the same time data cut into
% 0.25 second blocks.
TB = vibes.load(‘VIBES,Examples,Datasets’,’mat’,’i3′,’i3Measurement.TimeBlocks.mat’);
% Select the block for which the name contains ’10sec’.
bl = TB.Blocks.select(‘Name’,’10sec’);
Figure 2-12: Plotting time blocks
In order to visualize where the time data was cut into blocks, the vibes.TimeSeries can be plotted together with dashed lines where the blocks start.
% Plot the time series.
% Get the start times of the blocks and plot dashed lines.
t_block = [TB.Blocks.t1];
Figure 2-13: Showing the time blocks as dashed lines
Still haven't found what you are looking for?
Contact our support team or call us on +31 85 744 09 70