How to customize rows by name with pgfplotstable?











up vote
4
down vote

favorite












I have a table



Rank ITML  SDALF KISSME LDM   LMNN 
1 5.53 5.60 14.17 13.51 7.29
5 18.89 23.45 48.54 40.73 21.00
10 29.96 36.09 52.57 52.13 32.06
20 44.20 51.96 70.53 70.81 48.94


The result I want is like



enter image description here



Concretely, I need to




  • Change row name to add citation

  • Make a row in bold style

  • Add midrule behind a row in a specific name


In pgfplotstable, columns can be easily refered using their names. But I cannot find a solution to customize the row style as easy as column. Few solutions I can use pgfplotstabletranspose to make the table row-wise, but the first column is not treated as name, but a column of data in string type, which result in the following picture:



enter image description here



And in this way the row can only be refered to in number. I may change one row name like this:



pgfplotstabletranspose[string type, colnames from=Rank, input colnames to=Rank]loadedtable{cuhk03-sota.txt}
pgfplotstabletypeset[
string type,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=hline},
every row 0 column Rank/.style={/pgfplots/table/@cell content/.add={relax}{cite{davis2007information}},},
}{loadedtable}


But this is obviously not a neat way. When I add a row in the middle, all the row numbers below have to be changed! Is there a good way to deal with row names?










share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
    – John Kormylo
    Nov 13 '16 at 18:07










  • @JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
    – cis
    Oct 27 at 4:07

















up vote
4
down vote

favorite












I have a table



Rank ITML  SDALF KISSME LDM   LMNN 
1 5.53 5.60 14.17 13.51 7.29
5 18.89 23.45 48.54 40.73 21.00
10 29.96 36.09 52.57 52.13 32.06
20 44.20 51.96 70.53 70.81 48.94


The result I want is like



enter image description here



Concretely, I need to




  • Change row name to add citation

  • Make a row in bold style

  • Add midrule behind a row in a specific name


In pgfplotstable, columns can be easily refered using their names. But I cannot find a solution to customize the row style as easy as column. Few solutions I can use pgfplotstabletranspose to make the table row-wise, but the first column is not treated as name, but a column of data in string type, which result in the following picture:



enter image description here



And in this way the row can only be refered to in number. I may change one row name like this:



pgfplotstabletranspose[string type, colnames from=Rank, input colnames to=Rank]loadedtable{cuhk03-sota.txt}
pgfplotstabletypeset[
string type,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=hline},
every row 0 column Rank/.style={/pgfplots/table/@cell content/.add={relax}{cite{davis2007information}},},
}{loadedtable}


But this is obviously not a neat way. When I add a row in the middle, all the row numbers below have to be changed! Is there a good way to deal with row names?










share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
    – John Kormylo
    Nov 13 '16 at 18:07










  • @JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
    – cis
    Oct 27 at 4:07















up vote
4
down vote

favorite









up vote
4
down vote

favorite











I have a table



Rank ITML  SDALF KISSME LDM   LMNN 
1 5.53 5.60 14.17 13.51 7.29
5 18.89 23.45 48.54 40.73 21.00
10 29.96 36.09 52.57 52.13 32.06
20 44.20 51.96 70.53 70.81 48.94


The result I want is like



enter image description here



Concretely, I need to




  • Change row name to add citation

  • Make a row in bold style

  • Add midrule behind a row in a specific name


In pgfplotstable, columns can be easily refered using their names. But I cannot find a solution to customize the row style as easy as column. Few solutions I can use pgfplotstabletranspose to make the table row-wise, but the first column is not treated as name, but a column of data in string type, which result in the following picture:



enter image description here



And in this way the row can only be refered to in number. I may change one row name like this:



pgfplotstabletranspose[string type, colnames from=Rank, input colnames to=Rank]loadedtable{cuhk03-sota.txt}
pgfplotstabletypeset[
string type,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=hline},
every row 0 column Rank/.style={/pgfplots/table/@cell content/.add={relax}{cite{davis2007information}},},
}{loadedtable}


But this is obviously not a neat way. When I add a row in the middle, all the row numbers below have to be changed! Is there a good way to deal with row names?










share|improve this question















I have a table



Rank ITML  SDALF KISSME LDM   LMNN 
1 5.53 5.60 14.17 13.51 7.29
5 18.89 23.45 48.54 40.73 21.00
10 29.96 36.09 52.57 52.13 32.06
20 44.20 51.96 70.53 70.81 48.94


The result I want is like



enter image description here



Concretely, I need to




  • Change row name to add citation

  • Make a row in bold style

  • Add midrule behind a row in a specific name


In pgfplotstable, columns can be easily refered using their names. But I cannot find a solution to customize the row style as easy as column. Few solutions I can use pgfplotstabletranspose to make the table row-wise, but the first column is not treated as name, but a column of data in string type, which result in the following picture:



enter image description here



And in this way the row can only be refered to in number. I may change one row name like this:



pgfplotstabletranspose[string type, colnames from=Rank, input colnames to=Rank]loadedtable{cuhk03-sota.txt}
pgfplotstabletypeset[
string type,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=hline},
every row 0 column Rank/.style={/pgfplots/table/@cell content/.add={relax}{cite{davis2007information}},},
}{loadedtable}


But this is obviously not a neat way. When I add a row in the middle, all the row numbers below have to be changed! Is there a good way to deal with row names?







tables pgfplotstable






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '16 at 7:45









naphaneal

2,1281927




2,1281927










asked Nov 13 '16 at 5:25









chaonan99

286




286





bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
    – John Kormylo
    Nov 13 '16 at 18:07










  • @JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
    – cis
    Oct 27 at 4:07




















  • Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
    – John Kormylo
    Nov 13 '16 at 18:07










  • @JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
    – cis
    Oct 27 at 4:07


















Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
– John Kormylo
Nov 13 '16 at 18:07




Adding the citation is the tricky bit. You might be better off using a tabular and pgfplotstablegetelem.
– John Kormylo
Nov 13 '16 at 18:07












@JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
– cis
Oct 27 at 4:07






@JohnKormylo "Adding the citation is the tricky bit." I don't know why :)
– cis
Oct 27 at 4:07












1 Answer
1






active

oldest

votes

















up vote
0
down vote













I am not agree with @JohnKormylo ;) The problem is not the citation, the problem is to



· Hack the head row for adding the word 'Rank' in some columns:



every head row/.style={
typeset cell/.code={%% add the word 'Rank'...
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
else%
ifnumpgfplotstablecol=1%
pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
fifi%
}%%
},


· The citation, on the other hand, can simply be added by using biblatex/biber,

where we have to use a matching bibliography, and then



display columns/0/.style={
postproc cell content/.style={@cell content={##1 cite{##1} }}
},


(or maybe another 'citation source' too; depending on where the labels come from).



· Alltogether:



enter image description here



% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex

RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@book{ITML,
title = {Citation of ITML},
}
@book{SDALF,
title = {Citation of SDALF},
}
@book{KISSME,
title = {Citation of KISSME},
}
@book{LDM,
title = {Citation of LDM},
}
@book{LMNN,
title = {Citation of LMNN},
}
end{filecontents}

documentclass[border=5pt, varwidth]{standalone}
usepackage{pgfplotstable}

usepackage[style=numeric]{biblatex}
addbibresource{jobname.bib}
usepackage[colorlinks=true, citecolor=purple, pdfborder={0 0 0}]{hyperref}

begin{document}
pgfplotstableread[header=true]{
Rank ITML SDALF KISSME LDM LMNN
1 5.53 5.60 14.17 13.51 7.29
5 18.89 23.45 48.54 40.73 21.00
10 29.96 36.09 52.57 52.13 32.06
20 44.20 51.96 70.53 70.81 48.94
}Actual

textbf{Large Actual:} pgfplotstabletypeset[string type]{Actual}
bigskip

pgfplotstableset{string type,
column type={>{bfseries}c}, % bfseries for head row (1/2)
postproc cell content/.append style={% normalfont for cells (2/2)
/pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfont}{}
},
%
every head row/.style={
before row=hline,
after row=hline,
typeset cell/.code={%% add the word 'Rank'...
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
else%
ifnumpgfplotstablecol=1%
pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
fifi%
}%%
},
%
every last row/.style={
after row=hline,
},
%
display columns/0/.style={% citations
postproc cell content/.style={@cell content={##1 cite{##1} }},
column type=l,
},
}

textbf{Large Target:} pgfplotstabletranspose[
colnames from=Rank,
input colnames to=Method,
]Target{Actual}
pgfplotstabletypeset{Target}

%cite{ITML}
printbibliography[title=Citations]
end{document}





share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f338891%2fhow-to-customize-rows-by-name-with-pgfplotstable%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I am not agree with @JohnKormylo ;) The problem is not the citation, the problem is to



    · Hack the head row for adding the word 'Rank' in some columns:



    every head row/.style={
    typeset cell/.code={%% add the word 'Rank'...
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
    else%
    ifnumpgfplotstablecol=1%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
    fifi%
    }%%
    },


    · The citation, on the other hand, can simply be added by using biblatex/biber,

    where we have to use a matching bibliography, and then



    display columns/0/.style={
    postproc cell content/.style={@cell content={##1 cite{##1} }}
    },


    (or maybe another 'citation source' too; depending on where the labels come from).



    · Alltogether:



    enter image description here



    % arara: pdflatex
    % arara: biber
    % arara: pdflatex
    % arara: pdflatex

    RequirePackage{filecontents}
    begin{filecontents}{jobname.bib}
    @book{ITML,
    title = {Citation of ITML},
    }
    @book{SDALF,
    title = {Citation of SDALF},
    }
    @book{KISSME,
    title = {Citation of KISSME},
    }
    @book{LDM,
    title = {Citation of LDM},
    }
    @book{LMNN,
    title = {Citation of LMNN},
    }
    end{filecontents}

    documentclass[border=5pt, varwidth]{standalone}
    usepackage{pgfplotstable}

    usepackage[style=numeric]{biblatex}
    addbibresource{jobname.bib}
    usepackage[colorlinks=true, citecolor=purple, pdfborder={0 0 0}]{hyperref}

    begin{document}
    pgfplotstableread[header=true]{
    Rank ITML SDALF KISSME LDM LMNN
    1 5.53 5.60 14.17 13.51 7.29
    5 18.89 23.45 48.54 40.73 21.00
    10 29.96 36.09 52.57 52.13 32.06
    20 44.20 51.96 70.53 70.81 48.94
    }Actual

    textbf{Large Actual:} pgfplotstabletypeset[string type]{Actual}
    bigskip

    pgfplotstableset{string type,
    column type={>{bfseries}c}, % bfseries for head row (1/2)
    postproc cell content/.append style={% normalfont for cells (2/2)
    /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfont}{}
    },
    %
    every head row/.style={
    before row=hline,
    after row=hline,
    typeset cell/.code={%% add the word 'Rank'...
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
    else%
    ifnumpgfplotstablecol=1%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
    fifi%
    }%%
    },
    %
    every last row/.style={
    after row=hline,
    },
    %
    display columns/0/.style={% citations
    postproc cell content/.style={@cell content={##1 cite{##1} }},
    column type=l,
    },
    }

    textbf{Large Target:} pgfplotstabletranspose[
    colnames from=Rank,
    input colnames to=Method,
    ]Target{Actual}
    pgfplotstabletypeset{Target}

    %cite{ITML}
    printbibliography[title=Citations]
    end{document}





    share|improve this answer



























      up vote
      0
      down vote













      I am not agree with @JohnKormylo ;) The problem is not the citation, the problem is to



      · Hack the head row for adding the word 'Rank' in some columns:



      every head row/.style={
      typeset cell/.code={%% add the word 'Rank'...
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
      else%
      ifnumpgfplotstablecol=1%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
      fifi%
      }%%
      },


      · The citation, on the other hand, can simply be added by using biblatex/biber,

      where we have to use a matching bibliography, and then



      display columns/0/.style={
      postproc cell content/.style={@cell content={##1 cite{##1} }}
      },


      (or maybe another 'citation source' too; depending on where the labels come from).



      · Alltogether:



      enter image description here



      % arara: pdflatex
      % arara: biber
      % arara: pdflatex
      % arara: pdflatex

      RequirePackage{filecontents}
      begin{filecontents}{jobname.bib}
      @book{ITML,
      title = {Citation of ITML},
      }
      @book{SDALF,
      title = {Citation of SDALF},
      }
      @book{KISSME,
      title = {Citation of KISSME},
      }
      @book{LDM,
      title = {Citation of LDM},
      }
      @book{LMNN,
      title = {Citation of LMNN},
      }
      end{filecontents}

      documentclass[border=5pt, varwidth]{standalone}
      usepackage{pgfplotstable}

      usepackage[style=numeric]{biblatex}
      addbibresource{jobname.bib}
      usepackage[colorlinks=true, citecolor=purple, pdfborder={0 0 0}]{hyperref}

      begin{document}
      pgfplotstableread[header=true]{
      Rank ITML SDALF KISSME LDM LMNN
      1 5.53 5.60 14.17 13.51 7.29
      5 18.89 23.45 48.54 40.73 21.00
      10 29.96 36.09 52.57 52.13 32.06
      20 44.20 51.96 70.53 70.81 48.94
      }Actual

      textbf{Large Actual:} pgfplotstabletypeset[string type]{Actual}
      bigskip

      pgfplotstableset{string type,
      column type={>{bfseries}c}, % bfseries for head row (1/2)
      postproc cell content/.append style={% normalfont for cells (2/2)
      /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfont}{}
      },
      %
      every head row/.style={
      before row=hline,
      after row=hline,
      typeset cell/.code={%% add the word 'Rank'...
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
      else%
      ifnumpgfplotstablecol=1%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
      fifi%
      }%%
      },
      %
      every last row/.style={
      after row=hline,
      },
      %
      display columns/0/.style={% citations
      postproc cell content/.style={@cell content={##1 cite{##1} }},
      column type=l,
      },
      }

      textbf{Large Target:} pgfplotstabletranspose[
      colnames from=Rank,
      input colnames to=Method,
      ]Target{Actual}
      pgfplotstabletypeset{Target}

      %cite{ITML}
      printbibliography[title=Citations]
      end{document}





      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        I am not agree with @JohnKormylo ;) The problem is not the citation, the problem is to



        · Hack the head row for adding the word 'Rank' in some columns:



        every head row/.style={
        typeset cell/.code={%% add the word 'Rank'...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
        fifi%
        }%%
        },


        · The citation, on the other hand, can simply be added by using biblatex/biber,

        where we have to use a matching bibliography, and then



        display columns/0/.style={
        postproc cell content/.style={@cell content={##1 cite{##1} }}
        },


        (or maybe another 'citation source' too; depending on where the labels come from).



        · Alltogether:



        enter image description here



        % arara: pdflatex
        % arara: biber
        % arara: pdflatex
        % arara: pdflatex

        RequirePackage{filecontents}
        begin{filecontents}{jobname.bib}
        @book{ITML,
        title = {Citation of ITML},
        }
        @book{SDALF,
        title = {Citation of SDALF},
        }
        @book{KISSME,
        title = {Citation of KISSME},
        }
        @book{LDM,
        title = {Citation of LDM},
        }
        @book{LMNN,
        title = {Citation of LMNN},
        }
        end{filecontents}

        documentclass[border=5pt, varwidth]{standalone}
        usepackage{pgfplotstable}

        usepackage[style=numeric]{biblatex}
        addbibresource{jobname.bib}
        usepackage[colorlinks=true, citecolor=purple, pdfborder={0 0 0}]{hyperref}

        begin{document}
        pgfplotstableread[header=true]{
        Rank ITML SDALF KISSME LDM LMNN
        1 5.53 5.60 14.17 13.51 7.29
        5 18.89 23.45 48.54 40.73 21.00
        10 29.96 36.09 52.57 52.13 32.06
        20 44.20 51.96 70.53 70.81 48.94
        }Actual

        textbf{Large Actual:} pgfplotstabletypeset[string type]{Actual}
        bigskip

        pgfplotstableset{string type,
        column type={>{bfseries}c}, % bfseries for head row (1/2)
        postproc cell content/.append style={% normalfont for cells (2/2)
        /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfont}{}
        },
        %
        every head row/.style={
        before row=hline,
        after row=hline,
        typeset cell/.code={%% add the word 'Rank'...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
        fifi%
        }%%
        },
        %
        every last row/.style={
        after row=hline,
        },
        %
        display columns/0/.style={% citations
        postproc cell content/.style={@cell content={##1 cite{##1} }},
        column type=l,
        },
        }

        textbf{Large Target:} pgfplotstabletranspose[
        colnames from=Rank,
        input colnames to=Method,
        ]Target{Actual}
        pgfplotstabletypeset{Target}

        %cite{ITML}
        printbibliography[title=Citations]
        end{document}





        share|improve this answer














        I am not agree with @JohnKormylo ;) The problem is not the citation, the problem is to



        · Hack the head row for adding the word 'Rank' in some columns:



        every head row/.style={
        typeset cell/.code={%% add the word 'Rank'...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
        fifi%
        }%%
        },


        · The citation, on the other hand, can simply be added by using biblatex/biber,

        where we have to use a matching bibliography, and then



        display columns/0/.style={
        postproc cell content/.style={@cell content={##1 cite{##1} }}
        },


        (or maybe another 'citation source' too; depending on where the labels come from).



        · Alltogether:



        enter image description here



        % arara: pdflatex
        % arara: biber
        % arara: pdflatex
        % arara: pdflatex

        RequirePackage{filecontents}
        begin{filecontents}{jobname.bib}
        @book{ITML,
        title = {Citation of ITML},
        }
        @book{SDALF,
        title = {Citation of SDALF},
        }
        @book{KISSME,
        title = {Citation of KISSME},
        }
        @book{LDM,
        title = {Citation of LDM},
        }
        @book{LMNN,
        title = {Citation of LMNN},
        }
        end{filecontents}

        documentclass[border=5pt, varwidth]{standalone}
        usepackage{pgfplotstable}

        usepackage[style=numeric]{biblatex}
        addbibresource{jobname.bib}
        usepackage[colorlinks=true, citecolor=purple, pdfborder={0 0 0}]{hyperref}

        begin{document}
        pgfplotstableread[header=true]{
        Rank ITML SDALF KISSME LDM LMNN
        1 5.53 5.60 14.17 13.51 7.29
        5 18.89 23.45 48.54 40.73 21.00
        10 29.96 36.09 52.57 52.13 32.06
        20 44.20 51.96 70.53 70.81 48.94
        }Actual

        textbf{Large Actual:} pgfplotstabletypeset[string type]{Actual}
        bigskip

        pgfplotstableset{string type,
        column type={>{bfseries}c}, % bfseries for head row (1/2)
        postproc cell content/.append style={% normalfont for cells (2/2)
        /pgfplots/table/@cell content/.add={fontseries{seriesdefault}selectfont}{}
        },
        %
        every head row/.style={
        before row=hline,
        after row=hline,
        typeset cell/.code={%% add the word 'Rank'...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{##1 &}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{Rank ##1 &}%
        fifi%
        }%%
        },
        %
        every last row/.style={
        after row=hline,
        },
        %
        display columns/0/.style={% citations
        postproc cell content/.style={@cell content={##1 cite{##1} }},
        column type=l,
        },
        }

        textbf{Large Target:} pgfplotstabletranspose[
        colnames from=Rank,
        input colnames to=Method,
        ]Target{Actual}
        pgfplotstabletypeset{Target}

        %cite{ITML}
        printbibliography[title=Citations]
        end{document}






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Oct 27 at 5:31

























        answered Oct 27 at 4:00









        cis

        607514




        607514






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f338891%2fhow-to-customize-rows-by-name-with-pgfplotstable%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks