>
> I'm experimenting with the statistic package 'distrib' of folder 'contrib' and I'm
> impressed by its functionality, thank you Mario.
>
> Currently I use plot2d with option 'style impulses' to plot a distribution B, e.g.
>
> xy: makelist([x,B(10,0.75,x)], x,1,10);
> plot2d([discrete, xy], [style, [impulses,3]])$
>
> It works, but I'm not quite satisfied with it.
> What is your prefered method making such distrib plots?
> If you have experimented too, please, can you show me an example.
I have not implemented impulses in the draw package (I add it to my
to-do list ;)
In the meantime, here is a work-around:
(%i10) load(draw)$
(%i11)
impulses(sample):=
block([bars,options],
bars: makelist(points([[k[1],0],[k[1],k[2]]]), k, sample),
/* rewrite your prefered options here: */
options:[points_joined=true,
line_width = 3,
color = "dark-goldenrod",
title = "Blah, blah, ...",
point_size = 0],
apply(draw2d, append(options, bars)) )$
(%i12) xy: makelist([x,x^2], x,1,10)$
(%i13) impulses(xy)$
--
Mario Rodriguez Riotorto
www.biomates.net