Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to highlight the min/max value in pairs of values on each row in a table with pgfplotstable.

I had a look at Highlighting Extremal Values in Table which seems to provide much of the machinery needed.

I am quite new to pgfplotstable, is there a better way to do this than reading the two columns to be compared to a new macro, transpose and sort on one column (the original row) and then repeat for all rows? (for each pair of values). With better I mean easier (for me) and/or more efficient.

I have many rows (150 in my test case) and typically three pairs for each row that I would like to compare.

Comparing values for each row would be easy in the script emitting the csv data, so I gathered I might be missing something important -- hence the question.

share|improve this question

closed as not constructive by egreg, Joseph Wright Jul 7 '12 at 21:53

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can you provide a little more detail about a better solution? What is the obstacle that prevents you to use @Jake 's answer in the linked question? –  percusse Feb 8 '12 at 10:23
    
Are you hesitant to use the solution because it seems to arduous? In the linked answer, I've provided a style that should make it quite easy to use (you don't have to do all the steps yourself). Or is the solution too slow for your application? In that case, how many rows do you have, and can you provide a sample of the data? –  Jake Feb 8 '12 at 14:20
    
Yes, it seemed a little convoluted and very inefficient, so I gathered I might be missing something important. I am considering pgfplotstable instead of outputting a LaTeX table from a python script, where comparing two values in each row and applying different formatting would be very easy -- but I like the idea of pgfplotstable. I'm playing with a table of 150 rows to see how it works out. –  Lars Feb 8 '12 at 18:16
    
Optimization is often possible (and surely here as well). The key question is: would it make a significant difference here? "Optimization matters only when it matters" (cited from the summary of flounder.com/optimization.htm ) –  Christian Feuersänger Feb 8 '12 at 18:54
    
My primary concern was that it seemed to be a lot of work for me to achieve something relatively simple, which made me ask myself if there was an easier (and potentially much more efficient) solution. When I have to transpose and sort an entire table to compare two values, I get the feeling I am not doing it right. –  Lars Feb 8 '12 at 19:08

Browse other questions tagged or ask your own question.