Data Visualization

 

What Is Data Visualization?

3 things you need to know

Data visualization is the process of translating data into graphical representations like plots, charts, maps, and 3D visualizations that help you easily identify patterns, trends, and outliers in the data.

These data visualizations let you see relationships that would be difficult or impossible to observe merely by looking at the raw data, especially with big data sets from sources such as sensors, data loggers, medical records, web search patterns, and purchasing patterns. Data visualization plays a pivotal role in converting data into actionable information.

How Does Data Visualization Help?

Data visualization techniques vary across domains.

Computational Finance

Using historical or live market data, data visualization helps to quickly identify patterns and trends, detect anomalies, and get meaningful insights. Data visualization helps in performing analysis, developing predictive models, assessing risk, and formalizing trading strategies.

The plot below simulates the future behavior of electricity spot prices from a time series model fitted to historical data.

Plot of electricity spot prices showing the historical spot prices and trends with the simulated spot prices and trends. Date is on the x-axis and spot price is on the y-axis.

Plot of electricity spot prices showing the historical data with the forecasted deterministic trend.

Signal Processing

Signal processing is used in applications such as speech analysis, heart rate monitoring, wireless communications, remote sensing, climate monitoring, and GPS. Common tasks involve preprocessing and comparing signals, designing digital filters, transforming signals, performing measurements, and detecting patterns and events. Data visualizations are used to analyze signals of interest in time, frequency, and time-frequency domains.

The plot below is the audio data from a Pacific blue whale. The visualization is created in MATLAB® using the Signal Analyzer app that helps to visualize signals in the time and frequency domain.

A screenshot of Signal Analyzer app with signal data extracted from the audio of a Pacific blue whale and a graph of the data.

Region of interest extracted from the audio of a Pacific blue whale.

Image Processing and Computer Vision

Image and video processing helps to find shapes, count objects, identify colors, measure object properties, and find other meaningful information. Image processing techniques are often applied as a preprocessing step in the computer vision workflow. Applications in this domain include facial recognition for smart phones, pedestrian and vehicle avoidance in self-driving vehicles, video surveillance, tumor detection in medical MRIs, and other image retrieval systems.

For example, BMW uses computer vision capabilities in the Assisted Driving View (ADV) to depict surrounding vehicles and identify their types.

A screenshot of B M W Assisted Driver View demonstrating object detection.

BMW Assisted Driver View. MATLAB was used for automated verification including image registration, objection detection, ground truth labeling, and testing the ADV scene against the test output.

Artificial Intelligence (AI)

Data visualization plays an important part in developing AI models—using machine learning or deep learning—because the models rely on large data sets, which are difficult to interpret. In machine learning, cluster analysis helps in detecting anomalies and data preprocessing in supervised learning. Principal component analysis (PCA) and t-distributed Stochastic Neighbor Embedding (t-SNE) are the two most used data visualization techniques because they help reduce data dimensions so you can focus on key differentiating dimensions.

In deep learning, you can monitor training progress using data visualizations like plots of network accuracy and loss and investigate trained networks using visualization techniques such as gradient-weighted class activation mapping (Grad-CAM), occlusion sensitivity, local interpretable model-agnostic explanations (LIME), and deep dream.

Mahalanobis, Cosine, Chebychev, and Euclidian plots of three different species of irises.

Plots of different species of irises using the Fisher iris data set. Visualizations plotted using the tsne function.

How Does Data Visualization Work?

Software packages provide capabilities to transform raw data into rich visualizations, such as plots, charts, and diagrams. The following is an illustrative example of bike traffic density data. Solely by visually inspecting the raw data, it is difficult to establish a relationship between the data points.

Preview of raw bike traffic density data.
Timestamp Day Total Westbound Eastbound Time
‘2015-06-24 07:00:00’ ‘Wednesday’ 141 13 128 7
‘2015-06-24 08:00:00’ ‘Wednesday’ 327 44 283 8
‘2015-06-24 09:00:00’ ‘Wednesday’ 184 32 152 9
‘2015-06-24 10:00:00’ ‘Wednesday’ 94 30 64 10
‘2015-06-24 11:00:00’ ‘Wednesday’ 67 24 43 11
‘2015-06-24 12:00:00’ ‘Wednesday’ 66 32 34 12
‘2015-06-24 13:00:00’ ‘Wednesday’ 67 32 35 13

The bar graph below shows that the bicycle traffic density rises and falls over the days of week. It’s now clear that the number of bicyclists is greater during the weekdays as compared to weekends. This visualization allows us to infer that bicyclists on this route are predominantly commuting back and forth from work.

A bar chart of the median number of bicycle riders per day of the week.

Bicycle traffic data plotted using a bar chart.

A scatter plot can be used to get more insights from the same data. The following plot shows the total number of bikes heading eastbound and westbound at specific times of the day. Based on this plot, we can conclude that eastbound routes lead to business districts and westbound routes lead to residential areas. Furthermore, we can establish that rush hour traffic is from 8:00—10:00 a.m. on the eastbound route and 4:00—6:00 p.m. on the westbound route.

A scatter plot of Boston bike traffic. Time of day is on the x-axis and total number of bikes is on the y-axis. Blue dots indicate eastbound riders and blood orange dots indicate westbound riders.

Eastbound and westbound bike traffic by time of day. 

A swarm chart is a special kind of scatter plot that can show density patterns of bike traffic for different times of the day, day of the week, and direction.

A swarm chart of Boston bike traffic plotting weekday, time of day, and direction of travel to display density of the number of bike rentals.

Density of bike traffic by day and direction.

In the bike traffic example, visualizing data with different types of plots like bar, scatter, and swarm charts helps us extract useful information from the data set including peak traffic days, direction of commute, and busiest time of the day.

Data Visualization with MATLAB

MATLAB is a programming and numeric computing platform used to analyze data, develop algorithms, and create models. It supports the entire data analysis workflow including acquiring the data directly into MATLAB; analyzing and visualizing that data; and exporting results. You can use interactive apps to visualize your data without writing any code; the apps will automatically generate the appropriate MATLAB code for you, so you can automate and reuse your work.

Creating Data Visualizations

MATLAB offers a wide range of built-in chart types like line plots, scatter charts, distribution plots, and geographic plots to visualize datasets from a diverse set of applications. You can create visualizations either interactively or programmatically using the MATLAB language.

Exploring Data Visualizations

You can interactively explore your visualization including:

  • Zooming in and out on a specific section of the data set
  • Interactively panning and rotating visualizations
  • Displaying trend lines or data values directly on the visualization
  • Shading and highlighting data points
  • Switching between domains (e.g., time, frequency, S, Z domain)

Annotating and Customizing Data Visualizations

You can interactively annotate your visualizations by highlighting essential information that you wish to convey such as:

  • Annotating key data points
  • Adding data tips
  • Adding axis labels
  • Grouping by different colors and patterns
  • Adding data markers, line styles, and colors

MATLAB automatically generates code from your interactive chart modifications. You can reuse that code by adding it to your script.

A graph of a plot of I-Q signal. x is on the x-axis and normalized amplitude is on the y-axis. An in-phase signal and quadrature signal are shown.

Update Code option when you modify your visualization.

Complex data sets can be difficult to visualize using simple charts. MATLAB enables you to create custom charts to meet your visualization needs and add custom interactions to them. 

Examples include:

  • Sparklines Component—Create small line graphs that show the general trend of each vector in a multi-vector data set such as a table. Observe and compare data trends for each row/column.
  • Density Scatter Chart—Use color (or transparency) to identify the density of points.
A screenshot of a sparklines component and a density scatter plot, both plotting unlabelled data.

(Left) Sparklines component and (right) density scatter chart.

Explore more examples of custom chart containers on File Exchange on MATLAB Central.

Exporting Data Visualizations

You can directly export your customized and annotated visualizations for use on the web and in presentation and reports.

A screenshot showing a figure being saved to a location.

Exporting a figure.

Integrating Data Visualization with Data Analysis

Data visualization is often combined with data analysis and preprocessing. MATLAB apps, such as the Data Cleaner and the Signal Analyzer, combine these steps.

Interactive controls allow you to specify operations without needing to write any code, and the corresponding data visualizations are integrated directly in the app. This allows you to immediately see the results of a given task. Once your analysis and preprocessing are complete, the apps can automatically generate the corresponding MATLAB code to allow you to automate the steps, even on different data.

Application-Specific Visualizations

MATLAB toolboxes provide application-specific visualizations, along with interactive apps that combine visualization with data preprocessing and analysis.

Screenshot of the Econometric Modeler app.

Econometric Modeler app for visualizing and analyzing univariate or multivariate time-series data (in Econometrics Toolbox™).

Screenshot of a magnitude response chart with frequency in MHz on the x-axis and magnitude on the y-axis.

Frequency response of the individual stages of a multistage digital down converter (in DSP System Toolbox™).

A screenshot of a graph plotting a spectrum of wanted and interference signals with frequency in GHz on the x-axis and dBm on the y-axis.

Bluetooth LE blocking, intermodulation, and carrier-to-interference performance test (in Bluetooth® Toolbox).

A screenshot of a beamforming graphic of a phased array system measuring normalized power in dB for several dimensions.

Beamforming for a phased array system (in Phased Array System Toolbox™).

Connecting MATLAB with Other Data Visualization Tools

You can use the computational and data processing capabilities of MATLAB to create visualizations and dashboards with other business intelligence tools such as:

Case Study Section

Interesting Data Visualization Applications

Data visualization capabilities in MATLAB enabled organizations to effectively meet their research objectives.

Ford Develops Tool for Analyzing Drive-Cycle Test Results

Ford’s Vehicle Energy Management Engineering team used MATLAB to develop CycleTool to evaluate the emissions, fuel economy, and performance of their vehicles. The tool enables them to assess system performance by visualizing their hardware test results against their model predictions and simulations.

Read Story

A screenshot of MATLAB demonstrating the capability to visualize hardware test results against model predictions and simulations.

Brushing data to pick out trends in the summary application.

Decoding Butterfly Flight with High-Speed Cameras and a Wind Tunnel

Lund University researchers learned what gives butterflies their distinct, fluttery pattern and used MATLAB for image processing, data analysis, modeling, and visualizations. By studying the flight behavior of butterflies, engineers can build more efficient and dynamic flying—or even swimming—drones. Researchers used MATLAB data visualization features to analyze and compare the performance of their wing designs inspired from their analysis of the flight behavior of butterflies.

Read story

Four charts showing different wing types demonstrating impulse and energy in normalized time.

A flexible wing improves force and efficiency of wing clap.

State Street Global Advisors Develops Scoring Model to Bring Transparency to ESG Investing

The development team at State Street Global Advisors generated histograms, scatter plots, box plots, and other visualizations to refine their algorithms as part of the development of R-Factor™, a system that helps investors make informed decisions and enhance their environmental, social, and governance (ESG) scores.

Read story

Twelve charts form a histogram showing R-Factor ESG scores by industry from M S C I World.

Histogram showing R-Factor ESG scores by industry.

Bosch Develops a Single Platform for Automotive Test Data Analysis and Visualization

Bosch used MATLAB to develop ENValyzer (Engineering Test Data Visualizer and Analyzer), a tool to visualize, process, analyze and generate reports for their test data acquired from measurement devices, testbenches, and vehicles. Bosch engineers were able to render the data in single, secondary, matrix plot, and multiple axis views.

Read story

An ENValyzer plot showing prominence ratio (P R) versus R P M spectrum results.

ENValyzer plot showing prominence ratio (PR) vs. RPM spectrum results.