I have been reproducing the following graph (from "Sample size of 12 per group rule of thumb for a pilot study" by Julious), which I suspect was created in Excel:
Array
I used the following code:
Code:
clear set obs 28 gen n=_n+2 gen precision=(invttail(2*n-2,0.025)*sqrt(2))/sqrt(n) gen gain_precision=precision[_n-1]-precision[_n] label variable n "Sample Size" label variable gain_precision "Gain in Precision" twoway connected gain_precision n, xlabel(4(1)30, labsize(vsmall)) ylabel(0(0.1)0.6)
Array
(The line at y=0.5 is an artefact of conversion.)
Is there any way that I can get the line to start at the y-axis like the original, rather than having the gap between the line and the y-axis?
Thanks,
Jane
0 Response to Graph to start at y-axis
Post a Comment