I have a data file containing several columns and thousands lines of data. Below I present a small portion of it, in order to express my issue:
-0.54 0.09 -.3983969954588588E-02 0.2776322403476376E+00 0.5000000000000000E+05 0.1217096235496098E-13 0
-0.53 -0.03 -.3220837268589903E+00 0.7636149973371797E-02 0.1000000000000000E+04 0.7161538340416553E+00 0
-0.52 0.12 0.4319398001406393E+00 0.3046084462020560E-01 0.5000000000000000E+05 0.2227502533766236E-13 0
-0.51 -0.17 0.4596503785112276E+00 0.1788976667427210E+00 0.1000000000000000E+04 0.4171435790075386E+00 0
-0.12 -0.34 0.5787213420082925E+00 -.9322804977650871E+00 0.5910000000000000E+01 0.5147520415218694E+00 2
-0.12 0.13 0.5730427588243323E+00 0.9338351799657055E+00 0.1128500000000000E+03 0.7609604604284203E-06 1
-0.12 0.50 0.7396872499032718E+00 -.8091545263006905E+00 0.2137430000000000E+04 0.2962964572602038E-14 2
-0.09 0.05 0.6996863847044283E+00 0.8430535062986785E+00 0.2116400000000000E+03 0.3193612197737323E-08 1
The first two columns correspond to the coordinates $x$ and $y$, the next three columns are completely unrelated to this question, sixth column gives the value of a quantity $f$, while the last column shows a signal $s$, which can take only three integer values (0,1,2). What I want, is to plot the first two columns at the $(x,y)$ plane, using ListPlot
but assign a specific color to each point (dot) according to the values of the last two columns. In particular, using FORTRAN notation, the conditions are:
IF(f.GT.1d-4.AND.s.EQ.0) ---> orange color
IF(f.LE.1d-4.AND.s.EQ.0) ---> red color
IF(f.GT.1d-4.AND.(s.EQ.1.OR.s.EQ.2) ---> green color
IF(f.LE.1d-4.AND.(s.EQ.1.OR.s.EQ.2) ---> blue color
I know, that I could write a simple FORTRAN code reading my data file and use the conditions to spit it into four different files. However, since this is only needed for plotting the data, I suppose that Mathematica can perform ListPlot
under conditions, thus saving me disk space occupied by unnecessary extra files.
Many thanks in advance.
EDIT
Following @Nasser's approach and rearranging a little bit the colors, this is the final product
The complete data file can be downloaded here data.