Question: How to put side by side different plots within a single figure ?

Hi all, 

Still a new visualisation problem ...
I have two random variables X and Y linked together with a dependency structure named "Gumbel copula" (just a technical stuff, if you prefer replace the bold text by "two correlated gaussian RVs X and Y").

I would like to represent on a same figure:

  • the set {(x[n], y[n]), n=1..N} of a sample of size N drawn from the joint distribution of X and Y
    (a ScatterPlot does this very well, even if I use a plot(..., style =point) in the attached file
  • the empirical marginal distribution of X (Histogram), put below the line "y = min({y[n], n=1..N} )" and rotated by 180 degrees
  • the empirical marginal distribution of Y (Histogram), put left the line "x = min({x[n], n=1..N} )" and rotated counterclockwise by 90 degrees

The attached file gives you two examples.

Ideally, if it's not too much to ask, I would like to have the main axes placed in more adequate locations.
For instance, the option "axes=boxed" reject the axes on the left and bottom boundary of the box which contains the 3 plots (not very astute) ; on the other side the default locations of the axes seem better but one of them "cuts" a histogram ... not very smart.
In fact the position of the axes in the "scatter plot" part is good enough for me and I would like to "add" the two histograms without changing these axes.

Is there a solution to do that (I think I read here a rather close problem where a "zom" of a plot was put within this same plot?) ?

Please Wait...