|
From: Allin C. <cot...@wf...> - 2009-11-01 16:42:48
|
I'd be much obliged if anyone has a clever suggestion for solving this problem: I'd like to plot two probability distribution curves together (in a 2D graph), one a continuous pdf (e.g. Gaussian) and the other discrete (e.g. Poisson or binomial). I can get a nice plot of each, separately, by setting a high "samples" value for the continuous distribution and an appropriate low value, corresponding to the number of integer values in the x- or t-range, for the discrete one. But in a 2D plot there's only one "samples" setting available. I realize that instead of using a formula (as in the continuous case), I could pre-compute a set of "data points" for the discrete distribution and treat it as one would empirical data, but that's not very convenient in context. (I'd like to be able to do this programmatically, for many sets of distributions with various parameters, so a formula-based solution is desirable.) It would be nice if one could attach a "samples" parameter to a line style specification, as in set style line 1 samples 200 ... set style line 2 samples 16 ... but maybe I'm missing something that makes that unnecessary? -- Allin Cottrell Department of Economics Wake Forest University |