Ask Your Question
0

How to plot points of size less than 1?

asked 2019-08-23 08:09:04 +0100

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 flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2019-08-23 10:13:26 +0100

Emmanuel Charpentier gravatar image

updated 2019-08-23 13:19:08 +0100

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

edit flag offensive delete link more

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 ( 2019-08-23 10:52:55 +0100 )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).

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-08-23 12:32:44 +0100 )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.

Sébastien Palcoux gravatar imageSébastien Palcoux ( 2019-08-23 12:52:18 +0100 )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.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-08-23 12:54:57 +0100 )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...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-08-23 12:57:43 +0100 )edit

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: 2019-08-23 08:09:04 +0100

Seen: 491 times

Last updated: Aug 23 '19