How to Line Type Aesthetic


Another aesthetic property is linetype. Linetype is used for definition of line visual character. This parameter is not used only for line geometry, but also for geometries that have border lines, for example geom_boxplot or geom_polygon. As in the previous examples, linetype aesthetic can be set or mapped to variable from the dataset. If you set it, you can use help features that are hidden in context-menu. In the context-menu you can choose from several types of lines.

Linetype you can set using its name (string enclosed in quotes) or as an integer value ranging from 0 (blank) to 6 (twodash). In addition, you can also create your own line through a special notation. Examles are listed in the context-menu, at the bottom. This record is based on the length of the on / off stretches of line. If you type "33" this value specifies three units on followed by three off. Examples of the various settings are in the following figure.

As with other properties, linetype can be mapped to selected variable from the dataset. This variable must have a categorical character.