![]() |
VOOZH | about |
Strip Chart is defined as one dimensional scatter plots or dot plots which is used as an alternative to box plot when sample sizes are small. It is created using the stripchart() function in R Language.
Syntax: stripchart(x, data = NULL method, jitter )
Parameters:
- x : value of data from which the plots are to be produced.
- data : a data.frame from which the variables in x value should be taken.
- Method : the method is basically used to separate coincident points.
- jitter : when method = βjitterβ is used, jitter will produce the amount of jittering applied.
This example makes use of ToothGrowth database, stripchart() Function is implemented using ToothGrowth database.
Dataset:
Output:
len supp dose 1 4.2 VC 0.5 2 11.5 VC 0.5 3 7.3 VC 0.5 4 5.8 VC 0.5 5 6.4 VC 0.5 6 10.0 VC 0.5 7 11.2 VC 0.5
The above code will print data set
Output:
Output:
Output:
The above example will add the main title and axis labels and print colored stripcharts.
In this example, we will use an iris dataset and list that contains the variables and plot stripchart plot.
Output:
Example : the stripchart() function can be used to create a one-dimensional scatterplot.
output :