Monatsarchiv: Juni 2016

Data visualization in R: Add smooth curve and shaded area to a plot

Within this article I want to show you an easy way to add a smooth curve to your plot, create an area around this curve and fill the area with a transparent color. Let’s start with a standard plot. x … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Change the aspect ratio for a plot

To create a meaningful plot or if you want to save your plot as image you may want to define a fix aspect ratio. The plot function itself offers the possibility to define an own aspect ratio by setting the … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Plotting a function

With the function curve you may plot a function. The following example shows how to use this function.   curve(x^3, from = -10 , to = 10, main = ‚f(x)=x^3‘, lwd = 2) The curve function offers the option add … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen