0
votes

I have large data set arranged in four column in a file like this

# X Y Z f
0 0 0 0
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
7 0 0 0
...

where (x,y,z) is coordinate of each point in 3D mesh (between [0,1] in each direction and each direction divided into 256 interval) and f is the value of field at each point. I want to plot the data in a way that at each point, a colored circle, its color specified according to the value of f plotted. Since it is very large data set, the solution provided in link does not work properly, and I have incorrect plot like thisp

2
It looks like there is something special at the beginning of your data which confuses gnuplot. Maybe some header? How do the first few lines of your data look like?theozh
I added first few lines of the data file. # X Y Z f is not exist in the file.I only added to make it clear which column correspond to which variable.Pejvak
if your data starts like shown above then the data point at (0,0,0) looks ok. But if I don't have the data I cannot tell whether it is correct or not. So, you want to say that z should also be within [0,1]? Could you please describe exactly what you think is incorrect?theozh
As I mentioned in the question the method suggested in link does not work for my case. What I want to plot is at each (x,y,z) I want to plot small circle colored by f value. I do not know if it is possible in gnuplot.Pejvak

2 Answers

0
votes

It's still not clear to me what you exactly want to achieve and how your data really looks like. Maybe it will get clearer with some minimal examples including "full" data. Maybe something like this?

Code:

### splot with points and palette
reset session

$Data <<EOD
0 0 0 0.0
0 1 0 0.1
0 2 0 0.2
1 0 0 0.3
1 1 0 0.4
1 2 0 0.5
2 0 0 0.6
2 1 0 0.7
2 2 0 0.8
EOD

set palette rgb 33,13,10

splot $Data u 1:2:3:4 w p pt 7 ps 2 palette notitle
### end of code

Result:

enter image description here

0
votes

To make a suggestion about 4D plot in gnuplot, if you have very large dataset, gnuplot might not be a very appropriate option. Using paraview is much better and give you more filters and tools to visualize your data. And it is also license-free software.