A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

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!!


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.

  • Chandan Mukherjee

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