{pgfplots} is a package for creating 2D and 3D plots of mathematical functions and numerical data, using the PGF graphics framework. For questions about the inbuilt plotting functionality of TikZ/PGF, use {tikz-pgf} instead.

learn more… | top users | synonyms

3
votes
0answers
78 views

Thick ticks are cut off [duplicate]

I want thick ticks but the 1st and last ticks are cut. It seems that the figure is cut exactly at axis boundaries so the thick ticks are cut off and look thiner than it others. Could someone tell me ...
3
votes
1answer
87 views

Polar pgfplots diagram adds additional whitespace with units library loaded

When doing polar plots in pgfplots (v1.10) I get additional whitespace when loading the units library. How can I get rid of that? I did not observe this before since it is related to the direction of ...
2
votes
0answers
76 views

How to draw stacked /vastellated bar charts

i want to draw a chart like this (Chart / Image taken from here): First of all: How is this type of diagram called? By searching "stacked bar chart" in google, I cannot find charts like this. My ...
4
votes
1answer
72 views

Data manipulation in contour maps (x/y-axis and contour label)

I am using contour maps in pgfplots as part of CAD as well as documentation. Serving both purposes I would like to improve the readability of my contour maps, by multiplying x- or y-axis times a ...
0
votes
1answer
70 views

How do I apply nodes near coords to a single bar / to a single plot?

After reading the pretty population pyramid question, I was inspired to "Tufte-ify" the graph to remove redunancy and clutter (and to become more familiar with pgfplots). I modified the code from ...
3
votes
1answer
65 views

Error cross-referencing when tikz mode is graphics if exist

I am getting the error "Undefined control sequence" when using \tikzset{external/mode=graphics if exists} and the label does not exist (It should produce a warning not an error, though because the ...
3
votes
1answer
91 views

pgfplots: Adding additional lines to a graph

I did an ANOVA with 4 tests. Result graph is shown here, original code comes from: TikZ: Replacing the values (labels) on x-axis with names \documentclass[12pt]{article} \usepackage{pgfplots} ...
5
votes
1answer
114 views

With PGFPlots: How to manually enter ticks as fractions?

We can display tick labels as fractions by setting: xticklabel style={/pgf/number format/frac} However, how can we manually enter the tick points as fractions? Just using xtick={0,2/3,1} does not ...
4
votes
1answer
165 views

addplot3[surf] creates lines instead of a surface

I have been trying to create a surface plot but I am unable to get it to work. Any help would be greatly appreciated. I've tried using surf which only produces lines instead of a surface (Fig. 1). ...
1
vote
0answers
55 views

Make a large heatmap with gaps and tables between

I am trying to make a large heatmap which looks like this with gaps and row or column names written in some of the cells. Empty cells are also present in the heat map. Can i make this using pgfplots? ...
3
votes
1answer
72 views

How to have different colormaps for different columns in the same Heatmaps table using pgfplots

I want to make a heatmap using different colors for only two columns in a heatmap. I was able to do it using two different pgfplotstables, i.e, two different heatmaps. But, i wan't to know whether ...
2
votes
1answer
53 views

Pgfplots axis environment, loop for function works but not for plotting options

My question is related to this one, \foreach not behaving in axis environment , but the solution there does not work in my case and unlike the related question, the loop works well in the axis ...
2
votes
0answers
21 views

Passing changing (in a loop) parameters to Pgfplot function [duplicate]

Usually I just use TikZ for plots but was hoping Pgfplots would simplify life (axis, labels, etc...) but I can not find what is the right syntax to pass parameters to the function. Here is the MWE: ...
1
vote
0answers
104 views

Embedded axis Pgfplots

So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the ...
3
votes
1answer
33 views

pgfplots@y@inverseveclength ->infty

I'm experiencing problems with pgfplots. The following piece of code was automatically generated by a piece of software I'm working on. \documentclass {standalone} \errorcontextlines 10000 ...
2
votes
0answers
76 views

pgfplots, representing bars from same category and series adjacently

I would like to represent the number of counts from specific cell types on a bar chart. The cells are from different mutants, consequently there are four series (742, 743, 744, 745). However there are ...
10
votes
2answers
344 views

How can I draw a pretty population pyramid graph with pgfplots?

I'm trying to plot a graph population pyramid. I wrote this MWE. \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[col sep=comma]{ ...
9
votes
1answer
264 views

How can I fit the original data with exponential or polynomial functions via pgfplots?

I am trying to plot the following data with a curve fitting via pgfplots. It seems linear regression is not suitable for my case. So I would prefer to have exponential or polynomial curve fitting on ...
3
votes
2answers
70 views

Showing labels only at edge of grouped PGF plots

The options xlabels at and ylabels at in PGFplots' grouped plots library are supposed to show axis labels only at the corresponding sides of the complete set of plots, but they seem to have no effect. ...
0
votes
0answers
26 views

Change line to “dashed” without changing markers [duplicate]

I use pgfplots and I would like to have a dashed or dotted line that still has solid markers. When I use dashed, it also affects the markers. That looks weird, and I would like to have solid markers ...
2
votes
0answers
57 views

Location and size of pgf plot axis in a tikzpicture - with tikz positioning library?

This could be a second part to Positioning pgfplots axis in tikzpicture , I guess ; consider the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} ...
0
votes
1answer
56 views

How can I minimize the distance between 2 values on the x-axis?

I am totally new to pgf plots... My plot looks like this right now: How can I minimize the distance between "EOD" und "LOD"? That is my code: \begin{axis}[height=6cm, ybar stacked, ...
2
votes
1answer
78 views

pgfplots: plot from csv file starting at a specified row

I do have a large csv file which contains more data than that what I actually want to plot. E.g. I have data starting from x=0, but I want to plot it starting from x=2, but still let the axis start at ...
2
votes
1answer
77 views

Pgfplot won't compile more than 6 curves on the same plot

I want to plot with pgfplots 12 curves on the same plot. The curves are given by 12 csv tables named "curve_01","curve_02" etc., about 3000 points each. To reduce computational time I reduce the ...
5
votes
1answer
51 views

with pgfplots gives an error when I restrict the range but not when I have an unrestricted range

The following example compiles fine for me: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines=middle, %%ymax=10, ...
1
vote
0answers
58 views

how to draw a unfinished data point bar in pgfplots?

I want to present some experiment comparisons. One of the candidate (SHJ) takes too long to run. Could anyone give me some suggestions on how to present such data point in a bar chart? Thanks in ...
6
votes
1answer
60 views

pgfplots - How can I deactivate a global option locally, i.e., for one plot?

The code below works as intended and contains a solution to have zero lines (as provided by percusse here). It produces the following picture although the MWE produces an error. How can I ...
0
votes
0answers
50 views

How to draw linear inequalities in LaTeX [duplicate]

I want to draw the following inequalities in LaTeX. This set of inequalities define a region. I want to plot this set of inequalities. How can I do this? I want to achieve something like this. ...
2
votes
1answer
70 views

pgfplots: strange opacity in surf plot

I do have the following code to get a surf plot which gives me for some reason the 'backside' of the plot with full opacity. How can I change this behavior? Actually, I think this feature is very ...
2
votes
1answer
94 views

Logarithmic y-scale with zero bin value

I have some trouble with an histogram filling when I plot it with ymode=log. Here is a MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
1
vote
1answer
156 views

Bars with same x index in stacked barplot

I'm reading data that is structured as an outer group (the x indices/rows) with different inner categories (multiple columns) that are composed of multiple values themselves again. The goal is to ...
0
votes
1answer
84 views

Colorbar for pgfplots contour plot

I have to draw a contour plot of a large dataset, so I use lualatex as compiler. This example also works with normal latex, i.e. latex+dvips+ps2pdf. It works fine in latex but for the large amount of ...
7
votes
1answer
277 views

pgfplots: Using Sans Serif Fonts for Numbers and Text (not Variables) in Figures and Diagrams

I want to use a sans serif font in figures and diagrams. This also applies to tables (related question). The normal text should remain roman (with serif). Here is the normal way one would try to ...
1
vote
0answers
60 views

Scaling inset plot relative to main plot axis length

I want to create a plot with a second, smaller plot as an inset. This is easy enough using the following code, where the widths of the plots are defined. However, I often use figures in several ...
11
votes
2answers
206 views

Double Smithchart with pgfplot

I'm trying to plot a smithchart, which has negative impedances, too. This is how far i got till now: \documentclass[]{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
2answers
113 views

Axis discontinuity + enlargelimits not showing axis correctly in pgfplots

I need to make a y-axis discontinuity, but I also need to configure enlargelimits=true. The problem is that the axis is not showing correctly, as the below picture show. If I set enlargelimits=false, ...
2
votes
2answers
180 views

y minor ticks not showing with pgfplots

I want some minor ticks on the y axis, but it doesn't work. I already tried minor y ticks num but it didn't help. Thank you in advance. \documentclass[11pt,a4paper,oneside ]{article} ...
2
votes
1answer
132 views

Axis tick options, ticks and labels inside axis area

I know the title can be misleading, but I don't know how to put it better. I will correct it when I get better proposals. I try drawing plots from external tables with pgfplots. Alas, the template I ...
3
votes
1answer
112 views

Padding in cell in Latex Heatmap using pgfplots

I have made a heatmap using pgfplots. But the numbers in the cell are not aligned vertically centered. How can i align them at center or how can i add padding at the bottom for making them appear at ...
1
vote
1answer
81 views

PGFPLOTS boxplot data from inline file

I have The following code: \documentclass{article} \usepackage{filecontents} \usepackage{pgfplots, pgfplotstable} \usepgfplotslibrary{statistics} \begin{document} ...
2
votes
2answers
159 views

doing 3x3 subplots with the colorbar located northside

I wanted to have my nine (2d) matlab plots shown as 3x3 subplots in latex with the colorbar located northside. I have no idea how to do this especially that I have the colorbar saved separately from ...
3
votes
1answer
107 views

pgfplots: read data, calculate diagram

I'm trying to create a diagram with pgfplots. I have some data, which I'd like to have stored in the diagram code, alternatively (preferably not) in a separate file. What I need to do is to calculate ...
3
votes
1answer
74 views

changing the 3D tick style of pgfplots

Consider this 3D plot: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3[surf,domain=-4.5:4.5]{(x^2)-(y^2)}; \end{axis} ...
2
votes
1answer
61 views

Why are some of my boxplots dashed?

Here's a MWE: \documentclass[a4paper]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{statistics} \pgfplotsset{compat=1.8} \begin{document} \begin{tikzpicture} \begin{axis}[ boxplot/draw ...
6
votes
1answer
85 views

How to do a shift/offset of ycomb or ybar **in y-direction** without stacking in pgfplots?

I am looking for a way to shift the reference bars in an XRD plot in order to be able to compare two or more plots in the same axis environment but have the references only where they apply. This ...
2
votes
1answer
57 views

Pgfplots, Units and “Modify Number Data Scale”

I've got a question with tikzpicture in LaTeX. Data of Tikzpicture are in a external file. The y-axis scale is like: 100,000 - 150,000... (thousands). I need to put the scale of this axis like 100 - ...
7
votes
2answers
124 views

Pgfplots - ugly marks when using dotted or dashed line [duplicate]

Recently I spotted that applying the option dashed or dotted to a plot results in having ugly / distorted marks or marks with dots (when applying dotted) around them. Here is a MWE: ...
2
votes
1answer
86 views

How can I set the width of a pgfplot to fit that of a tikz matrix?

I'd like to be able to control the width of a pgfplots plot to that of a matrix. The plot should be below the matrix. Ideally the plot's dimension will depend only on the size of the matrix (so if the ...
1
vote
1answer
63 views

Loop through table for boxplot prepared

I am trying to produce figure with 2 boxplot prepared plots from an inline data file. I grabbed this code from here to use as a starting point. Given that the wrapper code allows the boxplot data to ...
4
votes
1answer
159 views

Metadata for different colours in PGFPlots

I would like to use PGFPlots to create a plot using three sets of metadata. I figure it would be best to have one set represented by the plot mark and the remaining two by the fill and draw colour ...