Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

1
vote
1answer
21 views

pgfplots: print rounded values with statistical errors in parentheses

I recently discovered pgfplotstable and it is great to typeset auto-generated tables. Consider, for example, the following MWE: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \...
1
vote
1answer
22 views

Precision difference between \pgfmathsetmacro and \pgfplotsretval

I am currently working on some datasets with pgfplots and pgfplotstable. At some point, I need to store some cell values for mutiple uses so I use a \pgfmathsetmacro{\somevar}{\pgfplotsretval} call. ...
3
votes
3answers
76 views

Append unique characters read from filecontents to a string

I have a list of 2-character strings that is read from table, e.g. \begin{filecontents*}{attributetools.dat} Attribute SL SK MC SL AA PT SK UP MC \end{filecontents*} I want to create a string that ...
1
vote
1answer
31 views

Creating a unique list from two tables read from filecontents

I have two tables.. one contains attributes with values e.g. Name percentage Atr1 80 Atr2 20 Atr3 50 and the other one contains tools for that attribute Attribute Tool Atr1 SK Atr1 SL ...
1
vote
1answer
34 views

How to partition a pgfplotstable to use in multiple tikzpictures? (and duplicate a row)

I'm trying to create multiple plots from one pgfplotstable (\data below). I can create the plots by manually editing the data (\dataA and \dataB below) but this is error-prone. Essentially, I need ...
3
votes
1answer
39 views

Empty line treatment when reading tables in pgfplots

I have the problem that in some scenarios plots from tables are not drawn if empty lines are in the read input file. Boundaries etc. are drawn and set correctly and no errors are shown in the log. ...
0
votes
1answer
23 views

Extracting values from pgfplotstable into array of variables based on condition

I have data regarding Attributes and Values, e.g. Attribute Abbreviation Value Atr1 Abb1 20 Atr2 Abb2 0 Atr3 Abb3 60 Atr4 Abb4 0 .... Based on the value of the attributes, I should display the list ...
1
vote
1answer
21 views

Error interacting with `visualization depends on` with `values` and `pgfplotstable`

Problem When changing the values of the markers on a scatter plot using the visualization depends on key and when the data comes from a \pgfplotstable the marker printing is broken. If I have the ...
3
votes
3answers
67 views

Plot data from external file with floating numbers

I found yesterday this beautiful simple code: \documentclass{article} \usepackage{pgfplotstable} \usepackage{pgfplots} \pagestyle{empty} \begin{document} %\pgfplotstabletypeset{data.dat} \vspace{...
3
votes
1answer
33 views

Pgfplotstable: Subtract two columns from two different tables

I am trying to improve my workflow in LaTeX using pgfplotstable to also include automatic error calculation. Right now, when I run a simulation, I save the output to a csv table, which I load into ...
1
vote
1answer
27 views

pgfplots nodes near coords overlap when fixed, but other labels are misaligned?

The nodes (data labels) are being covered up by the error bars. I tried fixing this with: every node near coord/.append style={rotate=90,xshift=+0.7cm,yshift=-0cm} But, when I did this, the other ...
1
vote
0answers
28 views

Heat map with labeled rows and columns [duplicate]

I want to create the following image in TikZ/PGFplots. Questions such as this are a good start, but I am not clear how to modify them to include row labels. A straightforward addition of rows, such ...
4
votes
1answer
28 views

pgfplotstable adding vertical space between fractions

MWE % stand-alone file to test writing a table in pgfplotstable \documentclass{book} \usepackage{booktabs,multirow} % required \usepackage{pgfplotstable} \pgfplotsset{compat=1.16} \begin{document} %\...
1
vote
1answer
31 views

Grouped bar chart in pgfplots from file selecting certain rows

I want to create a bar chart from the following data, using the column difficulty to select rows from kappa. I hope to avoid having to type out the contents of the csv file in a series of add plot ...
1
vote
1answer
34 views

Using pgfplotstable inside tabular environment

Is there a way to get a table created with pgfplotstable inside another tabular environment. I'm trying to get multiple subtables in multiple columns. The following simplified version does not work. ...
1
vote
1answer
27 views

PGFPlots grouped bar chart with error bars providing additional information above, convert point to string in comma for display

How can I get comma as a decimal separator in my upper axes (the number above the major grid)? All suggestions to improve the graph are warmly welcomed. basic requirement using .csv data with (long)...
3
votes
1answer
47 views

Plot level curve using data from pgfplotstable

I have some data from some numerical experiments stored in some csv files, which I read into LaTeX using \pgfplotstableread{Results/test.csv}\data These data consist of x, y and z coordinates and I ...
1
vote
1answer
30 views

pgfplotstable - Error while transposing a CSV table which is read from disk

I want to read a CSV file from disk and then transpose the table that I read. When I create the table in my document, there is no problem with pgfplotstabletranspose command. However, when I try to ...
2
votes
1answer
65 views

How to select a range of data in tikz-pgf?

This is a subset of my table that I want to use to create a stacked bar chart: Is it possible to select columns A through F for the first two rows and then select column G for the other rows to ...
1
vote
1answer
38 views

How to switch row/column in a stacked bar chart

This is my MWE: \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label First Second Third Yes 0.1 0.3 0.3 No 0.9 0.7 0.7 }\datatable \begin{...
1
vote
0answers
36 views

Plotting a Histogram (pgfplots) from a CSV file with Single Values [duplicate]

I'm trying to create a histogram from a CSV file of single values like this: 2, 3, 2, 5, 2, etc... I also have a copy of this file in a similar layout that has just single numbers next to their ...
0
votes
1answer
96 views

pgfplots: by row, ranking particular column

I have a dataset in which rows indicate years and columns firms. For each year, I want to plot the 1st firm's rank against the others. In the example below, 2013 is tied for 5th (if this is too ...
2
votes
1answer
86 views

SourceSansPro: tabular numbers in a beamer presentation

I'm displaying some data with pgfplotstable in a beamer presentation for my history lesson. The main font is SourceSansPro. I'm using it with \usepackage[semibold]{sourcesanspro} with default lining ...
2
votes
1answer
157 views

Change Column Name and Cell Value Pgfplotstable

I have this csv file: ,Accuracy 1,0.982 2,0.982 3,0.982 4,0.988 5,0.916 6,0.976 7,0.958 8,0.97 9,0.945 10,0.988 11,0.969 This is the screenshot when I imported it into Latex file: This is the ...
1
vote
1answer
81 views

Using Slashbox/Diagbox in Pgfplotstable

I have a csv file in this form ,0.01,0.1,1.0,10.0,100.0 0,0.3837,0.8259,0.9386,0.9386,0.9386 1,0.3837,0.9464,0.9386,0.9386,0.9386 2,0.3976,0.95,0.9386,0.9386,0.9386 3,0.8259,0.9386,0.9386,0.9386,0....
2
votes
1answer
49 views

pgfplotstable: highlight entire rows and columns

This is a follow-up on this question. With pgfplotstable, I would like to create a style to highlight an entire row and/or column. Zarko's answer at the linked question shows how to bolden an entire ...
0
votes
0answers
23 views

pgfplotstable: How to make and format a multi-line header with math entries

My Code: \documentclass[12pt,a4paper,oneside,titlepage]{article} \pagestyle{headings} %\setcounter{page}{1} \pagenumbering{arabic} %\pagestyle{arabic} %\usepackage[a4paper,left=1.25in,right=1.25in,...
1
vote
1answer
48 views

Mix numbers and strings in same column

I have a table that has both numbers and strings in one column. How can I use pgfplotstable to display them both? Of course, one way would be to simple delete the strings: \documentclass{article} \...
2
votes
1answer
66 views

How do I display only certain rows in a table using pgfplotstable?

I have a table, read from a file, and I would like to display only rows which have a specific value in a given column. The specific value is a string (e.g. Agricultural). I am able to do it using the ...
0
votes
2answers
69 views

pgfplotstable: How to output a table with some empty cells in header row?

I want to output a simple table using pgfplotstable with first two cells in the header row are empty as given in the following figure: What is the simplest solution for this? Regards, Jamil
2
votes
1answer
42 views

Why 'X Group' and 'Y Group' does not appear on this pgfplot?

Why X_Group, Y_Group does not appear in this pgfplot example? I tried to change the below reference slightly, but my example does not show the grouping as in the example. Reference: https://tex....
0
votes
1answer
38 views

Help on creating a table

I need your help please on creating a table as shown in the following picture. I can create a basic table but I am having problem with the subcells in the middle of it. I will fill this table with ...
1
vote
1answer
78 views

The style of plot line changes if \addplot+ order changes

I have a weird issue with this simple plot. I need to draw four couples of plots, each made by an approximate curve (continuous line) and the real curve (dashed line). For some reasons I can't ...
3
votes
1answer
44 views

Pgfplot: remove tick elements on axis

I am trying to plot a graph using pgfplots. The plot is fine, my only concern is about the fact that I don't have, let's say, a linear x axis: I have the following elements: 1,2,4,5,7,8,9,10,12,13,14,...
1
vote
1answer
115 views

Include negative value in sum/total value in stacked bar chart

I have a stacked bar chart that looks like this. However, I'm trying to include the negative values (ninth column in the datatable) into the total value on the stacked bar chart so that in the end ...
1
vote
1answer
101 views

Stacked bar chart, nodes near coords remove small values and show sum

I know it is possible to have only the sum shown on top of the bar chart and remove the other values in the stacked bar chart (as shown in picture attached), but I can't figure out what went wrong in ...
0
votes
1answer
49 views

Get values (floating type) from pgfplottsables

I'm trying to get certain values from a table a created from a csv file. I'm want those values to plot them. The problem is when I'm extrating those values, it seems that they are no longer a floating ...
1
vote
1answer
33 views

label text into x-axis instead of numbers pgfplotstable

Does anyone know how can i enter text into the x-axis ? It seems like only numbers are allowed as soon as i wanted to enter alphabets it will be an error. This template was adapted from here. \...
7
votes
2answers
165 views

How to represent discontinuous data (Interrupted Plots) with pgfplots?

I want to plot a large set of data points generated from a numerical experiment. The plot looks like a step function, that is, for an interval in x-axis, it takes a constant value. The code is (for ...
9
votes
1answer
458 views

Creating a tube plot from external data with pgfplots and tikz

I have the following MWE \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.8} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture} \...
3
votes
1answer
149 views

Plotting a 3D data-set from a .csv file

I have a .csv with 2-dimensional data. Now I am trying to plot it in different index ranging from -n:1:n (this index is y-axis). \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \...
1
vote
1answer
42 views

How to add Error Bars to PGFPlots graph data that isn't in table form

I am making a graph in PGFPlots, and I have many lines along my axes. My MWE contains two. Each have different error value, and my data are in coordinate form, not in table form. Would I have to ...
0
votes
1answer
50 views

Missing } inserted. in legend refernce. error during 2nd compilation

I am running into the following problem and hope that you can help me as my dead line is just around the corner and suddenly i have got this problem. I am using Texmaker with Miktex and i try to ...
5
votes
2answers
95 views

What is the difference between storing table data by filecontents and pgfplotstableread?

In this MWE, the table data loaded from poles.dat is successfully parsed as shown in the left plot. However, storing the same data inside a macro using \pgfplotstableread doesn't result in the same ...
1
vote
0answers
66 views

Rainbow CSV\TSV Style with pgfplotstable

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 ...
2
votes
1answer
35 views

Multi-line column names

I currently have: \documentclass{article} \usepackage{filecontents} \usepackage{filecontents} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{filecontents*}{rawdata.txt} ...
7
votes
1answer
153 views

pgfplotstable - remove space before first and after last column - @{}

I am using pgfplotstable and I want to remove the space before the first column and after the last column. In a regular tabular environment I would just use @{} twice in the argument. \documentclass{...
0
votes
1answer
36 views

dimension to large in pgffor

I have this error: Dimension to large. } the code is: \documentclass{report} \usepackage{pgffor} \parindent=0cm \begin{document} \foreach \n in {1,...,20000}{ Hola a todos. el numero es \n \\...
2
votes
1answer
44 views

Help with pgfplots

Is it ok to ask several questions? There's like a 40 minute wait time before asking another one, I think. And yes, I did try to read the documentation, but I couldn't really find the information ...
2
votes
2answers
104 views

A custom table using TikZ instead of tabular

How could I create a table like below using TikZ? I tried using matrix, but could not get rid of few table lines like below. It might be easier in tabular LaTeX, but I want in TikZ because I could ...