[RkWard-devel] Distribution plots: not quite right!
Prasenjit Kapat
kapatp at gmail.com
Wed Jan 24 08:40:33 UTC 2007
Hi,
This is sort of nitpicking. When I do a plot from Distribution + Continuous
dist. + Plot Normal distribution, the x-axis of the plot shows the indices of
the points. Which I feel is not right. For any such plot the x-axis should
display the values from the domain of the distribution and the y-axis the
density (or cumulative distribution function) value. I suggest the following
change:
In the file rkward/plugins/distribution/plot_normal_distribution.php, instead
of the following line (its a single line)
rk.graph.on ()
try (plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK
("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd =
<? getRK ("sd"); ?>)))
use the following line:
rk.graph.on ()
try (plot (x=seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK
("n"); ?>), y=<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK
("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd =
<? getRK ("sd"); ?>),xlab="x",ylab="density at x"))
The xlabel and ylabel may be avoided. The "normal" distribution was just an
example, this needs to be done for all the distributions.
1. If this is too boring a task for many of you then I can sit over a weekend
and change the files and send the patches.
2. Moreover, similar things need to be done for other distribution.
3. A better way would be to do a graphics display rather than a R Output,
whereby by changing the parameters of the distribution and "re-submitting"
the plots can be "dynamically" visialized.
4. In the long run, two-dimensional distributions could be similarly
visialized using the "rgl" package. It is a very priliminary interface of
OpenGL using R.
I can try 2 and 3. We can defer 4 for the time being. What do you folks
suggest?
Thanks
PK
More information about the Rkward-devel
mailing list