Processing math: 100%
Ask Your Question
0

How to plot points of size less than 1?

asked 5 years ago

I have a huge sequence L (say of length n=106) and I would like to plot all the points (i,L[i]) for i in range(n).
To do so, the following works.

points([(i,L[i]) for i in range(n)],size=1)

The problem is that size=1 (for the points) is too large for a satisfactory plotting.

But if r is a fixed float with 0<r<1, then

points([(i,L[i]) for i in range(n)],size=r)

is interpreted as

points([(i,L[i]) for i in range(n)],size=0)

which is an empty plotting (so not working).

Question: How to rewrite the second command line above to really plot points of size=r?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 5 years ago

Emmanuel Charpentier gravatar image

updated 5 years ago

The size of a point is in physical units (no relation to the numbers you're trying to represent). From point2d?:

* "size" -- How big the point is (i.e., area in points^2=(1/72
     inch)^2).

A 1pt point is already really small (practically invisible), even in a not-so-large figure (4in x 4in). I don't know it smaller points can physically be rendered, at least on screens (maybe on high-resolution printers.

If necessary, use a large image size and scale the resulting figure via, say, Imagemagick.

But I probably wouldn't be able to see your points (literally...).

Preview: (hide)
link

Comments

To better understand my problem, see the plottings I made and put in the following link: https://mathoverflow.net/q/338415/34538
The first one is a zoom of the second, but see how the shape of the first is lost in the second because the point size is too large...

Sébastien Palcoux gravatar imageSébastien Palcoux ( 5 years ago )

The "shape" ou perceive on the first plot may be artefactual, due to points not being visible (i. e. too small/infrequent to be plotted).

Try to plot your "large" region on a large (bedsheet- or even wheat-field-sized) surface and scan-pan-zoom on it. This may reveal points not plotted or perceived when zoomed back to a 4"x4" screen (resolution about 96 DPI, IIRC).

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

My word "zoom" was not correct. These two plottings were done independently, what I mean is that the first graph is a subset of the second.

Sébastien Palcoux gravatar imageSébastien Palcoux ( 5 years ago )

Better idea: try to estimate the density of your points, and plot that (either as a 3D plot or via α. This should (partially) avoid the difficulties created by the rendering software...

R has some nice packages for multidimensional kernel estimation.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

My word "zoom" was not correct. This two plottings were done independently, what I mean is that the first graph is a subset of the second.

That's not the problem. The problem is that the rendering software may suppress representation of elements too small to be perceptible, and that your eyes will omit them. You're fighting both physics and physiology...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 516 times

Last updated: Aug 23 '19