Using MMA 12.0 on a Windows 10 machine.
I am trying to plot a list of points in a 3D plot. Each point has a different weight which I want to show using different point sizes. The points are also in different clusters and I want to show that using different colors. Let's say maybe three or four different colors. The total number of points in a plot would be between fifteen and twenty but I may end up producing more than a thousand of these plots.
The best that I have figured out is to use "ListPointPlot3D" with "Style". But it seems like that I can only specify one specification using Style. I can do either the color or the point size. I can't do both.
For example,
ListPointPlot3D[{Style[{0, 0, 1}, Green], Style[{1, 0, 0}, Red]}]
works perfectly fine, as expected, and I get one green point and one red point.
I can specify the point size on either one and it works.
ListPointPlot3D[{Style[{0, 0, 1}, PointSize[0.1]],
Style[{1, 0, 0}, Red]}]
ListPointPlot3D[{Style[{0, 0, 1}, Green],
Style[{1, 0, 0}, PointSize[0.1]]}]
But when I try to specify both the color and the point size for a point, both specifications are ignored.
ListPointPlot3D[{Style[{0, 0, 1}, Green, PointSize[0.5]],
Style[{1, 0, 0}, Red]}]
gives me neither a green point nor a large point.
The documentation for Style says that
Style[expr,spec1,spec2,...] allows the speci to be any list or sequence of the following:
But both, a sequence of specifications
Style[{0, 0, 1}, Green, PointSize[0.5]]
and a list of specifications
Style[{0, 0, 1}, {Green, PointSize[0.5]}]
fail.
How can I make this work? I hope this is not a bug or anything. Do I need to do something completely different?
One method that I can think of is
g1 = ListPointPlot3D[{Style[{0, 0, 1}, PointSize[0.05]],
Style[{1, 0, 0}, PointSize[0.03]]}, PlotStyle -> Green];
g2 = ListPointPlot3D[{Style[{0, 1, 1}, PointSize[0.02]],
Style[{0, 2, 0}, PointSize[0.04]]}, PlotStyle -> Red];
Show[g1, g2, PlotRange -> {{-1, 2}, {-1, 2}, {-1, 2}}]
This gives me what I want but feels inefficient and is probably slower. Is it? The code is longer, a bit uglier, and I have to manually figure out and specify the PlotRange because Show is not smart enough to figure out the optimal plot range. I would need to have 3-4 plots and then merge them into a single plot every time. Can this be done with a single ListPointPlot3D?
I have no great affinity for Style or even ListPointPlot3D. If there is a vastly superior (faster/more-efficient/easier-to-read/terse) method, then I wouldn't mind learning about it.