How to Size Aesthetic


The size is often used aesthetic parameter in statistical graphics. As with other parameters, the size property can be set or mapped. If you want to set this property, use numerical value. If you use point geometry, the size values ranging mostly from 1 to 10. For text geometries (geom_text), you can use larger values. Quickly you can set this property using features hidden in the context-menu.

Examples of different point sizes are shown in the following figure. As you can see, if you change the size property, this property is also reflected in legend. The size of points in legend you can change using the function guide.

If you map the size to variable from the dataset, you can use continual or categorical values. The following figure, in addition to size mapping, displays one more important feature. If you define the same mapping for several aesthetic properties (e.g. point color and shape), individual legends for aesthetics will be merged.

Size parameter can be defined for several types of geometry layers. Multiple geometries support the size aesthetic, such as geom_line or geom_path. Example of its use in geom_path layer is shown in the following figure.