Hello,

it seems to be common demand to filter data that is to be plotted.

As an example, you have a table:

|   h | Model | Testset | Result |
|-----+-------+---------+--------|
|   1 | A     | X       |    0.1 |
| 0.5 | A     | X       |    0.2 |
| 0.2 | A     | X       |    0.3 |
|   1 | B     | X       |   0.11 |
| 0.5 | B     | X       |   0.12 |
| 0.2 | B     | X       |   0.13 |
|   1 | B     | Y       |    0.1 |
| 0.5 | B     | Y       |   0.12 |
| 0.2 | B     | Y       |    0.1 |

Now you want to plot all results (x = h, y = Result) for Model=B, Testset=Y.

There are some code snippets, like:

https://tex.stackexchange.com/questions/66640/how-can-i-filter-select-data-float-text-from-a-table-and-plot-it
https://tex.stackexchange.com/questions/98003/filter-rows-from-a-table

but they only allow to filter for one criteria.

As far as I see, pgfplots already have a number of filtering/restrictions 
possiblilities, but they all act on coordinates only.

Or is there something like \addplot[restrict={Model==B and Testset=Y}, x=h, 
y=Result] {my_data.csv}; ?

What would be the official way of doing that?

Best Thanks,

Florian Lindner



_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to