Gestalt principles can be ranked in order of strongest influence to weakest influence as follows i.e.

Enclosure > Connection > Proximity > Similarity

Gestalt Principles Order
The visual hierarchy of Gestalt principles, showing that Enclosure exerts the strongest perceptual grouping force, followed by Connection, Proximity, and Similarity.

Similarity


The similarity principle uses a common feature such as Shape or Color to group like objects together.

In the following generic example, take a moment to closely observe how "Shape" and "Color" are used to create two groups.

Gestalt Similarity
An abstract example of the Gestalt Similarity principle, where objects of the same shape (squares or circles) are naturally grouped together by the eye.

Gestalt Similarity Principle
Amplifying the Similarity principle by combining both shape and color changes to define two highly distinct visual groups.

As you can see from the last example, the use of shape and color together increases the emphasis on showing that there are two distinct groups here.

Proximity


The proximity principle uses distance between objects to group "like" objects together. In 2D space, this can be considered as the distance of separation on the X-Axis vs Y-Axis.

In the following example, observe how distance between objects is used to create two distinct groups.

Gestalt Proximity Principle
An abstract example of the Gestalt Proximity principle, where physical distance along the X-axis naturally separates the objects into two columns.

In the following example, notice how the use of the similarity principle (use of different shape and color) along with the proximity principle (distance between objects) further amplifies the distinction between the two groups.

Gestalt Proximity Principle
Combining both the Similarity and Proximity principles to achieve an even stronger, highly-contrasted visual separation.

Connection


The connection principle joins "like" objects together (most often with lines). In 2D space, a line chart is a common example of using this principle.

In the following example, observe how an arrow connecting objects is used to create four distinct groups.

Gestalt Connection Principle
An abstract example of the Gestalt Connection principle, where drawing explicit lines between shapes immediately overrides proximity cues to form four pairs.

Enclosure


The enclosure principle is the strongest of all the Gestalt principles i.e. our mind prioritizes this principle over all others. With this principle, you create a boundary that groups "like" objects together within a bounded region.

In the following example, all four Gestalt principles are used as follows:

  • Similarity - all objects are circles but one group of circles have a different color.
  • Proximity - one group of objects are physically separated from all other groups.
  • Connection - two objects in different groups are joined with a line.
  • Enclosure - two bounded boxes are used.

But as you can see, there are still only two groups that the mind distinctly identifies based on the two bounded boxes from the use of the enclosure principle.

Gestalt Enclosure Principle
The absolute dominance of the Gestalt Enclosure principle, where shading a boundary around objects instantly overrides proximity, shape, and line connections to form two primary groups.

Applied Gestalt Case Study: Analyzing Student Scores

For a more real-world example, let's look at how we can apply these Gestalt principles to a dataset consisting of Math, Writing, and Reading scores for 1,000 students. For the source code of the examples below, see our GitHub repository.

Similarity


Gestalt Similarity Color
Applying Gestalt Similarity via color coding to quickly distinguish student categories in a scatter plot of test scores.

Gestalt Similarity Color Shape
Applying both color and shape similarity (using markers) to allow readers to visually segment overlapping student data points.

Proximity


Gestalt Proximity
Applying Gestalt Proximity in a scatter plot, separating student groups by physical distance to make spatial clusters immediately readable.

Connection


Gestalt Connection
Applying Gestalt Connection in a line chart, linking individual student data points to establish a continuous visual trajectory.

Enclosure


With the plot below, notice how it is easier to visually analyze the data. For example:

  • There are 518 female students (indicated by the red color) while the rest are male students (indicated by the green color).
  • It is easier to notice categories like "189 female students with free lunch".
  • The proportion of students in each category relative to the total number of students is also easily identified (notice difference in size and color of each of the four categories).

Gestalt Enclosure
Applying Gestalt Enclosure, using distinct shaded bounding regions to group students by lunch plan and gender for instant comparative analysis.

So the next time you are working on a PowerPoint presentation or creating graphs for your Data Science project, consider how you can incorporate these Gestalt Principles to improve the visual design of your work.