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/
200 stars 35 forks source link

pfgplots can't read one column data #339

Open pgf-tikz-bot opened 6 years ago

pgf-tikz-bot commented 6 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/21/ Author: ynikitenko Timestamp: 2018-07-14 10:44:40.597000

I have a one-column data file. When I try to use it for tabular data, I get

! Package pgfplots Error: Sorry, the requested column number '1' in table 'DC3_energy.txt' does not exist!? Please verify you used the correct index 0 <= i < N..

I tried to use newline for col sep, but that doesn't work.

As is written in pfgplotstable manual (section 2.1), "The initial separation character is “white space” which means “at least one space or tab” (see option col sep below)." Indeed, there is only one column in my file without any spaces. Why don't we allow pgfplotstable read one column data, even if it doesn't contain separation characters other than newline?

pgf-tikz-bot commented 6 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/21/#8537 Author: ynikitenko Timestamp: 2018-07-14 11:02:54.324000

Sorry, this seemed not to be the issue. The problem was that I didn't use , y index=0 in my hist. Anyway I don't understand why I have to use y index if my data is on x axis. Also the documentation may be improved (you can write that for one-column data separators are not needed).