I have a file with four columns of data. I use only the first three to build a 3D graph and now I donβt need a fourth.
I want to know how to change the color of a point if it meets certain conditions. For example, if the point value (x, y, z) is greater than (16,400,65) , I want to build it in gray. If they are smaller than this, I want to use red.
I am trying to use awk for the same, and it only displays two dots of a different color. Here is my code.
gnuplot>splot "< awk '{if( ($2 > \"16\") || ($1 > \"400\") || ($3 > \"65\")) print}' ./8_77_non_pareto_data.dat " u 2:1:3 wp pt 8 lc rgb "grey", \ "< awk '{if( ($2 < \"16\") || ($1 < \"400\") || ($3 < \"65\")) print}' ./8_77_non_pareto_data.dat " u 2:1:3 wp pt 8 lc rgb "red", \ "./8_77_pareto_data.dat" u 2:1:3 wi lt 1 lc rgb "blue" t "Pareto points"
My data file is as follows:
48 15.057599573464184 68 361 93 14.950459657063462 73 361 48 14.065204842090914 69 361 280 13.16320458043516 69 361 120 15.05281009307949 66 361 48 15.133322961840786 59 361 48 16.161631503473544 73 361 470 17.763180586730847 77 361
The X axis ranges from 6 to 22.
The Y axis ranges from 0 to 500.
The Z axis ranges from 35 to 85.
I would like to present this as having a bounding box around (16,400.65) in a three-dimensional way. Everything inside the box is red, something outside it is gray.
Hope someone can help me here.
PS: Blue dots print very well, and although the data in the example here does not show any conditions, there are dots that match this condition. I did not publish the whole file here.