I have been using gnuplot for more than 8 years, it's simple yet powerful. Many thanks!
Recently, I tried to plot 3D configuration of a packing of spheres, but found it impossible in gnuplot. This is highly desirable function for physicists in soft condensed matter field, where simplied model systems consists of disks or spheres are most popular. This function would be applicable for many other purposes of data visualization. Complex tools like VMD, ParaView, ect, are really not necessary, which are more oriented to complex moleculars. I engoyed the new function of plotting with circles in gnuplot, which was not available some years ago.
Here, I would say, plot with spheres with controllable radius and color (as in the case of circles in 2D plot) would be a very valuable enhancement to gnuplot's general plotting capabilities. To begin with, spheres with fixed “sense of volume” are appreciated.
Gnuplot can plot circular points (not true spheres) with variable radius and color.
See for example the 6th plot in rgb_variable.dem
The appearance can be improved further by drawing each point twice, once as a filled circle (point type 7) and once as the outline only (point type 6)
The principle limitations are
1) the unit size of the points is difficult to match with the axis scales
2) hidden3d processing in general fails to let points occlude vectors
3) these are not true spheres, so shading and specular highlighting will not work
It would be possible to add a 3D plot style "splot with circles". That would take care of limitation (1) but the other limitations would remain.
Thanks for your quick reply.
Yes, although I fully understand that gnuplot is not designed to do complex plotting, I, and many of my colleagues, would be very happy if it can plot data points as true spheres. I know that this simple enhancement might be quite complicate and may take a lot of work for software engineers, but it's really highly desirable.
By the way, if possible, could you check this" https://sourceforge.net/p/gnuplot/discussion/5925/thread/62b1daa1/?limit=25#e095
Many thanks!
I am sure that if gnuplot were being created now it would work with 3D coordinates intrinsically. But gnuplot's origin goes back 40 years to the era 2D pen plotters and its design shows this. The output layer of the code is 2D only. Extending it to render 3D objects is basically impossible, we would have to redesign and re-implement the entire output layer.
As to molecular packing diagrams, you might take a look at another plotting tool that dates back to the middle of last century
http://skuld.bmsc.washington.edu/raster3d/
Thank you very much for your information about gnuplot and raster3D. It's very helpful.
By the way, below I attach the question about how to make Variable fill color for polygons when using "filledcurves closed". A similar question was answered by you, which however could not solve my ploblem. I may have missed some point ... I would be very grateful if you can give me some instruction. Thank you very much!
I want to plot polygons with filled color according to some variable defined, e.g., in third column.
In short, the data format is as below:
0.16658205E+02 0.29610505E+02 0.13685260E+01 1
0.15732364E+02 0.29916967E+02 0.13685260E+01 1
0.15111388E+02 0.28956940E+02 0.13685260E+01 1
0.16658205E+02 0.29610505E+02 0.13685260E+01 1
0.12330652E+02 0.32410390E+02 0.13104752E+01 2
0.11806368E+02 0.31577728E+02 0.13104752E+01 2
0.12629825E+02 0.30750973E+02 0.13104752E+01 2
0.12330652E+02 0.32410390E+02 0.13104752E+01 2
......
The command that I use is as below:
p "data" u 1:2:3 w filledcurves closed fillcolor palette
What I get is that the edge of each polygon is colored according to the third column, but not the filled color.
I searched and found this https://sourceforge.net/p/gnuplot/feature-requests/411/, where someone seemed to have the same problem but solution is not clear.
Since this function seems to be "Status: closed-fixed", I think solution is somewhere.
Thanks in advance!
I posted one possible solution to the newsgroup.
See sample code there, but in essence see the documentation and help for the "index" keyword.