- #1
stripes
- 266
- 0
Homework Statement
I have a list of data in .csv format that looks like the following:
10 5 TRUE
10.1 5.1 TRUE
10.2 5.2 FALSE
10.3 5.3 FALSE
10.4 5.4 FALSE
10.5 5.5 TRUE
10.6 5.6 TRUE
...
There are thousands of entries.
I want to make a scatter plot in Mathematica where it plots the points {10, 5}, {10.1, 5.1}, etc., but I want the ones with TRUE to be blue, and FALSE to be red.
Homework Equations
--
The Attempt at a Solution
I've tried using a while loop then an if statement to do this, but it seems to be an infinite loop. What I did was:
homeruns = column3 (so this is now a list with TRUE FALSE TRUE FALSE etc.)
angles = column2
initialV = column1
Code:
ListPlot[Transpose[{angles, initialV}], i=0; while [i<length[homeruns], If [ truefalse[[i]], PlotStyle -> {Blue}, PlotStyle -> {Red} ] i++; ]]
But this is just stupid. How could I go about making a plot where certain sections of the plot will be one colorr vs another colour, depending on that point's truth value?