# How to plot points of size less than 1?

I have a huge sequence L (say of length $n=10^6$) 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?

edit retag close merge delete

Sort by » oldest newest most voted

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...).

more

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...

( 2019-08-23 10:52:55 +0200 )edit

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).

( 2019-08-23 12:32:44 +0200 )edit

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.

( 2019-08-23 12:52:18 +0200 )edit

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

R has some nice packages for multidimensional kernel estimation.

( 2019-08-23 12:54:57 +0200 )edit

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...

( 2019-08-23 12:57:43 +0200 )edit