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
3 answers
72 views

How to plot the following graph

I am new in latex and learning the plotting, I am trying to plot $y=x^2$ where xmin=0 and ymin=0 but I don't want numeric points on the axis instead I need (k,0) and (0,k) and a line joining these two ...
1 vote
1 answer
24 views

How to add decimals in \pgfplotstableread?

How to add decimals in \pgfplotstableread? The following code works without decimals... \pgfplotstableread[col sep=comma]{ label,startyear,endyear D, 2003, 2008 E, 2008, 2011 F, 2012, 2014 G, 2013, ...
  • 185
2 votes
1 answer
42 views

"Dimension too large" error in "How to create a multiline timeline"

I am trying to adapt How to create a multiline timeline to my case. If I try to get larger scaling factor for x-values (years), i.e. from 0.28 to any higher value \pgfmathsetmacro\yearscale{0.28} % ...
  • 185
1 vote
1 answer
41 views

Logarithmic plot using tikz ung pgfplots

I want to draw a logarithmic plot of wavelength and frequency. The x and y axes show an exponential plot. I want the representation to be a simple number. How do I change the labels on the axes? Since ...
  • 141
0 votes
1 answer
33 views

Stacked bar chart from data table, formatting of point meta

I've got a data table with multiple y values per x that I have arranged as a stacked bar chart. It seems that pgfplots can calculate percentages from absolute values, but I calculated the percentages ...
  • 987
0 votes
0 answers
19 views

Setting table textwidth with \pgfplotstable

I am trying to fit a table into textwidth using pgfplotstable. The code I found in this forum (here) somehow produces red lines and I do not know why this is the case. This is how the results looks ...
  • 1
0 votes
1 answer
28 views

PGFPlots : colormap as a function of row index

I am plotting a list of points from a file with pgfplots and would like the color of the marks to vanish (color gradient from green to white) in their row order. I did not manage to find the metric ...
  • 2,164
2 votes
1 answer
62 views

How to extend logarithmic pgfplots to values below 1?

This is a follow up to another question. I basically want to extend x-axis to log values below 1. This works great for the x-axis (xmin=1e-3, xmax=1e7) itself, but when I try to extend the colored BB ...
0 votes
1 answer
51 views

Let a line make an angle with respect to coordinate system

I want to draw an asymptote to indicate the blue line to follow a certain path. However, the asymptote seems to shift as I adjust the height and width of the plot. I have tried to make everything ...
1 vote
0 answers
57 views

How to add a shaded confidence interval to a pgf plot from a csv file? [closed]

Here is the file: data I can't get the following code to work. Apparently adding and subtracting the rows is the problem. Am I missing something here? \documentclass[crop,tikz]{standalone} \...
0 votes
1 answer
51 views

Problems using Contour Plot

I am new here in the forum and hope you can help me with a problem with Tikz. My goal is to create a map (see attached image for template). Unfortunately, I am having trouble getting the colors to ...
2 votes
1 answer
44 views

PGF boxplot prepared including outliers from file

This question is basically a continuation of this answer. How can I handle outlier data in PGF boxplots, supposed my input table looks like this: \pgfplotstableread{ index lw lq med uq uw out1 ...
0 votes
0 answers
16 views

PGFPLOTSTABLES extracting multiple tables within a single .csv file

I am looking to call pgfplotstable for one .csv file that contains multiple tables. I am having trouble having the package find the subsequent header lines to start a new table. Is this even possible ...
  • 1
0 votes
0 answers
22 views

How to transpose row-oriented data using pgfplotstabletranspose?

Here is a minimal example: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[col sep=comma]{ x1, 1.2405, 1.8201, -0.0102, 1.3856, 1.1426, 0.4152 y1, 2....
  • 684
4 votes
1 answer
70 views

Plot several connected points

I have the following code, a minimal working example only with 10 points: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{calc} \usetikzlibrary{positioning} \begin{document} \...
3 votes
2 answers
98 views

Hyperrefs from scatter plot to text

Using this example for a scatter plot, I hacked together a working plot for my document. To perfectionize my plot, I would like to have each plotted point (circle or square) to also be a hyperlink to ...
0 votes
2 answers
75 views

Transpose and make table with small text in corner + big text

Ok, this is what I want to make: But I'm struggling with understanding how to make this from an external CSV file. I have this approach because the book will be driven by external files which is ...
1 vote
0 answers
19 views

pgfplotstable: How to use \pgfplotstablevertcat in a loop

I know there are other options too. But I was wondering: How can I create one-row tables in a loop and then add them to the previous total table? In the following attempt, only the current loop value ...
  • 6,357
1 vote
0 answers
31 views

Any way to swap rows and columns in pgfplotstable?

I've got a simple table that's made by pgfplotstable by pulling from a fairly large csv file. The table is vertical like the data provided but since it's only two columns, and several rows I'd rather ...
  • 21
0 votes
1 answer
59 views

How to add different values of error bars in both y- directions from a csv file in pgfplots?

I have a working code. Unfortunately though, it appears as if the error bars are being added twice. Once in blue and once in gray. I don't understand what is causing this. How can I fix it? Here is ...
0 votes
0 answers
30 views

How to annotate in plot and colorbar

Well, I wrote this MWE \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotstableread[col sep=comma, header = true]{ label, angle, tempo, coef Cx-1, 45, 1....
1 vote
1 answer
54 views

Using addplot and pgfmathresult for color

I could use some help. I am trying to color a bar chart assigning different colors using a foreach loop and pgfmathresult to get a color gradient. Here is a minimal example: \documentclass{minimal} \...
  • 145
0 votes
1 answer
55 views

How to automate table generation via function or macro

This should a simple question with a simple answer but I couldn't find something related to this online (being also a TeX newbie...). I am trying to automate table generation so that I can avoid copy ...
  • 3
0 votes
1 answer
35 views

Stacked bars first segment botched

I want to create normalized stacked bar graphs in my document. Somehow the first segment of the bar graphs gets botched, though. What causes this error? My Code \documentclass{standalone} \usepackage{...
0 votes
0 answers
63 views

Hide part of a document but process the side effects

This is a follow-up on the answers here. I found two cases where the proposed solutions fail, and I am looking for ways to address it. Consider the MWE: \documentclass{article} \usepackage{etoolbox} \...
  • 1,609
2 votes
1 answer
41 views

newif for table does not work

I create two different table contents and want to switch with a newif. \AAAfalse has no effect. What do I have to do? \documentclass[a4paper, landscape]{article} \usepackage{pgfplotstable} \...
  • 6,357
0 votes
0 answers
66 views

Exponential trendline to best fit I-V curve data

I am trying to plot a best-fit trendline to an I-V curve for a Zener diode. The data is exponential so linear regression is not suitable in this instance. Here is my data. The important columns are 2 ...
2 votes
0 answers
21 views

Change the "row index counter" at pgfplotstable

Is it possible to change the "row index counter" (locally) at pgfplotstable. Maybe as a style? As a test example: I skipped some rows in the second table. If the "row index counter&...
  • 6,357
3 votes
3 answers
162 views

Distribute very long table to multicolumns

I have a table with 102 rows (102 = 17 x 6). How can I put that into a multicolumn-environment with 6 columns which have 17 rows each? With other words: How can I enforce a column break after each ...
  • 6,357
1 vote
1 answer
105 views

How to calculate the column sum in an expression when plotting a table?

I have some data as a table, as seen in the code below. The second column is the y-axis. The entire column sums to 100. For each y value being plotted, I'd like to plot y_value / y_total e.g. 10 / 100,...
  • 135
0 votes
1 answer
51 views

Uphold the original numeration when using 'skip rows between index'

I have the same table (with n rows) several times and I want to highlight some rows. But I need to skip some rows in each case (i.e. 'skip row 0,...,x' or 'skip row x,...,n' etc.). That means ...
  • 6,357
0 votes
0 answers
17 views

pgfplotstable: Find and read out changes of cell entries row per row

I have a table and there is exactly one cell-entry-change from row to row. If I look into only one column, I can read out the change, if there was one: But how can I find and read out the change ...
  • 6,357
1 vote
1 answer
31 views

How do I add a legend to the appropriate line in PGFPlots?

I've added a linear regression to my plot and I'd like to call out the linear regression as well as the formula for the line in my plot. How do I do that? I know it's super close to the actual data ...
6 votes
2 answers
531 views

Why doesn't this \foreach work?

I don't understand why this doesn't work. I changed x to y and z but it didn't work. Any ideas? \documentclass[11pt]{article} \usepackage{pgfplots,pgfplotstable} \pgfplotsset{compat=newest} \begin{...
  • 401
1 vote
1 answer
77 views

How to achieve reliable tables with multiple captions with pgfplotstable and longtable?

For a project I am working on (see also my question about setting the column type in pgfplots procedually), I would like to create a wrapper macro \fancyTable, which calls pgfplotstable in the ...
  • 95
1 vote
1 answer
209 views

How to procedually set column type in pgfplotstable for each column individually?

For a project I am working on, I would like to write a wrapper macro \fancyTable, which communicates with pgfplotstable in the background. The user should be able to specify the column alignment as a ...
  • 95
1 vote
1 answer
87 views

If condition in edef

I have a code to calculate the divided difference for the interpolator polynom below: \documentclass[tikz,border=5]{standalone} \usepackage{tikz} \usepackage{amsmath} \usepackage{fp} \usepackage{xfp} \...
1 vote
0 answers
52 views

How to add a footnote inside a pgfplotstable from a csv?

I am writing CSV files with Python 3 and inserting the CSV in a .tex file with pgfplotstable. I want to have footnotes for some of the cells (*, **, †, etc.) I can easily replace them in my Python ...
0 votes
1 answer
151 views

How to normalize dataset in correct way using pgfplots?

I have a large dateset where one column is: 1 1+n ... n I need to draw plot with coordinates from 0 ... 1. How do to it with pgfplots? Need to produce plot with y (second column) from 0 to 1. My ...
0 votes
1 answer
104 views

Get y value of linear regression plot at xmax

I'm creating a dynamic LaTeX (LuaLaTeX) script, which is creating a plot out of a given CSV file. Settings like xmin, xmax etc. depend on that CSV file. That CSV file contains the storage utilization ...
1 vote
1 answer
45 views

Table with pgfplotstable with inline data incomplete

I am trying to typeset a table with inline data. The file gets compiled fine but the table only has the head row and the last row. There should be at least another row in there but it is not. I am ...
0 votes
1 answer
44 views

I can't put my numbers on a table to be displayed in a scientific format with precision of 4 numbers

I am trying to make a data table with a data set and change my numbers display style. I have this data set \begin{filecontents*}{tabel_1.dat} I[$A$] B[$T$] 0 0 2 0.00795 2.8 0.01136 3....
2 votes
1 answer
176 views

Automatic split rows in a table of data

So I was trying to contain some data I collected during an experiment in a table. There are 25 entries in total, but each row can only contain around 13 entries, which means I have to split them into ...
0 votes
1 answer
19 views

I can't center a pgf table or make it smaller because some data is hidden

I need to center or make a table smaller because some of its data is hidden out of the page. I am using this pakages: \usepackage[top=1.5cm, bottom=2cm, left=1.25cm, right=1.25cm]{geometry} \...
1 vote
1 answer
112 views

I am trying to make a data table with pgfplotstable

I am trying to make a data table with pgfplotstable and I don't know how to make the first line into a single column. I made the table horizontal and I can't make the first line into a column or add a ...
0 votes
0 answers
57 views

Timeline with horizontal bar and dateplot

I am trying to draw a timeline using pgfplots and dateplot: This is inspired from How to create a multiline timeline but I would like to use real dates in this case. Here is my example: \documentclass{...
  • 23
1 vote
1 answer
54 views

pgfplotstabletypeset in a custom command for CSV parsing

I created a dynamic table in order to cast inline CSV data easily to a table and want to use it now as a custom command, in order to make the table command easy to use for my colleagues. This first ...
5 votes
3 answers
238 views

Making a macro for transition probability matrices (a la Pinsky & Karlin's "Introduction to Stochastic Modeling")

In An Introduction to Stochastic Modeling by Mark Pinsky and Samuel Karlin, transition probability matrices for finite-state Markov chains take a particular formatting style: Particular items of note:...
1 vote
1 answer
34 views

latex sidewaystable, pgfplotstable produces unwanted c's in first cell

I'm getting a bunch of c's in the first cell of my table. The cell is blank in the .csv file. I'm not sure why and I can't figure out how to remove the c's. They are not in the .csv file. I think it ...
  • 57
2 votes
2 answers
48 views

Using \csname to iterate over loaded pgfplots tables with \addplot

I'm attempting to create a pgfplots group plot in which each curve is made from a pre-loaded pgfplots table in an automated way. The intended application is for a complicated drawing involving many ...

1
2 3 4 5
22