gnuplotdata-visualizationlarge-data4d

4D plot with gnuplot


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


Solution

  • 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