{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

1
vote
0answers
39 views

Problem using `siunitx` with `fourier` in `tikz`

For my reports I'm using both the packages fourier and siunitx at the same time. I recently noticed that units automatically enclosed in brackets using the library units for pgfplots are shown in a ...
1
vote
0answers
43 views

Space-saving plotting technique

My goal is to create a template for a report (see the figure) that will be used to programmatically generate reports from a data source. The approach I have thought of is to use a table combined with ...
1
vote
1answer
55 views

TikZ Smith Chart with s2p (touchstone) files

I'm trying to plot touchstone (s2p) data exported from another software, but the touchstone coordinate system is rectangular. So I have to overlay a XY plot over the smith chart to get it right. The ...
1
vote
1answer
35 views

Merge two .csv files and add missing rows?

I have two files. A.csv: date,colA 2016-01-01,1 2016-01-02,4 2016-01-03,2 And B.csv: date,colB 2016-01-01,2 2016-01-03,4 I'd like to combine these to get equivalent of: date,colA,colB 2016-01-...
1
vote
1answer
32 views

Best way to apply same style to data/theory pair-plots automatically?

Suppose I have multiple plots of experimental data series in one axis and that I also want to plot a theoretical prediction for each series. Is there any good way to group each data/theory pair ...
1
vote
1answer
43 views

Center legend above (or below) a groupplot WITHOUT references

So, I need to place my legend outside a groupplot with 2 columns and 2 rows. I'd like to center it either above or below. I read a lot of similar question on tex@stackexchange, but all of them seems ...
3
votes
1answer
46 views

Fill Area pgfplots

I somehow have problems getting the area below my curve filled. The library fillbetween should be able to handle this but fails for me (probably because of me). MWE: \documentclass{standalone} \...
2
votes
1answer
59 views

Preventing the graphical xticklabels from stretching

I need to have my x-labels in my pgfplots to be vector graphics. How can I prevent the graphical x-labels from streching? In below is a MWE that can duplicate my problem. The drawn rectangles and ...
5
votes
0answers
39 views

Skip some x tick labels when using `xtick=data`

I am plotting some csv data with \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{pgfplotstable} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{...
1
vote
1answer
37 views

Increment the x axis by any number

I am new in tikz, I want to increment the x axis by any number(eg:2,3 e.t.c) My current output Expected output I am using following code \documentclass{standalone} \usepackage{mathtools} \...
1
vote
0answers
49 views

x,y axis label values should be node label

I am new in tikz, I want to draw x,y axis and label of x,y axis should the node labels \documentclass{standalone} \usepackage{mathtools} \usepackage{pgfplots} \usepackage{siunitx} \sisetup{per-mode=...
4
votes
1answer
42 views

Scale tikz reference in footnote

Using a \ref to a tikz/pgfplots maker works fine in normal text, but it seems not to scale with the text size e.g. the marker is too large in a footnote as in the following MWE \documentclass[14pt]{...
1
vote
1answer
37 views

Create graphics dynamically at the compile time in a pgfplots

I am trying to create a 2D plot in which the x-label ticks are pictures, similar to what is posted here, with the difference that the images be created at the compile time in a parametric manner. The ...
2
votes
1answer
66 views

Skip to long lines in pgfplots

How do I skip lines, that are to long, when using \addplot command and data read from csv file? My database has around 500k points describing position in x-y space. Position can be wrapped around (...
2
votes
2answers
85 views

Plotting two 2D-plots in a 3D plot using pgfplots

I am trying to create a 3D plot similar to a standard xyz coordinate system by using pgfplots. I want to plot two 2D plots one in x1-y and one in x2-z plane, similar to the following illustration (...
3
votes
1answer
80 views

How to remove the axis lines

How to remove the axis but the label should be there Eg:current output Expected output I am using the following code \documentclass{standalone} \usepackage{mathtools} \usepackage{pgfplots} \...
4
votes
1answer
72 views

Dimensions too large on plot

I'm trying to plot a Gauss function/normal distribution, based on the answer to this question, however my domain is 0:10000 and the sample size is 95. This is resulting on the following error: ...
5
votes
1answer
191 views

How to improve visibility of a black and white plot?

I'm plotting information from 10 sets in the same plot. The result is very messy since the lines for each game intersect and overlap with each other, and the width of the final image is small. Here's ...
6
votes
1answer
53 views

pgfplots -> contour gnuplot with lualatex instead of pdflatex

i want to compile several pgfplots pictures with lualatex, since it dynamically allocates memory for compiling (in contrast to pdflatex). In some plots, like my MWE.tex given below, i want to use a ...
2
votes
2answers
109 views

How to draw a graph of a specific form in LaTeX

How can I draw a graph like this in LaTeX using pgfplot package?
18
votes
2answers
367 views

Pgfplot - Cross section of a 3D line plot (Poincare Sections)

I have plotted a 3D line using this following data: p p1t p2t -65.79 -210.81 137.73 -124.76 -182.7 189.67 -170.78 -141.97 233.17 -206.39 -96.42 257.48 -226.99 -40.212 268.45 -231.57 20.337 255....
4
votes
1answer
100 views

visualizing matrix factorization

I want to create diagram like below. Update: Mostly done. \documentclass{standalone} \usepackage{amsmath} \usepackage{tikz} \usepackage{colortbl,pgfplotstable} \pgfplotstableread[header=false]{ ...
1
vote
0answers
62 views

Tikz Pgfplot-Create user defined colorbar

I want to create only colorbar in Latex. Earlier I have used to Gnuplot to plot heatmaps along with colorbox(yeah, They are called colorbox in Gnuplot). The user defined colorbox in Gnuplot plot is ...
2
votes
1answer
45 views

Problem with plotting function with pgfplots (Takagi function)

I'm trying to plot step functions that when sumed will constitute the Takagi function. The graph of the first step functions is as it should be, but the graph of the second one fails. See the MWE ...
4
votes
0answers
40 views

pgfplots: Plotting one subfigure per country, from datafile

I have data in csv format at the country-year level, and using pgfplots I would like to plot a given variable over time, with one subfigure per country. My idea was to use a groupplot environment: and ...
8
votes
1answer
92 views

Fill pgfplot bars with colorbrewer

I want to use colorbrewer in my project since it provides color cycle lists but I struggle to use them in the right way I think. Please have a look at my MWE: \documentclass{article} \usepackage{...
2
votes
1answer
65 views

Highlight the label with in the node

I am new in tikz,I am manually create an image,In that figure coloured part shows that highlight the label how I do this by tikz I am using the following code for the label, How alter this code. \...
2
votes
0answers
28 views

Plot cumulative normal distn in tikz

I tried to follow Jake from Plotting bell shaped curve in TikZ-PGF with slight modification. 1) I just want the univariate normal cdf with red dash line at the cut-off, but some how my dash line seem ...
2
votes
1answer
37 views

Mirror X axis-pgfplot

I have to plot a hysteresis data. Instead of putting it in a single plot. I would like to put it in 2 plots but I want X-axis of second plot to be a mirror image first plot's x axis. How can I do this ...
0
votes
0answers
19 views

Use constant regression of pgfplot in calculation

I'm new in latex and i have a problem with regression function in log-log graphic of pgfplots. With linear regression in loglog graph it will return slope and intercept with \pgfplotstableregressiona/...
2
votes
1answer
37 views

Reference pgfplots' groupplot with subcaption

I created a groupplot with pgfplots. For referencing each plot I added a subcaption within a node into each plot. \documentclass{article} \usepackage{caption} \usepackage{subcaption} \usepackage{...
4
votes
1answer
80 views

define color in pgfplots

I want to plot funtions and data with own colors using \definecolor{<name>}{<model>}{<value(s)>}. If I use this command in \tikzpicture it works. But if I use this command in ...
1
vote
0answers
17 views

Setting fontsize dynamically at runtime in matlab2tikz

I'm using the following matlab2tikz command to convert a Matlab plot into tikz: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', false, 'strict', ...
3
votes
1answer
27 views

Result of Catchfile doesn't work inside a tikzpicture environment [duplicate]

This is a follow-up to this question. I am trying to get points to be graphed using data from an external file. The vertical coordinates are countries, and the horizontal ones are years. For this to ...
2
votes
0answers
18 views

Pgfplots center plot horizontally, disregarding legend [duplicate]

I tried a lot around with setting anchors in the plot, but I couldn't manage to center the plot correctly. In this example the bounding box of plot and legend gets centered, but I want the plot ...
1
vote
1answer
49 views

Dimension too large when changing y axis mode

I am using tikz to plot a figure in x-y plane, however when I change the y axis mod to logarithmic scale, I face to an error "Dimension too large". I searched in this website, but there were the same ...
7
votes
1answer
162 views

How can I get a stacked bar with single values and sum on the side

Based on this question I was able to put partial and total values on my bar plot. My bars have some really small values though and it is impossible to fit the numbers in some ranges. I would like to ...
2
votes
1answer
43 views

Label problem in figure

I am new in tikz, in below red boxed parts shows x,y axis labels, Now it's automatically (appearing) incrementing (0,5,10,15,20) my expected out is like (1,2,3,4). I am using the following code. How I ...
6
votes
2answers
192 views

How to fill the space between two \draw lines

I am drawing two lines and I need to fill the space between them with a green color. How can I do that in tikz? \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{patterns} \begin{...
6
votes
1answer
88 views

pgfplotstableread + addplot table: scale column for re-use

I get output files from a code and I want to display the output file with pgfplots. I want to create several different plots with the same files. Therefore, I read them in a macro with pgfplotstable. ...
6
votes
1answer
101 views

using variables or commands in pgfplots axis definitions

This is probably a silly way of doing it but bear with me. I have a document in which I define values in lua tables to reuse them either in a tables or in a pgf plot after applying some calculations ...
2
votes
1answer
36 views

Tick labels with decimal places

I want to have my axis tick labels in a plot with the first decimal place: 2 -> 2.0, 5 -> 5.0 Have anyone an idea how to do this?!
0
votes
0answers
37 views

Dynamically setting the fontsize with matlab2tikz

I'm using matlab2tikz to create a tikz file out of my Matlab plot. I'm using the following code: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', ...
2
votes
1answer
24 views

Repeated and misaligned xticks in PGFplots

I have a problem with the xticks in my PGFplot that I'm not sure how to even start troubleshooting. The tick labels are repeated and misaligned; basically they are all over the place. \...
3
votes
1answer
63 views

Problem with ticks and caption when importing Matlab figures using matlab2tikz

I have created a nice plot in Matlab and converted it into tikz with the matlab2tikz library. It works great but there are two problems: The ticks of the axis are not good. Especially for the y-axis ...
8
votes
2answers
87 views

tikzpicture cv graph

I've got a problem with tikzpicture. I've made my cv in Latex but one thing isn't working fine. The first graph should look like the other ones. If I remove the enlarge y limit={abs=1cm}, the graph ...
5
votes
1answer
79 views

Graphic-Tikz in latex

I have the following code: \documentclass[]{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \pgfmathdeclarefunction{gauss}{2}{\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2)...
1
vote
1answer
60 views

Plots are too small with two minipages

I have two plots, each one in a minipage, so they could be side by side. The left plot is significantly smaller than I would like it to be. How can I fix it? \begin{frame}[t,fragile]{CI construction -...
3
votes
1answer
32 views

Pgfplots: Scope inside axis environment - follow up

This is a follow-up question to this question: I still want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position....
0
votes
1answer
43 views

Standalone and PGFplot cropping

As asked here I set up a template for plots that can be used with standalone and included into the main document. 1 remaining problems is that the cropping does not crop enough of the whitespace ...