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

3
votes
1answer
36 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
0answers
14 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
50 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
32 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
21 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
54 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
74 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
72 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
67 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
43 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
12 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
41 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
46 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
53 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
41 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
36 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
48 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
37 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
75 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
62 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
42 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
30 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
131 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
350 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
126 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
29 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
36 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
88 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
59 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
31 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
112 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
34 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
39 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
93 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 ...
2
votes
1answer
51 views

How to only calculate set fields with pgfplotstable?

I have the following MWE: \documentclass{standalone} \usepackage{tikz, pgfplotstable} \pgfplotsset{compat=newest,compat/show suggested version=false} \begin{document} \pgfplotstableread{ ...
1
vote
0answers
43 views

pgfplotstable: How to get 'column name' with 'pgfkeysgetvalue'

In a table \pgfplotstableread[header=true]{ A B 0 0 -1 1 3 2 }\test I want to set the entries of the head row A an B as column names. I think, this can be done with assign column name/....
5
votes
1answer
46 views

Disable scientific number format on pgfplotstable

I am trying to do the following: Read data from a file [CSV] Add a calculated row to it [C] Transpose the data Plot the data Display the data in a table Everything works so far, but the calculated ...
2
votes
1answer
91 views

Equation with summation - regression plotting - pgfplots

I am trying to 3D plot the below equation in tikz. I have basic premise setup like this, with sample set as datatable. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \...
2
votes
1answer
53 views

pgfonlayer pgfplotstableforeachcolumnelement issue

This is the continuation of this issue and this, where I try to draw normal distributions along the regression line for different x values in 3D. The problem now is, for all distributions, I try to ...
1
vote
1answer
48 views

pgfplotstable: How to use 'pgfplotstablename'

How can I use \pgfplotstablename in this case \pgfplotstablegetelem{0}{[index]1}\of\TestTable instead of \TestTable? MWE: \documentclass[border=5pt]{standalone} \usepackage{pgfplotstable} \...
2
votes
2answers
50 views

pgfplotstable: How to get header-elements?

How can I replace e.g. the 'zeros' by the cell content of the current header? \documentclass[border=5pt]{standalone} \usepackage{pgfplotstable} \pgfplotstableread{ A B 1 2 0 2 1 0 0 2 0 ...
0
votes
1answer
18 views

Keep original head row when transposing twice with pgfplotstables

I'm trying to add rows to an existing pgfplotstables. So I'm using the method using twice pgfplotstabletranspose. But it adds a new head row. I would like to delete it in order to keep the original ...
0
votes
1answer
65 views

pgfplotstable: How to add variable names (x_1, x_2,…) on each column?

I would like to create a System of linear equations indeed with pgfplotstable. How can I add names of variables (x_1, x_2,... or something else: x,y,z), if some strings have been replaced? string ...
1
vote
1answer
119 views

pgfplotstable: change some cell contents

What do I have to do, if I want to have a 'gap' or a word e.g. 'zero' in a cell, if it's value is equal to 0? preproc/expr={##1==0 ? "111" : "##1"} works but something like preproc/expr={##1==0 ? "{}"...
2
votes
1answer
41 views

Filled area behind bar plot from table data

I have the following MWE where I want to place the data from file myintervals.csv as filled area behind my bar plot. There is a problem with expandable macro here, but I don't get it working correctly:...
0
votes
2answers
61 views

remove row from pgfplotstable macro

I've got to a point where I have some data stored in a pgfplotstable macro. I want to remove a row from that macro (a line where some data is missing) and then further process the remaining data (...
1
vote
0answers
40 views

tikz/pgf: table below graph [closed]

Currently looks like: Code: \documentclass[a4paper]{article} \usepackage{siunitx,tikz,pgfplots,pgfplotstable} \begin{document} \begin{minipage}{.4\textwidth} % some text before... Calciumcarbonat: ...
2
votes
2answers
105 views

Column width and row height with pgfplotstable

I'm looking for a way to change row height or width with pgfplotstables. Even in the pgfplotstables manual I cant find anything about this matter. I found a topic about this here but the only answer ...
0
votes
1answer
35 views

Using symbols in columns with pgfplotstabletypeset

I'm using pgfplotstabletypeset to get datas and store them in a table. Everything is working great. But when I'm trying to use the symbol delta ($\Delta$) in the columns of my table, it doesn't work ...
1
vote
2answers
60 views

pgfplotstables / amsmath: How to put in group-brackets into a pgfplotstable?

I read this thread and ask myself: How can I set bracktes of the \lgroup, \rgroup kind into a pgfplotstable? BTW: In this MWE below, I wrote the group-commands directly in the table; furthermore, I ...