{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

0
votes
0answers
25 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
35 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} ...
6
votes
1answer
67 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 ...
1
vote
0answers
198 views

Error using lualatex and tikzexternalize to compile document with PGFPlots

I have a fairly large document with a number of pgfplots diagrams and due to memory capacity limits in PDFLaTeX I am now using LuaLaTeX to compile. While this works well, it takes forever to produce ...
0
votes
1answer
48 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
49 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
70 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 ...
7
votes
2answers
297 views

How can I represent the curved shape of a surface?

How can I give third dimension to the green surface, with shadings of color or light effects, using tikz or pgfplots? The matter is that the green surface looks (is) flat as the red one, while I ...
1
vote
0answers
44 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
53 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
49 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. ...
4
votes
1answer
129 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 ...
2
votes
1answer
85 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
79 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 ...
4
votes
1answer
205 views

PGFPlot two \pgfplotstableregressiona

Hi i have two plot with two linear regression but the legend show the same equation for the straight line... I haven't made a MWE because I thought it isn't needed---Is it? \pgfplotstableread{ X Y 97 ...
1
vote
0answers
45 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 ...
2
votes
1answer
103 views

Package pgfkeys Error: I do not know the key '/tikz/y error plus index'

I am having trouble compiling the attached mwe. I receive the following message: "Package pgfkeys Error: I do not know the key '/tikz/y error plus index' and I am going to ignore it. Perhaps you ...
0
votes
1answer
55 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 ...
3
votes
1answer
70 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} ...
11
votes
2answers
187 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} ...
1
vote
1answer
38 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
1answer
130 views

Problem with xticks when importing Matlab figures using matlab2tikz

When importing the following figure using the Matlab2Tikz, I obtain the following output , with the xticks strangely exported . Does any one have an idea how I can prevent this? Maybe by passing ...
3
votes
2answers
71 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, ...
26
votes
3answers
954 views

Tufte like axis with pgfplots

How to achieve this kind of axis with pgfplot ? Image taken from Szymon Beczkowski's awesome PhD thesis design (thesis link) I may provide you with some data to play with. ...
2
votes
2answers
75 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} ...
3
votes
1answer
81 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 ...
2
votes
2answers
75 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 ...
1
vote
1answer
34 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 ...
1
vote
1answer
80 views

PGF stacked bar graph not drawn correctly

I am having problem with the following code which is supposed to produce a simple stacked graph. \documentclass[tikz,border=2pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document} ...
7
votes
2answers
176 views

Why does a plot of a reciprocal function using pgfplots look wrong?

I am trying to plot the function 1/x^2 but the result is obviously wrong, here is how it looks like here is the code \begin{center} \begin{tikzpicture} \begin{axis}[ %xlabel=$x$, ...
2
votes
1answer
50 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 ...
4
votes
1answer
87 views

Conditionally transparent surface in PGFPLOTS

I am plotting 3D bars using PGFPLOTS, following the example and using the script given by Anton in his answer (the second one) to this question: 3-dimensional histogram in pgfplots. My code is the ...
2
votes
0answers
29 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
60 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
68 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 ...
49
votes
6answers
2k views

Filling specified area by random dots in TikZ

I want to reproduce the following diagram in Tikz. LaTeX code of my MWE is below: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \draw [-latex, ...
2
votes
1answer
45 views

Adding Confidence Intervals in Pgfplots

I am using pgfplots to generate the following MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
3
votes
1answer
153 views

Deformed drawings in loglogaxis

I constructed a graph by means of a loglogaxis with xmin=5e0, xmax=1e4, ymin=1e-16, ymax=1e0 and am trying to make an annotation by means of a circle. For this, I use \draw[color=red] (axis ...
13
votes
2answers
1k views

Big data surface plots: Call gnuplot from tikz to generate bitmap and include automatically?

Motivation I have large numerical data files, that I would like to create density (surface) plots of. Since they are very big, we can rule out a few possibilities such as to plot them directly with ...
1
vote
0answers
28 views

Pgfplots histogram with input data already counted

I have input data that looks like this: Age Count Cumulative Count Percent Cumulative Percent 24 1 1 1.4084507 1.4084507 25 1 2 1.4084507 2.81690141 30 2 4 ...
3
votes
2answers
64 views

Using \foreach to generate functions

I wish to plot a function based on collection of simple functions. For instance, the maximum of some functions: \begin{tikzpicture}[] \begin{axis} \addplot[smooth, color=black] { max( 2*x, ...
1
vote
0answers
64 views

Special decoration for TikZ pin feature

I try to achieve the curvy pin style I sketched below. It would help to distinguish pin lines from grid and other lines in the diagram. How can I realize a decoration that automatically draws such ...
1
vote
1answer
90 views

Make blue box appear after pause command in beamer presentation

I am trying to the following in a beamer presentation. Slide 1: This is Slide 2: This is a test Slide 3: This is BLUEBOXa testBLUEBOX (BLUEBOXa testBLUEBOX should be written "a test" with a blue ...
5
votes
0answers
129 views

Shell Scheme with pgfplots/gnuplot

I have a problem with pgfplots. I want to create a shell scheme from an E-motor characteristics. In the end it should look like this (well, with some more pleasing colours): The data is stored in a ...
2
votes
0answers
33 views

Barchart, Boxplot Data Table PGF Math Errors from mixed format inline data

My code for a horizontal bar chart with a summarizing boxplot is coming together, but I still have a nagging PGF Math problem if I try to plot the boxplot values, which are commented out at the bottom ...
11
votes
1answer
114 views

Pgfplots dynamic opacity

I'm trying to add multiple plots on one axis and I would like them to have different opacities (e.g. 0.1, 0.2 etc.). I have tried with different options: The only thing that actually compiles is ...
3
votes
1answer
54 views

pgfplots: node positioning

I want to place a node at the end of a curve. Since I did not find an automatic way to realize it I tried to place it manually. But the node does not appear at the expected position. It's placed near ...
1
vote
0answers
34 views

Stacking scatter plots with different y-axes in pgftex

I'm trying to create a stack of scatter plots with a common x-axis but different y-axes, alternating between left and right sides. I'm just learning pgfplots and while I've read up on using multiple ...
1
vote
1answer
83 views

Seeking an explanation for a tikzpicture code

I have found the following solution in stackexchange. It has been perfectly answered here by @Jake. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} ...
3
votes
0answers
29 views

Thanks to the Community [migrated]

I know that the post will very likely be deleted. I try it anyway: I just finished my (German) PHD project and I wanted to thank the community here for all the help and inspiration. The thesis can ...