Ask Your Question
0

How to plot points of size less than 1?

asked 2019-08-23 01:09:04 -0600

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 03:13:26 -0600

Emmanuel Charpentier gravatar image

updated 2019-08-23 06:19:08 -0600

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 03:52:55 -0600 )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 05:32:44 -0600 )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 05:52:18 -0600 )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 05:54:57 -0600 )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 05:57:43 -0600 )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 01:09:04 -0600

Seen: 74 times

Last updated: Aug 23