We now introduce a new, very important concept, the concept of grouping and pattern formation through the Gestalt laws of grouping. What are the Gestalt laws of grouping? So this is a very, very important concept. So you may have noticed that when you are looking at a visualization, there are patterns that emerge. This is basically the core feature of visualization. When you look at data represented through a visual representation, there are things that emerge that you just can't avoid not seeing. Now the question is how do these patterns emerge, and why do they emerge? This is the main question behind the Gestalt laws of grouping. It's a number of laws that basically try to explain or describe under what conditions, Individual visual objects are perceived as a group? And as you can imagine, this is very, very important for visualization. It's very important for you as a visualization designer to be aware of what methods you have in your toolbox to give a sense that a group of objects are related one to another. So you have lots of individual objects, but if they're arranged in a certain way, they're perceived as a single group. That's a very, very important feature. Okay, so let me first introduce the list of the main Gestalt laws, and then we will go individually through each of them. So the first one is proximity, then we have similarity, connection, enclosure, closure, and continuity. Let's start from proximity and similarity. The law of proximity says that if some visual objects are close, positioned close, one close to another, they are perceived as a group. This is pretty straightforward, let's take a look at this example. Here we have a number of individual objects organized in a square. But some in this square, there are cases where the objects are slightly closer in the direction, in the horizontal direction, and some are slightly closer in the vertical direction. And because of that, I perceive in one rows, so the objects that are closer in this direction tend to be grouped together. And because of that, we see a row for each line of elements. And the same is happening in the other direction. Let me give you a practical example, once again, I'm using the same scatter plot that you've seen before. In a scatter plot, this is a perfect example of the law of proximity. When there is a group of dots that are closer together than the rest, you readily perceive these dots as a group. Some time people call these clusters, so there are clusters of group, clusters of data points, so the data points are clustered together. It's a very, very common situation with visualizations like scatter plots, or any other visualization where there are dots that are positioned on the screen. And proximity may give the sense that there is a group of objects that are related one to another, this is very common. The second one is similarity. So the law of similarity says that if a group of object shares a visual property, then these objects are perceived as being part of a group. Let me give you another example similar to the one that we used for proximity. Once again, we have a group of objects placed in a grid. So in the first example we have that some objects have the same color. And because of that, they are perceived as part of a group. That's why we see different rows in the graphic that you see on the left. Why do you see different rows? Because the objects that have the same color are perceived as a unit, that's the reason why you see it that way. It's exactly the same thing on the graphics on the right. Objects that have the same shape are perceived as belonging to the same group. And because of that, you see rows, okay? Even though, I forgot to say that, sorry, these objects are all equally spaced, so there's no interference of space here. The only reason why you see rows is because the objects that are in the same row are either the same color or the same shape. So this is an explanation of the law of similarity. Let's go back to our practical example, once again with our scatter plot. Now in this scatter plot I have colored dots, where color represents dots, foods of the same category. Once again, objects that have the same color are perceived as belonging to the same group. Notice the group of dots that I circled in this visualization. Despite the fact that some of them are somewhat far apart, they are perceived as one group because they have exactly the same color. And color is just one of the possible features, visual features that you can use to convey the idea of similarity. Let me give you one last example without practical, with a real graph. Here is a bar chart, it's representing some relationship between categories and values, but the bars are also colored. Now since some bars have the same color, in this example they have two bars are colored as orange, you perceived them, you very readily perceived them as belonging to the same group. So this is the general principle of grouping by similarity.