|
From: Daniel J S. <dan...@ie...> - 2006-05-11 15:45:47
|
Hans-Bernhard Br=F6ker wrote:
> Daniel J Sebald wrote:
>=20
>> Ethan A Merritt wrote:
>=20
>=20
>>> Also I think it would neat if you can manage to jam the generation
>>> of the samples into the actual plot command so that "replot" will
>>> resample rather than simply redrawing the previous sampling.
>=20
>=20
> This would of course collide rather badly with the fact that 'contour'=20
> is a modal setting, rather than a per-plot data filter. So it's hard t=
o=20
> keep 'set contour' from trying to contour the random scatter without an=
=20
> external data file. One could of course just abuse an existing,=20
> non-gridded data file instead of creating one on-the-fly --- the bigges=
t=20
> eligible one would be world.dat, which contains ~1000 data points.
Eh, part of the purpose of the dem files is to give the user an idea of t=
he proper way to use gnuplot. Both methods are an abuse; I'd estimate on=
-the-fly to be slightly less abusive.
Perhaps we could dream up a syntax for controlling the number of points w=
ithout an obvious kluge or limitation to the number of grid points. How =
about a "phantom" points idea as follows:
plot '-#' ...
where # is replaced by an integer? And if ever there is a problem where =
the using string requires an actual file or manual entry, gnuplot complai=
ns. For an example,
plot '-5000' using (rand(0)):(rand(0)) ...
would work, but not
plot '-5000' using 1:(rand(0)) ...
at which point gnuplot says "Must have actual data for non-phantom using =
elements" (or something).
One of the examples in random.dem might be:
plot sprintf("-%d",nsamp) using (bin(invnorm(rand(0)))):(1.0*scale/nsamp)=
smooth frequency with steps title "scaled bin frequency", normal(x) with=
lines title "Gaussian p.d.f."
(I just verified that sprintf works for the file name part of the command=
.)
Dan
|