Rainbow CSVTSV Style with pgfplotstable











up vote
0
down vote

favorite
1












I am trying to generate something similar to this Rainbow Style.
Rainbow TSV Example



I would like to use the listings package for that (easy import through lstinputlisting). Any Ideas? Or are there other solutions for my problem?
Without any highlighting it is just so difficult to comprehend the given information.



documentclass{scrreprt}
usepackage{listings}
begin{document}
lstinputlisting{example.tsv}
end{document}


enter image description here



edit: Example data



0.004   1100.000    0.000   1200.000    180.000 0.000   180.000
0.008 1099.998 0.629 1200.000 180.000 0.000 180.000
0.012 1099.992 1.258 1200.000 180.000 0.000 180.000
0.016 1099.982 1.887 1200.000 180.000 0.000 180.000
0.020 1099.968 2.516 1200.000 180.000 0.000 180.000
0.024 1099.951 3.144 1200.000 180.000 0.000 180.000
0.028 1099.929 3.773 1200.000 180.000 0.000 180.000


edit2:



Ok I am using pgfplotstable now.



documentclass{scrreprt}

usepackage{colortbl}
usepackage{pgfplotstable}
usepackage{booktabs}
usepackage{siunitx}

begin{document}

begin{table}[h!]
begin{center}
pgfplotstabletypeset[
skip first n=2, % skip lines in beginning
skip rows between index={5}{10}, % skip rows from {<begin>}{<end>}
skip rows between index={10}{20},
col sep=tab, % the seperator in our .csv file
columns/0/.style={
column name=$Time [si{millisecond}]$, % name of first column
column type/.add={>{color{black}}}{},string type
},
columns/1/.style={
column name=$X [si{millimeter}]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/2/.style={
column name=$Y[si{millimeter}]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/3/.style={
column name=$Z[si{millimeter}]$,
column type/.add={>{color{green!50!black}}}{},string type
},
columns/4/.style={
column name=$X_u [^circ]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/5/.style={
column name=$Y_u [^circ]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/6/.style={
column name=$Z_u [^circ]$,
column type/.add={>{color{green!50!black}}}{},string type
},
every head row/.style={
before row={toprule}, % have a rule at top
after row={midrule}
}, % rule under units
every last row/.style={
after row={bottomrule}
}, % rule at bottom
postproc cell content/.append code={ % add dots between rows
ifnumpgfplotstablerow=4
pgfkeyssetvalue{/pgfplots/table/@cell content}{ensuremath{vdots}}
fi}
]{Code/trajectory.txt} % filename/path to file
caption{Data}
label{table1}
end{center}
end{table}

end{document}


And that is how it looks:



Example Table



edit3: added final result for me. hope it spares some time for someone else!










share|improve this question









New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 3




    Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
    – TeXnician
    2 days ago










  • Thanks for the tip! See my result in original post.
    – BananaBowser
    yesterday










  • I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
    – TeXnician
    16 hours ago















up vote
0
down vote

favorite
1












I am trying to generate something similar to this Rainbow Style.
Rainbow TSV Example



I would like to use the listings package for that (easy import through lstinputlisting). Any Ideas? Or are there other solutions for my problem?
Without any highlighting it is just so difficult to comprehend the given information.



documentclass{scrreprt}
usepackage{listings}
begin{document}
lstinputlisting{example.tsv}
end{document}


enter image description here



edit: Example data



0.004   1100.000    0.000   1200.000    180.000 0.000   180.000
0.008 1099.998 0.629 1200.000 180.000 0.000 180.000
0.012 1099.992 1.258 1200.000 180.000 0.000 180.000
0.016 1099.982 1.887 1200.000 180.000 0.000 180.000
0.020 1099.968 2.516 1200.000 180.000 0.000 180.000
0.024 1099.951 3.144 1200.000 180.000 0.000 180.000
0.028 1099.929 3.773 1200.000 180.000 0.000 180.000


edit2:



Ok I am using pgfplotstable now.



documentclass{scrreprt}

usepackage{colortbl}
usepackage{pgfplotstable}
usepackage{booktabs}
usepackage{siunitx}

begin{document}

begin{table}[h!]
begin{center}
pgfplotstabletypeset[
skip first n=2, % skip lines in beginning
skip rows between index={5}{10}, % skip rows from {<begin>}{<end>}
skip rows between index={10}{20},
col sep=tab, % the seperator in our .csv file
columns/0/.style={
column name=$Time [si{millisecond}]$, % name of first column
column type/.add={>{color{black}}}{},string type
},
columns/1/.style={
column name=$X [si{millimeter}]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/2/.style={
column name=$Y[si{millimeter}]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/3/.style={
column name=$Z[si{millimeter}]$,
column type/.add={>{color{green!50!black}}}{},string type
},
columns/4/.style={
column name=$X_u [^circ]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/5/.style={
column name=$Y_u [^circ]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/6/.style={
column name=$Z_u [^circ]$,
column type/.add={>{color{green!50!black}}}{},string type
},
every head row/.style={
before row={toprule}, % have a rule at top
after row={midrule}
}, % rule under units
every last row/.style={
after row={bottomrule}
}, % rule at bottom
postproc cell content/.append code={ % add dots between rows
ifnumpgfplotstablerow=4
pgfkeyssetvalue{/pgfplots/table/@cell content}{ensuremath{vdots}}
fi}
]{Code/trajectory.txt} % filename/path to file
caption{Data}
label{table1}
end{center}
end{table}

end{document}


And that is how it looks:



Example Table



edit3: added final result for me. hope it spares some time for someone else!










share|improve this question









New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 3




    Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
    – TeXnician
    2 days ago










  • Thanks for the tip! See my result in original post.
    – BananaBowser
    yesterday










  • I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
    – TeXnician
    16 hours ago













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I am trying to generate something similar to this Rainbow Style.
Rainbow TSV Example



I would like to use the listings package for that (easy import through lstinputlisting). Any Ideas? Or are there other solutions for my problem?
Without any highlighting it is just so difficult to comprehend the given information.



documentclass{scrreprt}
usepackage{listings}
begin{document}
lstinputlisting{example.tsv}
end{document}


enter image description here



edit: Example data



0.004   1100.000    0.000   1200.000    180.000 0.000   180.000
0.008 1099.998 0.629 1200.000 180.000 0.000 180.000
0.012 1099.992 1.258 1200.000 180.000 0.000 180.000
0.016 1099.982 1.887 1200.000 180.000 0.000 180.000
0.020 1099.968 2.516 1200.000 180.000 0.000 180.000
0.024 1099.951 3.144 1200.000 180.000 0.000 180.000
0.028 1099.929 3.773 1200.000 180.000 0.000 180.000


edit2:



Ok I am using pgfplotstable now.



documentclass{scrreprt}

usepackage{colortbl}
usepackage{pgfplotstable}
usepackage{booktabs}
usepackage{siunitx}

begin{document}

begin{table}[h!]
begin{center}
pgfplotstabletypeset[
skip first n=2, % skip lines in beginning
skip rows between index={5}{10}, % skip rows from {<begin>}{<end>}
skip rows between index={10}{20},
col sep=tab, % the seperator in our .csv file
columns/0/.style={
column name=$Time [si{millisecond}]$, % name of first column
column type/.add={>{color{black}}}{},string type
},
columns/1/.style={
column name=$X [si{millimeter}]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/2/.style={
column name=$Y[si{millimeter}]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/3/.style={
column name=$Z[si{millimeter}]$,
column type/.add={>{color{green!50!black}}}{},string type
},
columns/4/.style={
column name=$X_u [^circ]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/5/.style={
column name=$Y_u [^circ]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/6/.style={
column name=$Z_u [^circ]$,
column type/.add={>{color{green!50!black}}}{},string type
},
every head row/.style={
before row={toprule}, % have a rule at top
after row={midrule}
}, % rule under units
every last row/.style={
after row={bottomrule}
}, % rule at bottom
postproc cell content/.append code={ % add dots between rows
ifnumpgfplotstablerow=4
pgfkeyssetvalue{/pgfplots/table/@cell content}{ensuremath{vdots}}
fi}
]{Code/trajectory.txt} % filename/path to file
caption{Data}
label{table1}
end{center}
end{table}

end{document}


And that is how it looks:



Example Table



edit3: added final result for me. hope it spares some time for someone else!










share|improve this question









New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am trying to generate something similar to this Rainbow Style.
Rainbow TSV Example



I would like to use the listings package for that (easy import through lstinputlisting). Any Ideas? Or are there other solutions for my problem?
Without any highlighting it is just so difficult to comprehend the given information.



documentclass{scrreprt}
usepackage{listings}
begin{document}
lstinputlisting{example.tsv}
end{document}


enter image description here



edit: Example data



0.004   1100.000    0.000   1200.000    180.000 0.000   180.000
0.008 1099.998 0.629 1200.000 180.000 0.000 180.000
0.012 1099.992 1.258 1200.000 180.000 0.000 180.000
0.016 1099.982 1.887 1200.000 180.000 0.000 180.000
0.020 1099.968 2.516 1200.000 180.000 0.000 180.000
0.024 1099.951 3.144 1200.000 180.000 0.000 180.000
0.028 1099.929 3.773 1200.000 180.000 0.000 180.000


edit2:



Ok I am using pgfplotstable now.



documentclass{scrreprt}

usepackage{colortbl}
usepackage{pgfplotstable}
usepackage{booktabs}
usepackage{siunitx}

begin{document}

begin{table}[h!]
begin{center}
pgfplotstabletypeset[
skip first n=2, % skip lines in beginning
skip rows between index={5}{10}, % skip rows from {<begin>}{<end>}
skip rows between index={10}{20},
col sep=tab, % the seperator in our .csv file
columns/0/.style={
column name=$Time [si{millisecond}]$, % name of first column
column type/.add={>{color{black}}}{},string type
},
columns/1/.style={
column name=$X [si{millimeter}]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/2/.style={
column name=$Y[si{millimeter}]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/3/.style={
column name=$Z[si{millimeter}]$,
column type/.add={>{color{green!50!black}}}{},string type
},
columns/4/.style={
column name=$X_u [^circ]$,
column type/.add={>{color{blue!80!black}}}{},string type
},
columns/5/.style={
column name=$Y_u [^circ]$,
column type/.add={>{color{red!50!black}}}{},string type
},
columns/6/.style={
column name=$Z_u [^circ]$,
column type/.add={>{color{green!50!black}}}{},string type
},
every head row/.style={
before row={toprule}, % have a rule at top
after row={midrule}
}, % rule under units
every last row/.style={
after row={bottomrule}
}, % rule at bottom
postproc cell content/.append code={ % add dots between rows
ifnumpgfplotstablerow=4
pgfkeyssetvalue{/pgfplots/table/@cell content}{ensuremath{vdots}}
fi}
]{Code/trajectory.txt} % filename/path to file
caption{Data}
label{table1}
end{center}
end{table}

end{document}


And that is how it looks:



Example Table



edit3: added final result for me. hope it spares some time for someone else!







pgfplotstable csv






share|improve this question









New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday





















New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









BananaBowser

11




11




New contributor




BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






BananaBowser is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 3




    Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
    – TeXnician
    2 days ago










  • Thanks for the tip! See my result in original post.
    – BananaBowser
    yesterday










  • I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
    – TeXnician
    16 hours ago














  • 3




    Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
    – TeXnician
    2 days ago










  • Thanks for the tip! See my result in original post.
    – BananaBowser
    yesterday










  • I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
    – TeXnician
    16 hours ago








3




3




Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
– TeXnician
2 days ago




Welcome to TeX.SX! Use pgfplotstable. And please include your example data into the post, so others have something to play with.
– TeXnician
2 days ago












Thanks for the tip! See my result in original post.
– BananaBowser
yesterday




Thanks for the tip! See my result in original post.
– BananaBowser
yesterday












I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
– TeXnician
16 hours ago




I am glad that I could help, but maybe you want to post your edit as an answer rather than keeping it in the question. That way this post could be marked as solved.
– TeXnician
16 hours ago















active

oldest

votes











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
});


}
});






BananaBowser is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460895%2frainbow-csv-tsv-style-with-pgfplotstable%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








BananaBowser is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















BananaBowser is a new contributor. Be nice, and check out our Code of Conduct.













BananaBowser is a new contributor. Be nice, and check out our Code of Conduct.












BananaBowser is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460895%2frainbow-csv-tsv-style-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

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux