I have a text file in the format:

```
>species1
0.432
0.323
0.987
(possibly continued...)
>species2
-0.332

```

and so on...

I have 4 variables, `totalcomsize, totalp, pol_pla, nvp_vp` lets say they are constant so easy to hardcode in. How could I take all the values under `>species1` and plot them vs each of the 4 above-mentioned variables, and then save a plot with the name `species1_vs_variable` where variable is one of the ones above. I want to do this using R, and bash code, can anyone help?

---

**EDITED**

Okay so as a short example, the 4 variables mentioned above correspond to a FIXED set of points, so each one could be `[1, 2, 3, 4, 5]` for example. Each line beginning with a `>` indicates that there is a new set of data to be compared to each of the 4 aforementioned variables. So `>Species1` could be `>Drosophila Melanogaster`, and EVERY number underneath it separated by a new line is a value included in that set corresponding to D.Melanogaster. But you basically want all the values up until the next line that begins with a `>`. So you may end up with a set `[0.2, 0.4, 0.6]` for the species drosophila melanogaster. Then you want to make a line plot of that dataset for each 4 fixed variables (`totalcomsize, totalp, pol_pla, nvp_vp`) and save the plot, giving it a filename corresponding to the species. I want to automate this because there are MANY MANY species. Which mean #species\*4 graphs to manually plot. So you can see why I want to do this. I did manage to put it in a better format where species are tab separated on one line, e.g.

```
anthomyiidae_sp_2_NVP   anthomyiidae_sp_1_NVP   anthomyiidae_sp_3_NVP
-0.221                  0.188                   0.989
0.972                   0.092                   0.924

```

and then their values are on the next line in tab delimited format, and so on until there are no more values. I was able to import this file and it sort of helped. But I could still use a good suggestion.