Questions tagged [pgfplotstable]

{pgfplotstable} is a package that can read, parse, modify or generate tables. Data is provided via either external files or inline code. It also serves as the data handler of the graphics package {pgfplots}.

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

Missing \endcsname inserted in pgfplotstable

The following MWE creates a simple little table with pgfplotstable and works fine: \documentclass{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat = 1.16} \begin{document} \...
1
vote
1answer
20 views

How to get last value in a column of pgfplotstable?

I need to get a last value in a column of a pgfplotstable. I have the following code: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread{ X 1 2 3 }\tbl \...
2
votes
2answers
44 views

Pgfplots empty plot legend entry (the current plot has no coordinates (or all have been filtered away))

I am using pgfplots to automatically plot data of a csv file. The file always maintains the same structure, but some times (e.g. sensor not connected...) there are no coodinates to plot for a ...
0
votes
0answers
27 views

Multiple headers with multiple columns

Multiple headers with multiple columns I am currently working on creating a table with multiple headers spanning multiple columns. I asked about first head here, and got the first one taken care of, ...
2
votes
2answers
49 views

Centering a table on the page

Centering a table on the page I have some tables that I am generating with external text files. There are lots of different tables, but they all share some of the same requirements. They need to ...
0
votes
1answer
15 views

pfgplotstable: alignment string rendering in table

I am trying to render a page width table, and getting the alignment string in the render. \documentclass[10pt]{article} \usepackage[table]{xcolor} \usepackage{xcolor} \usepackage[explicit]{titlesec} \...
0
votes
1answer
20 views

pgfplotstable -> Create columns of ALL string type

I am importing data from a text file that has about a dozen columns. Most, if not all, are string fields. The exception to the rule is the odd float column. In order for this to render, end up having ...
1
vote
1answer
22 views

display images at specific positions reading an external table uses tikz

I'd like to define a set of positions and images in a data file, x y filename 0 0 image/path/1.png 1 1 image/path/2.png and use this data file to display the images on a 2D axis of a tikz ...
0
votes
2answers
49 views

pgfplotstabletypeset unable to access first column

I am using pgfplotstabletypeset for multiple tables in a project, this code imports the data correctly. However, the first column of the head row always gets these odd letter combination and I am not ...
0
votes
1answer
38 views

Multiple errors with pgfplots inside a subfig environment

I am trying to put two figures side by side using the subfig package (I´ve done this in the past, even with tikzpictures) but I am facing a problem. Whenever I try to compile my document I get ...
1
vote
2answers
60 views

pgfplotstable: correct way to generate new columns using custom commands in a table that can be plotted with tikz

Sorry if the title is too big, but I didn't know how to express it as something specific, I try to generate new columns in a table using custom commands, for instance: \documentclass{scrbook} \...
1
vote
1answer
28 views

Plot points from \pgfplotstableset

i have my MWE \documentclass[]{beamer} \usepackage{etoolbox} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \begin{frame} \frametitle{ Regression} \framesubtitle{Weight and Height}...
2
votes
2answers
48 views

pgfplotstable: change the color of a cell's content in string type while maintaining the style

Expanding the topic covered in pgfplotstable: how can I change the color of a cell's content while maintaining the style?, correctly resolved by @frougon, I need to change the color of a single cell ...
2
votes
1answer
52 views

pgfplotstable: how can I change the color of a cell's content while maintaining the style?

I need to change the color of a single cell. \documentclass{scrbook} \usepackage[table]{xcolor} \usepackage{pgfplotstable} \usepackage{booktabs} \begin{document} \begin{table} \pgfplotstabletypeset[...
1
vote
1answer
23 views

pgfplotstable: dec sep = {.} doesn't work as expected [duplicate]

I need to use the point "." as a decimal separator, but something strange happens, I write: \documentclass[oneside]{scrbook} \usepackage[spanish, es-tabla]{babel} \usepackage{pgfplotstable} \begin{...
0
votes
1answer
48 views

How to import a table with scientific formating

Here is my not working MWE. How can I import and plot the table with the scientific formating? \documentclass[border=0mm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable}...
0
votes
1answer
42 views

newcommand, pgfplotsinvokeforeach, expl3: How to handle with several arguments of the kind '#…'

I have #1 for my newcommand. I have ##1 for my pgfplotsinvokeforeach-loop. Now I would need something like ###1 for my comparing-method "\fpcompareTF{##1<0}{333}{##1}". What is the right way ...
1
vote
1answer
17 views

Table header not shown with pgfplotstable in Tikzpicture environment

I'm trying to get pgfplotstable to show the header of the columns in my csv file as well. It seems like this should be the default behaviour, and I can't seem to find anyone else having this problem. ...
0
votes
1answer
31 views

pgfplotstable: How to use pgfplotstabletranspose correctly due to string type?

I do not want my numbers to become string types in the transposed table. What do I have to set in \pgfplotstabletranspose? \documentclass[a4paper, landscape=false]{article} \usepackage{amsmath, ...
0
votes
0answers
10 views

pgfplotstable: Hide special values as style

To hide cells with '-1' I use a method every column/.code={ \ifnum\pgfplotstablecol>0 \pgfkeysalso{postproc cell content/.style={ @cell content={ \fpcompareTF{##1<0}{}{\pgfmathprintnumber[]{##1}...
1
vote
0answers
25 views

pgfplotstable: Adding a style in one row

I want to add a \cdot in each cell in the row 'Multiplier'. · Note that the main-code could have more columns! · Note that the values 'results' are calculated in the main code; but not in this MWE. ...
1
vote
1answer
34 views

pgfplotstable: How to handle correctly with pgfplotsinvokeforeach at pgfplotstablecreatecol

I get only the last value (that is '0') expanded in the following pgfplotsinvokeforeach-loop. What have I to do? BTW: I would like to keep create col/set list. I hope it is possible. \documentclass[...
0
votes
1answer
16 views

\newwrite, pgfplotstable: Put generated rows together to one pgfplotstable (follow-up question)

I get a Code from @egreg that create rows in outwritten textfiles in a loop. I need to put all these rows together in 1 pgfplotstable, that means something like \ifnum\the\filecount=1 \...
1
vote
2answers
33 views

\write and pgfplotstable: Adding \pgfplotstableread into \loop goes wrong

I get a code from @DavidCarlisle, that generate output-txt-files, and I want to put all the outputfiles in a pgfplotstable together. So I try adding \ifnum\the\filecount=1 \pgfplotstableread[col sep=...
1
vote
1answer
41 views

Automatically reading pgfplots table column for legend with math mode / latex commands

This is a follow up question to How can multiple pgfplotstable columns be used in a legend? I tried the minimal working example from there and replaced one of the Column names with {$R_0 = \SI{10}...
0
votes
1answer
115 views

Compilation Error “! Missing \endcsname inserted” The control sequence marked <to be read again> should not appear between \csname and \endcsname

I'm writing my first Tex-document and sometimes it freaks me out. Trying to make a table from a .cvs-file, I'm always getting the "Missing \endcsname inserted"-error. Weird thing is that I copy-pasted ...
0
votes
0answers
53 views

pgfplotstable: Create rows with loops

Is it possible to create rows with loops? I thought about something like that: \○pgfplotsinvokeforeach{1,...,5}{% \pgfplotstableread[col sep=&]{ #1 & #1 & #1 }\temp \...
1
vote
1answer
33 views

pgfplotstablesave and CSV files

This file writes out a CSV file: \documentclass{article} \usepackage{pgfplots,pgfplotstable} \pgfplotstableread[col sep=comma]{ 1,2 3,4 5,6 7,8 9,10 }\data \begin{document} \...
2
votes
0answers
57 views

pgfplotstable: Problem with 'create on use', getprevrow (Table similar to “Horner's scheme”)

I wrote the explaining text into the image, I hope it is easier to explain in this way: Picture without stuff: \documentclass[a4paper]{article} \usepackage{pgfplotstable} \pgfplotsset{compat=1.16} \...
3
votes
1answer
57 views

pgfplotstable: How to create rows with a loop

I want to create several table-rows with calculated data inside. So I think, I have to use \pgfplotstablevertcat{<1>}{<2>} But something like this (example!) does not work: \foreach \...
1
vote
1answer
52 views

Can't generate a table from a .csv file

I am trying to generate table from .csv file. Firstly, I create an excel spreadsheet that looks like this: Then I export it as a .csv file, that looks like this: Then I use the following code to ...
2
votes
1answer
29 views

PGF barplot with pgfplotstable and secondary y-axis doesn't look good

I'm trying to create a bar chart with two y-axes. My data is included in the file and used with pgfplotstable. I've looked at PGF barplot with two y axis I have a few issues that I can't seem to ...
0
votes
1answer
25 views

How to shade region between lines in PGF drawn from imported data

I am plotting two lines based on data that I am importing into PGF. I would like then to shade the region between the two lines but I am not sure how. I have tried name path = A etc as suggested in ...
2
votes
1answer
43 views

Extra blank line when using setspace, wrapfig, and pgfplotstable

New to LaTex here. I'm sorry if my example text isn't the most minimum it can be. I need to be able to write documents that are doublespaced, have tables that are single spaced which are inputted ...
0
votes
1answer
35 views

How to read-in files (with underscores) using `pgfplotstabletypeset` in a loop?

I have a question on the use of the pgfplotstabletypeset. I use it to read in tables with underscores and there I need to parse the strings in each cell (see code). This works fine, if directly used ...
0
votes
1answer
58 views

Plotting using pgfplotstable

I have this set of data: \pgfplotstableread{ x y 64 3.4 65 3.8 66 3.4 66 3.5 68 3.3 69 3.1 69 4.1 70 3.9 70 4 70 4.1 70 4.1 71 3.6 71 3.7 71 3.9 71 4 72 4.3 73 3.6 73 4.1 73 4.3 73 ...
0
votes
0answers
60 views

problem in using \usepackage{pgfplots} package

I think I have a problem with using \usepackage{pgfplots} package since when I compile any file latex using pgfplots, it fails with this error: ! Text line contains an invalid character. l.232 ......
0
votes
0answers
12 views

How to wrap and center headers, AND right-justify column data in pgfplotstable

I'm using pgfplotstable to import csv data into a table. The headers need to be long words that take too much width and need to be wrapped, the row contents are only about 14 chars (decimals). So ...
2
votes
2answers
58 views

filling plot region changes error bars of another plot

I have the following plot: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepackage{pgfplotstable} \usepgfplotslibrary{fillbetween} \pgfplotstableread{ X Xminus Xplus ...
1
vote
1answer
43 views

Aligning vertical bar columns and labels nicely

I am trying to draw (in pgfplots) bar diagram similar to this: When I do like this: \begin{tikzpicture} \begin{axis} [ title = Energy in MJ (million joules) to generate \$1, xbar, y=...
2
votes
1answer
34 views

Placement of table in pgfplot

How it is possible to place table onto pgfplot with scaling? \documentclass[]{article} \usepackage{pgfplots, pgfplotstable} \usepackage{booktabs} \usepackage{caption} \pgfplotstableread{ Current ...
0
votes
0answers
35 views

Column lines not displaying when column type is specified (using pgfplotstable)

I am in need of assistance, please. I have spent several hours trying to solve this problem, but I can't see where it might be. I'm new to pgfplotstable, but not new to LaTeX, but I am definitely at ...
0
votes
0answers
12 views

Issue with tabularx and pgfplotstable when specifying column type

I am having trouble using a tabularx environment together with the pgfplotstable package. As soon as I specify a column type in tabularx, I recieve a series of errors. When no column type is specified ...
1
vote
0answers
40 views

Select non consecutive rows for addplot in tikz

I have a list of points in a table out of which I would like to plot several closed loop paths. For each \addplot I would like to give an index list for this particular path. The trouble is that ...
0
votes
0answers
25 views

Is it possible to format cells in a pgfplotstable based on values in another pgfplotstable?

Background This question is very similar to another question that I asked earlier concerning how to format text based on the values of a csv. The corresponding answer allowed me to read in a ...
0
votes
1answer
31 views

How to format text based on a logical statement that reads in a value from a csv?

Background Hello, and thanks in advance for any insights you all can offer! Sorry for the very long post, but I noticed most new users are chastised for not sharing enough context. The TLDR version ...
0
votes
1answer
64 views

A PGFplots linear regression problem

I'm having problems with the linear regression function in PGFplots. The eq given by the package has the signs changed. \documentclass[12pt,letterpaper]{article} \usepackage[letterpaper, margin = 1 ...
2
votes
1answer
58 views

decimal point alignment and \pgfmathprintnumber

In the table below, column a is aligned by decimal point. Is it possible to align column b that way too? \documentclass{standalone} \usepackage{pgfplotstable} \usepackage{siunitx} \begin{document} \...
2
votes
1answer
60 views

rotated header and dec sep align

I have the following code, adapted from here. \documentclass{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.16} \begin{document} \pgfplotstabletypeset[col sep=comma, every head row/....
0
votes
0answers
21 views

How to format number precision in a pgfplotstable when post processing?

I'm trying to color cells in a pgfplotstable based on the cell value: if value <= A, give the cell a background color. The coloring works fine (used this answer as a starting point) but other ...

1 2 3 4 5 19