Rainbow CSVTSV Style with pgfplotstable
up vote
0
down vote
favorite
I am trying to generate something similar to this Rainbow Style.
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}
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:
edit3: added final result for me. hope it spares some time for someone else!
pgfplotstable csv
New contributor
add a comment |
up vote
0
down vote
favorite
I am trying to generate something similar to this Rainbow Style.
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}
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:
edit3: added final result for me. hope it spares some time for someone else!
pgfplotstable csv
New contributor
3
Welcome to TeX.SX! Usepgfplotstable
. 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
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to generate something similar to this Rainbow Style.
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}
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:
edit3: added final result for me. hope it spares some time for someone else!
pgfplotstable csv
New contributor
I am trying to generate something similar to this Rainbow Style.
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}
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:
edit3: added final result for me. hope it spares some time for someone else!
pgfplotstable csv
pgfplotstable csv
New contributor
New contributor
edited yesterday
New contributor
asked 2 days ago
BananaBowser
11
11
New contributor
New contributor
3
Welcome to TeX.SX! Usepgfplotstable
. 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
add a comment |
3
Welcome to TeX.SX! Usepgfplotstable
. 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
add a comment |
active
oldest
votes
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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