Skip to content
SciTools Blog
Menu
  • Home
  • Blog
  • Support
  • Contact
  • Login
  • Pricing
  • Free Trial
Menu

Interesting Graphs about Your Code

Posted on September 20, 2021

Graphs represent the ultimate abstraction of code – being able to visualize your entire project or zoom in on a specific piece of it in just a glance. You might also find them a useful tool for making your case to management. Understand has many different graphs, and each of these graphs has several different variants. This is not an exhaustive list but demonstrates the most popular graphs in Understand.

Control Flow Graphs


The logic inside this function

Call Trees

What does this function/method call?

Call-By Trees

Showing what calls this function/method

Include Tree

Quickly see what headers this file includes

Butterfly Graph
The butterfly graph shows the most important relationship for the kind of entity you select. For functions and methods, it shows both the call and call by trees. However, for a class, it will show the inheritance tree, and for files, it will show the include tree

Function Butterfly Graph – Both Call and Call-bys
Class Butterfly Graph showing inheritance
File Butterfly Graph showing the inheritance tree for this file

Declaration Graphs

Provide a quick overview of everything defined in that entity

Depends On and Depended on By

Everything this file depends on
And everything that depends on it

Data Members

See the members that belong to this struct

Object References

See everywhere that this object is set and used

UML Class Diagram

A quick overview of a class, those classes it inherits from, or all the classes in your project

UML Sequence Diagrams

Track the data flow and timing for a member object

Overrides

These are all the classes that ClonePage overrides

Dependency Graphs
These project-level interactive graphs let you explore how the different parts of the code rely on each other. This example from git has more details here.

All of the dependencies on list_mergesort

Base and Derived Graphs

Class inheritance

Architecture Graphs
These graphs let you explore how the code files are currently arranged or create new architectures that help better understand how the code is logically put together.

Compare – Butterfly Graph
Compare graphs let you identify how code has changed between two versions of the same project

Blue functions were modified, green added and red removed

Compare – Control Flow

The logical constructs changed between versions are highlighted for easy identification

Project Overview Graphs
These graphs show high-level information to help you get a sense of what’s going on in the project.

  • Line Breakdown shows how many lines of code, comments, inactive, preprocessor, and blank lines your project has
  • Directory Structure sunburst graph shows how much code is in each directory
  • The Most Complex Functions, Most Complex Classes, and Most Complex Files are all based on McCabe Cyclomatic Complexity and let you quickly see the hot spots in your code
  • The Largest Functions, Largest Classes, and Largest Files are based on the line count and also help you focus on important regions

Custom Graphs
If you need something different that we already offer, Understand also allows you to create your own graphs using our APIs.

If you’re interested, you can also read about how we’ve tried to make graphs more interesting.

  • Instagram
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Learn more about Understand's Features

  • Dependency Graph
    View Dependency Graphs
  • Comply with Standards
  • View Useful Metrics
  • Team Annotations
  • Browse Depenedencies
  • Edit and Refactor

Related

2 thoughts on “Interesting Graphs about Your Code”

  1. William Widener says:
    November 17, 2022 at 3:18 pm

    Do you have solutions for Ruby? If not, any recommendations?

    Log in to Reply
    1. [email protected] says:
      November 21, 2022 at 10:39 am

      Unfortunately we don’t have any experience with Ruby currently. We’ll add a vote for Ruby as the next language that we include and send out an update when that happens!

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

  • API
  • Architectures
  • Business
  • Code Comparison
  • Code Comprehension
  • Code Navigation
  • Code Visualization
  • Coding Standards
  • Dependencies
  • Developer Notes
  • DevOps
  • Getting Started
  • Legacy Code
  • Licensing
  • Metrics
  • Platform
  • Plugins
  • Power User Tips
  • Programming Practices
  • Uncategorized
  • Useful Scripts
  • User Stories
  • May 2025
  • January 2025
  • December 2024
  • November 2024
  • August 2024
  • June 2024
  • May 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • June 2023
  • April 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

©2025 SciTools Blog | Design: Newspaperly WordPress Theme