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
38 views

PGFPlots - Missing number, treated as zero error - when loading data from file

I am drawing a heatmap/scatter plot with the mark colour determined based on a score. I have mapped scores to Red, Green and Blue values, and trying to colour the marks based on the RGB values. The ...
2
votes
1answer
45 views

Pgfplots Scientific Notation 2^x

I am plotting a logarithmic graph and since the values are relatively large, pgfplots is outputting the values in the y-axis in terms of 10x . However, I'd like to output it the format 2x. I read the ...
2
votes
1answer
36 views

Bar graph with bars containing boxed strings

I have a .csv table containing both categorical and numeric data. The first column contains the categories, which are expressed as strings. The second column contains the number of observations that ...
0
votes
0answers
32 views

How to create pgfplotstable from the intersection of two pgfplots?

I am trying to find the intersection 2 plots in pgfplots and extract the x-values onto a pgfplotstable? Here is a code where Symm and Load plots intersect and I could to get the x-value of ...
1
vote
1answer
27 views

Bold font within pgfplotstable header row

I like to have a definition within the pgfplotstable header row turning the header text to bold font face. Somethng like: every head row/.style={before row={\toprule}, after row=\midrule, \textbf{#1}}...
1
vote
0answers
35 views

How to Calculate x-Position in a pgfplots with Information from a Table

Situation and Problem This question is a follow-up and based on marmots answers to this question and this. The general situation is described there. Now I want to simplify input. More specifically I ...
1
vote
1answer
27 views

How to specialize marker style depending on point meta class?

Situation and Problem This question is a follow-up and based on marmots answer of this question. The general situation is described there. I modified the markers as in this answer, but could not make ...
0
votes
1answer
103 views

How to include standard error of the slope in pgfplots?

I am trying to include the standard error of the slope as "slope +- error...> 1.65 +- 0.017" and also a line fit instead of mark=x over the log-log plot. But I cannot calculate the error and ...
0
votes
0answers
26 views

Tables in LaTeX with conditional formatting (coloured data bars) [duplicate]

In a report, I need to show some tables with numeric results. I've obtained these tables in MS Excel/powerBI, and would ideally like to re-create them in LaTeX for stylistic and flexibility reasons. ...
3
votes
2answers
49 views

How do I keep the mantissa, and get rid of the exponent, in PGFPlots?

I am plotting the distance between the Earth and the Moon, and the lunation cycle for three years, 2018–2020 inclusive, and these distances are on the order of 10^5 km. Ideally, I'd like the exponent ...
1
vote
1answer
28 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
32 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
82 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
36 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
38 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
45 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
25 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 ...
2
votes
1answer
29 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 ...
2
votes
3answers
70 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
52 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
36 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
37 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
37 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
36 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
39 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
31 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
52 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
32 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
73 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
41 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
50 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
104 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
99 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
204 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
86 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
51 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
28 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
54 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
93 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
77 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
44 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
90 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
49 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
122 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
129 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
54 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
35 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. \...
6
votes
2answers
171 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
487 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} \...