Here, is another simple but very cool grapch R can create quickly. I find it the easiest way to create scatter plots especailly when I have to present two dependent variables with only one x-variable. I think this is not easily obtained EXCEL which we mostly use to obtain quick plots. But grahics is R's another speciality.

Here is how we can make a scatter plot with two dependent variables in it.

#Lets create the variables first. I am adding some noise to both dependent variable to make the plot look pretier.

x

y

z

#plot x vs y

plot(x,y, col = 'blue',pch = 16,xlab = 'x', ylab = 'y,z')

#Now to add the plot of x vs z in the same graph,

points(x,z, col = 'red', pch = 16)

The output will look like this

But this picture doesn't tell us which is y and which is z. But we can easily add a legend to this with legend() command

legend(10,85,legend = c("y","z"), col = c("blue", "red"),pch = 16)

# here 10, and 85 are the xy-coordinates where the legend-box will be added on the graph.

For the last couple of weeks, I have been learning to write some R functions for simple biological systems simulations. Well, I haven't been that successful in that venture, but I surely learned some pretty useful things that we can do in R w/o spending much time and brain.

Generating the plot map in a completely randomized desine.

I think experimental designs are the inextricably related with most agricultural studies. So, at least for me, knowing this code will make my work a bit easier in future.

Here is a code that generates a randomized treatment map for a CRD experiment

> no.treat

> no.repln

> trt.samples

# This will generate random sampls for all the 6 treatments and repeat this for all the 6 replications.

> trt.map

# This will create a matrix of the random samples which is also the plot map of the experiment.