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
0 votes
1 answer
20 views

How to fix error plotting "Package pgfplots Warning: Axis range for axis y is approximately empty; enlargi ng it (it is [0.0:0.0]) "

I have a .csv file for example x,y 0.0,0.0 0.01,0.00010774053043701307 0.02,0.00010774053043701307 0.03,0.00010774053043701307 0.04,0.00010774053043701307 0.05,0.00010774053043701307 0.06,0....
  • 15
1 vote
1 answer
21 views

pgf scatterplot table from lua

I'm trying to generate a scatterplot from points produced by a lua function. I've simplified this into the following mwe, based on https://tex.stackexchange.com/a/77864/9454: \documentclass{article} \...
1 vote
1 answer
24 views

Import values from csv for prepared boxplot?

I have referred to the question posted here: Read boxplot prepared values from a table. However, it doesn't work very well with external .csv files. I have the following Table.csv content: Product,Min,...
1 vote
1 answer
30 views

Pgfplots unable to find column in external table

I am unable to take data from a .csv file and generate a simple scatter plot. The file contents are: Group x y Group1 10 1.1 Group2 20 8.1 Group3 9 0 Group1 11 2 Group2 20 8.2 Group3 8 ...
1 vote
1 answer
39 views

Using siunitx with \pgfplotstablegetelem

I would like to use siunitx package to merge data/uncertainty pairs available from an external file (using precision and rounding options as shown). It seems like the content of the variable (both ...
  • 313
0 votes
1 answer
15 views

Reading data on a table prints the bars of a bar diagram in reverse

I'm trying to draw a bar diagram but it seems that the bars are reversed. Let's take "Canada" for example, I would like to have 48 as first value, 24 and then 59, not the other way around. I ...
0 votes
0 answers
19 views

pgfplots: Two Y-axes plot

Suppose I have the following data for five different categories: I would like to create a figure showing the mean (and the 1-std.-band around the return) in something like the graph below (mean and ...
  • 623
0 votes
1 answer
28 views

Place node based on table entry

After reading a table and plotting the data as desired, I need to add some annotations to the diagram. These annotations need to be placed manually, as they are not contained in the database export I ...
  • 897
1 vote
2 answers
30 views

How to align a column in pgfplotstable on the dot of the scientific notation?

When I try to align values in a pgfplots table, I get problems when the exponent in the scientific notation has more digits. Currently I am using the style: columns/0/.style={column type={r},column ...
  • 339
0 votes
1 answer
66 views

How to auto replace string pattern in header CSV cells with pgfplotstable?

In the following csv file example, I want to automatically replace a string pattern in all headers cells when importing with pgfplotstable: \begin{filecontents*}{sample.csv} parameter,cubic ...
1 vote
1 answer
68 views

Bold Minimum Value Every N Rows

I want a way to automatically (post-)process the minimum of every n rows in a column as bold. So if my table had L rows, I want to group a column by each group of n (assumes L % n == 0) and bold the ...
0 votes
0 answers
14 views

pgfplotstable version of this table

Can somebody help me with a pgfplotstable version of th table. \documentclass{article} \begin{document} \begin{table} \centering \begin{tabular}{cc|cc} \hline \multicolumn{4}{c}{Header} ...
  • 101
1 vote
1 answer
46 views

Extra zeros in labels with pgfplotstablegetelem

When trying to answer this question: How to format the quarter date and make annotations? Latex I got a problem. It would be easy just to set the xtick=data, but because of the large number of points, ...
5 votes
1 answer
111 views

How to modify single elements of PGFPlotsTable?

I want to create a table with some values. Afterwards I want to replace one element of the table and display a plot. The nearest I get, you can see below in the minimum example. So there are two basic ...
  • 51
0 votes
1 answer
57 views

Combined bar chart and line chart

I am trying to have a bar and line chart together in LaTeX. The bar chart represents the number of tourists (the value will be on the y-axis on the left-hand side, labelled as "million of people&...
0 votes
0 answers
22 views

pgfplotstable - how to have underscores in column names

I'm looking for a simple way to have underscores in my column names with the pgfplotstable package. Something like every head row/.style={string replace={_}{\_}} would be great to work. MWE: \...
  • 61
1 vote
1 answer
17 views

Problems in PGFplots with \pgfplotspointmeta

I have the following code working very well in article class: \begin{figure}[!htb] \centering \begin{tikzpicture} \begin{axis}[ xlabel=km, ylabel=km, ylabel near ticks, ...
0 votes
0 answers
20 views

\pgfplotstablegetelem prints out numbers in the final PDF

I'm using pgfplotstable to calculate different sized averages from a column of a table A, and then to store these values in another table B. The way I do this is to first loop each value of a ...
1 vote
3 answers
90 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 ...
  • 111
1 vote
1 answer
34 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, ...
  • 407
2 votes
1 answer
50 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} % ...
  • 407
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
47 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
32 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 ...
  • 11
0 votes
1 answer
35 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,176
2 votes
1 answer
64 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
73 views

Let a line make an angle with respect to coordinate system [closed]

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
79 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
60 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
61 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
17 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
41 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
97 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
105 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
77 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
26 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,711
1 vote
0 answers
37 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
103 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
38 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
80 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} \...
  • 167
0 votes
1 answer
57 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
64 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,737
2 votes
1 answer
47 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,711
0 votes
0 answers
107 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
35 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,711
3 votes
3 answers
187 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,711
1 vote
1 answer
201 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
57 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,711
1 vote
1 answer
34 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 ...
  • 406

1
2 3 4 5
22