Monatsarchiv: März 2016

Data visualization in R: Point symbols

For points the symbols can be changed using the pch argument. The following example shows a simple plot with a colored square symbol for the points. x <- c(1,2,3,4,5,6) y <- c(3,6,9,4,3,4) plot(x, y, pch=22, type=’b‘, ylim=c(1,10), col=’blue‘, bg=’red‘) In … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Colors of titles, axes, points and lines

The colors of the plot elements can be changed by using the col argument. You may use this argument in the according commands, e.g. in the axis command, or you may use it in the plot command and specify the … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Margins

You may set margins of a plot to adapt its visualization. This could be necessary if you want to change the labeling of a plot, e.g. by adding a legend, additional labels or change the style of axes. Or you … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Show legend outside of the plotting area

If you add a legend to a plot, it will be placed inside the plotting area by default. The following example creates a stacked bar plot with the sales data of books, magazines and newspapers. In such type of plots … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen