pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
198 stars 34 forks source link

Detect and handle empty column names #344

Closed pgf-tikz-bot closed 4 years ago

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/patches/4/ Author: tentotwo Timestamp: 2012-11-15 10:10:06

PGFPlotstable can't deal with empty column names. The following example fails with the error message "! Package pgfkeys Error: I do not know the key '/pgf/number format/columns//.try/.try'":

\documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstabletypeset[col sep=comma]{ A,,C,,E 1,2,3,4,5 6,7,8,9,10 } \end{document}

I've modfied the \pgfplotstableread@impl@collectcolnames@NEXT function found in pgfplotstableshared.code.tex to detect empty column names and replace them with the string "empty", which fixes the error and allows for the column to be accessed with the usual methods.

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/patches/4/#744c Author: tentotwo Timestamp: 2012-11-15 10:10:10

https://sourceforge.net/p/pgfplots/patches/_discuss/thread/2e3995a3/744c/attachment/emptycolnames.patch Patch for PGFPlotstable to handle empty column names

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/patches/4/#0ce1 Author: cfeuersaenger Timestamp: 2013-06-21 21:09:01.291000

pgf-tikz-bot commented 11 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/patches/4/#2f04 Author: cfeuersaenger Timestamp: 2013-06-21 21:09:01.783000

Fixed. Thanks for the report and the excellent pre-analysis.

Now, pgfplots issues a warning (which can be turned off) and assigns the column index to such a column.