Showing posts with label Strip plot. Show all posts
Showing posts with label Strip plot. Show all posts

Wednesday, April 3, 2013

Strip plot / Strip Chart in Excel using RExcel

See the related posts on RExcel (for basic, Excel 2003 and Excel 2007) for basic information.

We already discussed in previous posts that how to install RExcel to how to load a data.

Let's get a data, here I am loading barley data from R/lattice library. The data is in the long form (unlike many datasets in Excel), data with many treatments or replications or samples are arranged this way.

It is very easy to generate stripe plot using RExcel. From graphics menu select Strip Chart. Then select one or more Factors (or no factors !) and a response variable. If you think there are stacked points, you can keep them as such or jitter so that points in same point will be visible in the plot. Click OK.



Tuesday, April 2, 2013

Creating strip plot in excel

In strip plot we have vertical or horizontal lines spaced at particular values in X or Y. In case multiple strip plots the value in  X and Y axis just are meant to plot the strips.

Here is a trick to develop strip plot using XY scatter plot with error bars.

(1) First of all add simple scatter plot, SN is a dummy variable with serial number. We need to edit the data source.



(2)  Now we want to plot strips in X axis, while the series A, B, C, D in Y axis, So now I created a dummy variable for place where these A, B, C, D will be positioned - i.e. 1, 2, 3, 4 in Y axis.  X value will be columns labeled with A, B, C,D while Y value will dummy constant 1, 2,3,4 for each series respectively.

(3) Now we need to add error bars in Y axis, remove X axis bars. Use a fixed value depending upon how long bar you like to see (for example 0.2), plus and minus bars. Remove bar cap and change the color and size whatever you like to. Remove the points and keep just error bars. You can connect the bars with lines too.



The strip plots are ready. If you like to change the strip length by thrid variable, you can do so by simple trick.