I have some data files with the following structure. The first three columns are 3D coordinates (x, y, z) of points and the fourth column is an intensity value. The rows of values per group (i.e. points per group) can vary. So I need a function that automatically counts the number of points when plotting so that I can get a legend title like “group_0001: 10 pts.”. I also want the intensity of the points to be plotted with transparency instead of size.
reset session
$Data <<EOD
# group_0001
125.714 109.647 38.0402 0.79257
128.834 111.153 40.7486 0.753538
132.036 112.698 43.4124 0.793434
135.52 114.449 46.0812 0.776121
138.786 116.233 48.1499 0.793355
142.357 117.967 50.2387 0.731456
145.967 119.98 52.2324 0.787673
148.363 121.234 53.44 0.749578
149.448 121.81 54.0276 0.80474
153.108 123.831 55.9821 0.786737
# group_0002
111.44 146.587 81.1063 0.755904
112.27 151.103 82.1631 0.649881
112.995 155.321 83.3001 0.791218
113.763 159.66 84.2395 0.746114
114.551 163.53 85.1278 0.744113
115.437 168.114 86.1995 0.767338
116.344 172.465 87.481 0.742969
EOD
splot for [i=0:*] $Data index i pt 7 ps var