April 2014
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
282930  

simple.scatterplot: Two way distributions

John Verzani’s book has a title page that shows a scatterplot with histograms of x and y variables along the two axes. It is a very powerful way of looking at two distributions. The plot was generated through a function simple.scatterplot. The function is made available as part of the UsingR package, which can be installed from CRAN. The syntax of simple.scatterplot is indeed quite simple and can be modified to, for example, show boxplots instead of histograms on the side. That would be really interesting!!

V.

3 comments to simple.scatterplot: Two way distributions

  • Chandan Mukherjee

    How will you get boxplots instead of histograms, by simple.scatterplot?

  • If you just write simple.scatterplot and press return, you will see the syntax of simple.scatterplot function. You will notice that the trick is in defining a layout containing three boxes, one for the main plot and one each for the histograms/boxplots. Then the function just makes the three plots. We can easily replace the command for histogram with a command for boxplot.
    We can modify the syntax and create another function that will give us stata type two way boxplots.
    Will do that and post it here in a couple of days.
    V.

  • Chandan Mukherjee

    Wow! I could do it.
    I am learning.
    Thanks so much my R-teacher
    C