{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}.

learn more… | top users | synonyms

1
vote
1answer
200 views

String column tick labels and plotting selected samples on y axis with groupplots?

I have seen other relate questions (like Basic bar chart with text as x axis labels), but still cannot figure out where the problem is in my example. The MWE below contains a snippet of a .csv table ...
5
votes
2answers
191 views

Changing the rules of line breaks

I used pgfplotstable to read the data from a file. The columns have fixed widths. The third column contains usual text and the lines are broken nicely. The second column contains mathematical ...
2
votes
0answers
77 views

Getting the (variable) number of columns per row with pgfplotstable?

I've already seen PGFplots and table with different number of elements in columns; but this is a slightly different question... Consider the following MWE: \documentclass{article} ...
1
vote
0answers
48 views

Add rows for sum/mean/std at end of pgfplotstable

How do you add a one or multiple rows at the bottom of a table in pgfplotstable that is a summation/average/variance or other function of the above data in that particular column? How can this be ...
3
votes
1answer
138 views

pgfplots linear regression for the wrong column

The following MWE correctly plots the Y column when it is plotted directly (black points). However, a linear regression specified for the Y column actually fits to the Z column if the Y column is the ...
1
vote
0answers
60 views

Large number of plots from external csv file

I'm looking to draw a large number of lines/datasets (around 150~200, 50 points each) on a single window using pgfplot. The data is imported from a csv file created with matlab. I've seen several ...
3
votes
1answer
70 views

PGFplots: no mark is showing up

I have standard deviation bars but there is no symbol mark. How can I get one to appear? I took the statistical code from TikZ: How to pass a specific table to \pgfplotstableset if used for ...
6
votes
1answer
45 views

Using \pgfplotstablesort with a dynamically named macro

I have a moderately large number of data files that I need to read in with \pgfplotstablesort, and in each case the data read in should be assigned to a macro for later use in a plot. The filenames ...
4
votes
0answers
62 views

Subtract first row from each row and compute the relative differences

I am trying to create a new column from another one by subtracting from each row the first one. Then I want to create another column with the relative difference. \documentclass{article} ...
4
votes
1answer
182 views

TikZ: How to pass a specific table to \pgfplotstableset if used for tikzpicture

I have created the following code that appears to do what I want it to. Namely add an additional row to the table \IDA that is the average of four values. This row can then be used for a plot in ...
0
votes
0answers
56 views

Stacked Barplot inside Table in Latex [duplicate]

I would like to plot stacked bar plot inside table in latex. I have code which plots two different bar plots inside table. But i want to plot single barplot with stacked bars. How can I do it in ...
2
votes
1answer
142 views

How to plot stacked bar plot inside table?

I have following code in Latex. Which plots only one data series (data2). I would like to plot staked bar plot inside table for both data1 and data2 with different colours. Any ideas.? Many thanks. ...
5
votes
2answers
85 views

a table with cell \pm another cell using pgfplotstable

Say, i have a text file 10.0123235 5.0234324 11.2342345 6.02343256 where the first column is value and the second is a standard deviation. I am trying to figure out how to automatically put it ...
8
votes
3answers
236 views

How can CSV files be put into LaTeX without having to adjust much?

I would like to have a TeX-Snippet that takes a filename as an argument and outputs a table with toprule and bottomrule: \begin{tabular}{lrr} \toprule Fach & Dauer & Einkommen\\ ...
1
vote
0answers
69 views

pgfplotstable manually declare row data

I'm trying to load data into somes tables using pgfplotstable. My problem is that the data in the files is in a bit of a different format than the way I want to present it in the table, and after I ...
1
vote
1answer
302 views

PGFplotstable: using a csv file with 4 columns

Suppose I have a csv file with no titles in it just data. The first column is time (x axis) and the next 3 columns each construct a different set; that is, plot(t, col1) is one set of data, plot(t, ...
3
votes
1answer
224 views

Linear regression in a loglog-plot with fixed slope

Goal: create a plot to compare the empirical convergence rate of a numerical method with the one expected from the theory. Accordingly, given a loglog-plot, I would like to add the line which has a ...
1
vote
0answers
80 views

Pgfplots working as standalone but not in main document

Update 1 The data file can be downloaded here> 11855-4_RT.dat Original: In my main document I have been including a pgftable as: \SSTeTableTypeT %contains \pgfplotstableset - included in the end of ...
8
votes
2answers
214 views

How to do linear regression in pgfplots for data with nan?

I am trying to use pgfplots to plot a linear regression to my data. If there is a nan in my data set, no fit is generated, with the warning: NOTE: coordinate (1,nan) has been dropped because it is ...
2
votes
1answer
84 views

How to change font family LaTeX plot?

I want to change the font family of the bar plot to Helvetica fonts. I have tried using the following code but it only changes axis fonts and not the data labels inside the plot: ...
1
vote
0answers
88 views

pgfplotstabletypeset verticle alignment of cell contents, plus horizontal lines

I am using pgfplotstabletypeset to read contents of a csv file and typeset (In the MWE below instead I copy/pasted the contents of csv file, to make it easier to test the MWE). I have some content ...
3
votes
0answers
89 views

PgfPlots bar with missing data causes columns to be “misplaced” [closed]

I looked for a similar problem here in SE but I couldn't find it. It's just driving me crazy :| Here is a MWE: \documentclass[xcolor=dvipsnames, 10pt, pdflatex]{beamer} \usepackage[utf8x]{inputenc} ...
3
votes
0answers
93 views

Redefinition of pgfplotstableread and inline tables

I had to redefine pgfplotstableread because I use it in standalone files in an extra img/ folder that loads data from a different data/ folder as follows. \begin{filecontents}{plot.tikz} ...
2
votes
1answer
109 views

How to add font commands to a pgfplotstable header cell?

I'm trying to change the cell color and text color of the header of a pgfplotstable. Changing the cell color is not that much of a problem because I can just prefix the row with \rowcolor: ...
1
vote
0answers
114 views

PGFPLOT Externalization not working [closed]

I am trying to externalize PGF Plot to be saved as EPS file using latex and enabled shell-escape. \documentclass[a4paper]{article} \usepackage{lipsum} \usepackage{tikz} ...
13
votes
2answers
174 views

'e+08' (don't suppress 0) notation in columns with S-specifier

for symmetry reasons in a large table I want the scientific format with 2 digits (i.e. e+08). By default it suppresses the 0. Here is what I do: \documentclass[]{article} \usepackage{siunitx} ...
5
votes
3answers
350 views

Fill the area under minimum of two functions using tikz and pgfplots

I am loading two curves from a file and plot them with \addplot table [...] {the table.txt}; I have managed to fill the area under a single curve, but I want the minimum of the two curves filled. What ...
4
votes
2answers
112 views

How to eliminate a annoying amount of white space between bars in bar plot?

I have removed one row of data from a file, but I cannot find way to get rid of the white space in the center of the plot. Reducing the width moves the bars outside of the graph, and the only way to ...
3
votes
1answer
170 views

Unable to read in text labels for pgfplots bar chart

I've started using pgfplots and can plot scatter plots where all data is numeric, but I'm having no luck at all with bar charts where the xlabel is text. I've tried to find a solution in the manual ...
3
votes
1answer
140 views

Making a stacked bar chart

I want to transform a set of barcharts (such as in the subset in the MWE below) to a stacked bar chart which is more legible, as in this example: \documentclass{article} \usepackage{tikz} ...
4
votes
1answer
147 views

read table from file , each row different number of columns

I have a data file where each row has a different number of columns, like this: x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ...
7
votes
0answers
197 views

Automatically add discontinuities in some plots [duplicate]

I have multiple plots (about 15 different figures) that have the same axes (i.e., same ymin and ymax values and same xticks). One of the plots has very large values. I don't want to either increase ...
11
votes
1answer
406 views

PGFPLOTS: Show x labels for every second tick

How can I show xaxis labels for every second data in this dataset. I want a bar for each tick, but not a label. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
1
vote
1answer
136 views

Number of rows in loaded table

Is it possible to determine the number of rows in a table read by pgfplotstableread{values.dat}\val ? My setup is the following. I make experiments to see how a parameter affects a convergence ...
8
votes
1answer
138 views

Help with a simple bar plot

I have some data in a table; the first column has some names; the second column associates a "category" to each name, and the third column associates a "section" to each name. All entries are ...
1
vote
0answers
23 views

How to draw a bar chart from multiple measurements with mean and variance [duplicate]

I have a few hundred measurements in a simple CSV file. I want a bar chart which indicates mean and variance pretty much like this: I've browsed various archives, such as the PFG plot gallery, but ...
2
votes
1answer
70 views

Trouble including graphics from csv file into Pgftable, commands are dissapearing (local maybe?)

I've been trying to add eps graphics with the filename in a csv file. Take a look at the CSV to get an idea of what I mean: ...
3
votes
2answers
299 views

pgfplotstable column width & row height

I am drawing a large heatmap containing only colors using \pgfplotstabletypeset. The table contains 103 columns, and 111 rows, which I am trying to squeeze in the area of 13cm * 16cm. In order to save ...
3
votes
2answers
170 views

Custom axis line location for PGFplots table with tikzpicture

I am trying to change the axis y line location from 0 to 100 from these questions (1, 2). Say that the error bars represent confidence intervals on percentage scale, so 100% is no difference. Here is ...
2
votes
0answers
95 views

Pgfplots: date range and integers as input data

I have a data table that looks something like: Week,value 2010-01-03 - 2010-01-09,0 2010-01-10 - 2010-01-16,0 2010-01-17 - 2010-01-23,0 2010-01-24 - 2010-01-30,0 2010-01-31 - 2010-02-06,0 2010-02-07 ...
3
votes
1answer
231 views

\pgfplotstabletypeset heatmap: logarithmic scale

I am trying to create my own rendition of this heatmap. My values range anywhere from 1 to 783764. I want to plot them as colors on a logarithmically (base10) scaled colormap. So the values' ...
2
votes
1answer
124 views

Pgftables: How to automatically add row headers?

Here is a MWE: \documentclass{article} \usepackage{pgfplotstable} \begin{document} Here is the multiplication table in roman numeral. \pgfplotstabletypeset[string type]{ i ii iii ii iv ...
1
vote
1answer
144 views

Align table side by side with graph

I'm trying to get my csv table aligned to the left of my graph. The graph is appearing below (and indented) the table. Any ideas? \begin{minipage}{0.5\textwidth} \pgfplotstabletypeset[col sep=comma, ...
6
votes
1answer
134 views

How to align two PgfplotsTable objects with graphs?

This is a follow-up for the fantastic question and answer here. I have been struggling with this so long that I would really appreciate help. Say that I have two datasets that are related, but on ...
3
votes
0answers
192 views

Conditional formatting, rounding and postprocessing of a column in pgfplotstable

I want to round p-values in a table to two decimals (for example 0.05), have values less than 0.05 in bold font and have values less than 0.01 to come out as '<0.01' in bold font. Like this (the ...
3
votes
1answer
115 views

pgfplotstable: using one column to control style of another

I want to print a pgfplotstable where one column (which is not printed) used to change the style of another column. In my MWE below, I want to change the font= style of select values in the Item ...
1
vote
0answers
56 views

Auto-coalesce same values into \multirow

I am generating a pgfplotstable from a data file. In that file, within the Class column, subsequent rows with the same value should automatically be coalesced/collapsed/joined to form a ...
2
votes
1answer
87 views

pgfplotstable: not printing string type values

I have some data in a csv file I wanted to turn into a table, but pgfplotstable does not print any string type values. All I'm getting is the numbers, but I also need those string values. The example ...
2
votes
1answer
281 views

pgfplots: marker size relative to interval size

I am trying to create a ybar interval pgf plot with horizontal lines as markers on top of each interval/bar. Intervals widths are specified by my external CSV data file. I defined my own plotmark ...
6
votes
1answer
125 views

Macro expanding to comma separated list

I'm trying to use a macro for pgfplotstable labels but the macro is treated as a single entry of a csl rather than a csl. The Question asked in Using a macro as value of addtotoc in \includepdf ...