{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
1answer
66 views

multi-Figure with pgfplots with one legend and rotation

I would like to have in a page two figures like the one the code below at the same page using subcaption and sidewaysfigure. The first problem is that probably there is a mistake at the position of ...
3
votes
1answer
62 views

How to project nodes created by relative position on curve to axis and below?

In case I have two curves created with pgfplots I can draw a line between two relatively positioned nodes on each. In this example there is an arrow between the points at 50% of each curve. ...
4
votes
1answer
113 views

Vertical spacing and item separation between entries in pgfplots' legend

One could find a lot of questions on how to change the horizontal spacing between legend entries in pgfplots, but I can't find anything on the vertical spacing between the entries. For example, when ...
0
votes
0answers
68 views

How can I draw a 3D cross-section of a 3-torus embedded in 4D Euclidean space?

I found this question and very nice solutions of Mathematica Stack Exchange. I have a 3D-torus (\mathbf S^1\times\mathbf S^1\times \mathbf S^1) embedded in 4D Euclidean space. How can I draw the ...
3
votes
0answers
88 views

Drawing Cross Sections of (Contours over) Torus

I have this simple torus \begin{figure} \begin{center} \begin{pspicture}(-6,-4)(6,4) \psset{viewpoint=30 10 25 rtp2xyz,Decran=30,lightsrc=viewpoint} \psSolid[object=tore,r1=2.5,r0=1.0,ngrid=36 ...
5
votes
1answer
160 views

Customize length of y major grids in pgfplots

Let's consider the example that can be found here: http://pgfplots.net/tikz/examples/cyclic-voltammetry/ (There you can find a MWE and the data for it) I would like to add some horizontals lines, ...
1
vote
4answers
105 views

Help with grid lines in a pgfplot (Version 3)

The following display is that of a line and of a parabola on the Cartesian plane with grid lines. The grid lines are drawn nicely ... but to draw the grid lines I have included the axis options ...
2
votes
0answers
55 views

'parula' colormap in pgfplots

I try to implement 'parula' Matlab colormap in pgfplots drawings. Here is the MWE for that palette with 10 points for interpolation: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ ...
1
vote
1answer
74 views

How to remove 10^5 in x-Axis of time series plot generated with matlab2tikz

I generated the following simple plot in Matlab: Date=720000:730000 y=Date plot(Date,y) y=log(Date) plot(Date,y) datetick('x','yyyy') matlab2tikz('test.tex') which converts the date serial numbers ...
1
vote
1answer
46 views

External graphics + axis + additional plots

my issue is related to the sequence of layers in pgfplots. I have 3 layers: External graphics, which is included by \addplot graphics Axis grids and ticks Additional 'quiver' drawing from \addplot ...
0
votes
0answers
86 views

Customize PGF bar chart bars

Ideally, I'd like to write a macro which specifies how to draw the bar of a PGF bar chart, given its height, width, and location. This seems nearly equivalent to asking how to specify a non-repeating ...
1
vote
1answer
67 views

Help with Grid Lines in a pgfplot (Version 2)

This is a follow-up question to Help with grid lines in a pgfplot I edited the code in that post to get a grid on the Cartesian plane that is closer to what I want. Here is what I have. By ...
2
votes
2answers
65 views

PGFPlots: calculate a linear regression, ignoring some data

I know that I can use PGFPlots to calculate a linear regression with the create col/linear regression command. I have a set of data that is curved for the first few points, but linear for the ...
2
votes
2answers
175 views

Modifying some features in a scatter plot

I would like to have the following modifications to the scatter plot. The title should be typeset on two lines. I would like a break on each axis indicating a skip from 0. (When I was in junior ...
3
votes
1answer
58 views

Using a character as mark in pgfplots

I have a scatter plot in pgfplots which shows dots in 4 different colors belonging to 4 different sources. I would like to use a character (e.g., "A") instead of a circle as the marker. For instance, ...
2
votes
1answer
80 views

Oriented curves

Can someone link me to a tutorial or some examples of how to make oriented curves using pgfplots? Something along the lines of I'm not asking for someone to spend the time reproducing the above ...
1
vote
0answers
36 views

How to label data with the real value in pgfplot?

Taking this example from PGFplot gallery. \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, ylabel=Population, enlargelimits=0.15, legend ...
2
votes
1answer
70 views

pgfplot | tikzpicture | changing length + width of ticks

While there are any number of posts on how to fiddle (from the Latin) with tick labels, or tick placements, or tick color, I haven't been able to find anything (in terms of worked examples, or in the ...
2
votes
1answer
44 views

PGFplots within Environ format mistake

I try to write an environment for a simple barplot with pgfplots to reduce the needed markup. For that I use the environ package. For some reason tikz complains about a format mistake at the ...
2
votes
0answers
39 views

How to set axes limits for two types of plots when using groupplots

I have a rather big figure with two rows of plots where the first row has one y-axis and the second row has another y-axis. I would like to set the axis limits for these two sets of y-axes without ...
2
votes
1answer
96 views

How to draw a graph from specific lines of CSV file?

I would like to know if I can use cases when taking input from a csv file: Instead of generating multiple csv files, I would like to do the following In my tex file: Input from line 1-10 of ...
2
votes
1answer
94 views

Help with grid lines in a pgfplot

Nothing exciting here. I have a plot with xmin=-11, xmax=11, ymin=-11, and ymax=11. I would like to use the grid option in the axis environment to draw a particular grid. All horizontal and ...
2
votes
0answers
69 views

Legend entry for each point in scatter plot with matching color

I have a file with multiple columns, of which I create scatter plots where positions are given from column 1 vs column 2, while the mark color is based on column 3. I now wish to automatically create ...
3
votes
3answers
71 views

Pgfplot logaxis customization

I am trying to reproduce the following picture: but currently I am able to: There are a lot of issues: log scales are not logarithmic, i.e. 256, 512, 1020, 2050. I would like to have 256, 512, ...
1
vote
0answers
23 views

pgfplots decimal seaprator for extra ticks

I'm trying to format all y tick labels in a pgfplotsplot so that comma is the decimal separator. What I've tried is: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat = 1.12} ...
1
vote
0answers
50 views

pgf-plot: y-axis shows comma instead of decimal point

The ticks of the y-axis have to be displayed with a decimal point instead of a comma. I have no idea how to do that. I'm using \usepackage[english]{babel} and even the commad \decimalpoint does not ...
1
vote
1answer
51 views

putting(-) sign in the axes and working out a graph in pgfplots

I need pgfplots to show (-) sign in the y axis, somehow it does not read it. \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[utf8]{inputenc} \usepackage{textcomp} ...
1
vote
1answer
73 views

PGF colorbar cuts off max value

I need to generate a whole load of colorbars with custom min and max values. From reading this SE I have managed to get this working: \documentclass{standalone} \usepackage{pgfplots} ...
6
votes
0answers
86 views

Add break node to plot in pgfplots

I was able to 'break' the vertical axis using pgfplots, but some issues came along with it: Most importantly, I can't find how to add the 'break sign' (the two parallel lines) to my plot as well, ...
3
votes
1answer
83 views

Ticks stop early in PGFPlot

So I was trying to produce this with PGFPlot and got pretty close with the code below but (apart from the major/minor ticks not being as different in their lengths as in the example) I have one ...
1
vote
0answers
32 views

how to control the marks in \addplot

I want to draw some functions and I want to mark the points that I want, example every 1 or every 0.1 and the horizontal axes. \documentclass[a4paper]{article} \usepackage{tikz,tkz-base, pgf, ...
1
vote
0answers
38 views

How to change the font family for tick labels in pgfplots + beamer + professionalfonts?

I am making a beamer presentation with some pgfplots figures and I want to change the font family to sans serif for all tick labels. The problem is that it doesn't work for the y-axis as you can see ...
4
votes
1answer
42 views

How to show the mean or average value on a box plot with pgfplots

I have made the following graph: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} \begin{axis} ...
3
votes
2answers
141 views

How to create this coordinate system?

I'm currently working on a term paper / lecture notes for my electrical engineering professor and wanted to include the following coordinate system / graph / figure in my paper. (The image should be ...
6
votes
1answer
74 views

Custom area legend image not working

I'm trying to use the result from a fill between as a legend entry, but I can't get it to work: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} ...
1
vote
0answers
61 views

example: pgfplots groupplot with two x-axes

I want to share my result, having two different x axes in groupplot. One axis is the energy, the other is the corresponding wavelength. Up to now, this is my working solution, but maybe someone can ...
5
votes
2answers
91 views

Rectangular graphs in pgfplots

Whenever I draw a plot using pgfplots, the result is always a square grid. That's generally fine, but in the interest of saving space, something I'd like to be able to make a rectangular plot. ...
2
votes
1answer
77 views

Help with Help Lines

I am plotting lattice paths to two points. I would like to have help lines drawn on top of the Cartesian plane so that any line that is an integral distance from an axis is a solid line and any line ...
2
votes
1answer
52 views

Pgfplots: Add curly rotated braces to a graph

I created a simple graph of a demand function so far. Is there an easy way of addition curly rotated braces and labels to the graph (like in my sketch). Those should mark the intervals for a value ...
0
votes
1answer
53 views

Align axes across subfigures

How can I align the y axes of subsequent subfigures horizontally? Like in this test case: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{subcaption} \begin{document} ...
2
votes
1answer
54 views

Change arrow type in custom style in pgfplots

I tried to define a custom style for my plots in pgfplots \documentclass[a4paper,12pt]{article} \usepackage{fontspec} \usepackage{tikz} ...
1
vote
1answer
43 views

`every loglogaxis/.append style` not working in PGFplots

I'm trying to apply to scientific notation as constructed in Number format of ticks in log log axis won't change to scientific notation `a x 10^b`, 'a' real, 'b' integer to all ...
1
vote
1answer
25 views

Inline calculation gives `Could not parse input` error in PGFplots

The inline calculation exp(\tick) in PGFplots gives me a Could not parse input error when compiling the code \documentclass[margin=1cm]{standalone} \usepackage{pgfplots} \begin{document} ...
3
votes
0answers
60 views

How to label areas in pgfplots fillbetween library

Is there any simple way put a label say $A$ roughly at the "center" of an area created by the pgfplots fillbetween library? Take for example the following example: \documentclass[tikz]{standalone} ...
1
vote
2answers
78 views

Number format of ticks in log log axis won't change to scientific notation `a x 10^b`, 'a' real, 'b' integer

I'm trying to set the number format of the ticks in a loglogaxis to the scientific notation a x 10^b ($a \cdot 10^{b}$ in LaTeX, a a real number and b an integer), but it's not working. I use the ...
2
votes
0answers
40 views

Weird plot from discontinuous data [closed]

Tex gurus; I'm trying to plot some data against time, for which I have some missing values. Most of the time, this works well, but for one plot in particular I am getting some very strange results. ...
2
votes
1answer
63 views

Forcing a common z-scale in a surface groupplot

I've come across some similar questions, but not this exact one. And nothing I've tried has been able to achieve precisely what I'm looking for. I have a groupplot that contains two overhead views ...
1
vote
1answer
47 views

put a plot inside a table

i want to :) well as you can see \documentclass[french,12pt,oneside,openright]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} ...
0
votes
0answers
31 views

Number format as optional key value argument for LaTeX function

I followed the answer as given in http://tex.stackexchange.com/a/34318/28093 in constructing a function which uses key values. It works fine, but I also want to be able to give the number format as ...
1
vote
1answer
72 views

Pgfplots: set plot margins

Is there a possibility in pgfplots to set the margins reserved for the x- and y-label, similarly to gnuplots tmargin, bmargin, lmargin, rmargin. I would like to have following values for the ...