{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
61 views

Error `tikzscale` package when scaling a figure, containing two axis environments next to each other, to the text width

I have a figure environment with which I depict two pgfplots axis environments next to each other. I want to scale the figure such that it uses the full \textwidth. I attempt to do so by means of the ...
2
votes
1answer
80 views

Reduce font in a LaTeX graph

May someone help me to reduce font to \small or \scripsize in may graph here by ? How can I delete the 10^0 and replace it by 1. It is a Log axisb ? Thanks My code is below. I have found a solution ...
5
votes
2answers
360 views

Graphing sqrt(x^3+x^2)*sin(pi/x) gives horizontal line

I have no idea how this website works, so i will do my best. \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} ...
1
vote
1answer
61 views

substring in addplot table

I want to add a figure which x label is symbols. But in data, the x label is longer than the figure's (because x label is abbreviated in figures). I want to know how to plot this kind of figure. The ...
1
vote
1answer
90 views

Align to baseline with groupplot

When using groupplot in pgfplots, is it possible to Specify which subplot baseline applies to? Set the total height of the plot automatically or to the height of previous plots? Specifically, ...
1
vote
0answers
44 views

Preload and preprocess data with pgfplotstable for use with \addplot

I'm creating grouplots for various datasets. Apart from some y-values, they all share the same x-values. In the past I used something like this to do the task: \addplot table [x index = 0, y expr = ...
1
vote
2answers
139 views

Sharpening blurred surface plot in pgfplots/tikz

I have used matlab2tikz to plot an image as follows: As you can see, the red and blue zones on the image are highly blurred. I would like to know if there is any way that they can be sharpened. My ...
0
votes
0answers
33 views

how to generate a 2-D plot with so many (about 3,000) points? [duplicate]

I have got the column of data which are stock prices for different periods. The data have about 3,000 points so it is impossible to plug in all their values. Is there a suitable way to generate such ...
2
votes
1answer
63 views

How to control the ticklabel size in TikZ graphics?

Is there any method to control the size of ticklabels in LaTeX when using pgfplots? It seems that the yticks are written in a wrong way LaTeX snippet: \begin{tikzpicture} \begin{axis}[% ...
1
vote
2answers
95 views

Uncovering labels in tikz in beamer doesn't work

I have a tikz picture (of a Gaussian distribution in this case) and I want to unravel its labels gradually. Following some suggestions in this site I tried the following, but it doesn't work - it ...
1
vote
1answer
65 views

latex pgfplots - incompleted graph

Where it is part of a graph? \begin{tikzpicture}\begin{axis}[ xtick=\empty, ytick=\empty, minor tick num=0, anchor=origin, % Align the origins axis lines=middle, ymax=8,xmax=8,xmin=-5,ymin=-5, ...
0
votes
0answers
43 views

LaTeX pgfplots - dimension too large

i have problem with drawing graphs... \begin{tikzpicture} \begin{axis}[ xtick=\empty, ytick=\empty, minor tick num=0, anchor=origin, % Align the origins axis lines=middle, ...
3
votes
1answer
86 views

pgfplots with big data: dimension too large

I am trying to plot a big file of data http://www.warcomeb.it/private/load.csv.zip with this code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{/pgf/number format/use ...
1
vote
1answer
103 views

Reduce size of sub images in tikz/pgfplots

I had created an tikz image using matlab2tikz, as seen below: I would like to reduce the size of the individual spheres while keeping the dimensions of the overall image constant, essentially ...
3
votes
2answers
319 views

Make curves appear one by one in one plot in a beamer presentation

I want to put one figure with multiple curves in my beamer presentation, but I want to put a pause between the curves. It means that the curves appear in the plot one by one. The \pause option does ...
3
votes
1answer
246 views

How to add an extra tick without adding a new line to the grid

I need to add an extra tick to the x-axis without adding a new grid line at the new x value, the problem is that I'm using extra ticks to get a complete grid (it is one solution that was given to me ...
4
votes
1answer
60 views

Why the text indicated on figure is being cut?

I'm a newbie here and I have a problem with my graphic. It is not complete because my text that indicate each function on the plane is being cut. What do I need to do? \begin{tikzpicture}[scale=1] ...
1
vote
0answers
108 views

I am getting the error of Arithmetic Overflow

Getting the error of dividing '162.0' by '0.0' and Arithmetic Overflow Here I am providing the full MWE.Compiling with Lualatex. Earlier it compiled perfectly before I formatted my system. ...
3
votes
1answer
63 views

how to access internally-calculated pgfplots xtick/ytick?

How can I access the ytick that are internally calculated by pgfplots? Specifically, the field \pgfplots@ytick is non-empty only when a hand-made definition is made within the axis env. options. ...
0
votes
0answers
28 views

Display 0.3 instead of 10^-0.3 in logarithmic plot

I have a loglog plot where the ordinate only covers less than a magnitude. pgfplots will display the plot like this: It is hard to make out the actual time it takes, it must be somewhere between ...
4
votes
1answer
72 views

pgfplots wrongly calculate \pgfplots@data@xmin in the case of mixed plots (with and without error bar)

In this TUGBoat article the author show how to implement tufte style plots with pgfplots. Currently I am working with Lualatex,texlive 2015. In the following MWE I implemented the idea from the ...
3
votes
1answer
104 views

Show mark labels near marks and not centered in ybar interaval graph

I'm doing a graph with vertical bars (ybar) where each bar represents not a number (1) but a class ([-0.5,0.5]). I would prefer that tick labels on the x axis appeared near the ticks marks, so ...
4
votes
1answer
201 views

How to hide empty (value 0) ybars with pgfplots?

I'm making a ybar graph (vertical bars) where the y axis maximum reaches 150+, but a lot of values are 0's. I would like the final graph would not show a minimum bar in this 0 values, since we this ...
1
vote
1answer
55 views

pgfplots: help with macro to drop line to x-axis

I frequently produce plots where I need to label points on a function, which I prefer to do both using x ticks and by dropping a dashed line from the point down to the x-axis. I decided to write a ...
3
votes
2answers
192 views

pgfplots combining expression with marks at fixed x coordinates

I would like pgfplots to draw an expression together with marks at pre-specified coordinates and/or fixed intervals. For instance, to plot the function 1/x as a line together with marks at discrete ...
3
votes
2answers
162 views

pgfplots graph labels (year/month)

I am trying to use @Jake's answer to Adding several labels (year/month) to a graph in pgfplots, I added my data but my graph looks strange: I don't really have idea how I can fix this problem.. ...
2
votes
1answer
99 views

pgfplots: Is it possible to control the curvature of smooth plots?

I'd like the plot below to look a little rounder and more "puffy", a little less angular. Is there some option that will allow me to control this easily? \documentclass{article} \usepackage{tikz} ...
5
votes
1answer
303 views

drawing the mean in a pgfplot

I would like to add a straight line to a pgfplot that indicates the mean of the data. For a histogram, this should be a vertical line; for a simple plot, a horizontal line. Now, I do get as far as in ...
2
votes
1answer
135 views

Remove 10-base x tick labels from matlab2tikz plot

I am trying to extract some plots from Matlab for XeLaTex using Matlab2Tikz. All goes well, except the plot with the loglog scale (I included a figure, see below). The left bottom plot shows a loglog ...
2
votes
1answer
60 views

Rotating cusp catastrophe figure in pgfplots

I made a cusp catastrophe figure with pgfplots but I can't seem to rotate it the way I want. The figure currently looks like this: But I want it to look like this: This is the code I have been ...
1
vote
2answers
618 views

Drawing spherical harmonic density plots on the surface of a sphere in tikz/pgfplots

I would like to create spherical harmonic plots in tikz/pgfplots similar to the one below, except without the axes and with labels above every image: It would be good if I could specify different ...
5
votes
1answer
89 views

Specifying tick marks on the axes via algebraic expressions involving radicals

I have two tick marks on the x-axis at \begin{equation} \pm \sqrt{\frac{1 + \sqrt{33}}{2}} \end{equation} and one tick mark on the y-axis at \begin{equation} \frac{1 + \sqrt{33}}{2} \end{equation} ...
0
votes
1answer
89 views

Align label with ticklabel in ticklabel cs in pgfplots

I want to place the xlabel for a plot on the same baseline the xticklabels. To do that I changed the xlabel style/at key to (ticklabel cs: 1), the rightmost position of the ticklabel coordinate ...
0
votes
1answer
84 views

How to draw a grid with pgfplots which terminal lines start and finish at the limit points of the x and y-axis

Is there a particular option that I can add to my code bellow to draw a grid lines that start and end at integer boundaries of the x and y-axis. \documentclass[border=3mm]{standalone} ...
2
votes
1answer
90 views

draw a rectangle with 100% opacity around the title

What is the most correct way, if one exists, to draw a rectangle with 100% opacity around the title of axis? A MWE could be \begin{tikzpicture} \begin{axis}[title=put me in a rectangle, ...
1
vote
1answer
45 views

pgfplots units breaks when using classicthesis

I have some math-expression I want to have as a unit in a PGF plot. However, the greek letter is replaced by a horizontal line, if I activate the classicthesis package. Here a MWE (it works if I ...
2
votes
0answers
54 views

pgfplots+fillbetween code no longer compiles correctly

I recently dug up some old code and it doesn't compile the way it used to. Here is a MWE: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage[english]{babel} ...
3
votes
1answer
89 views

ytick lists in loglogaxis and semilogyaxis

How can I specify ticks and ticklabels lists in loglogaxis or semilogyaxis without explicitly write all the list, but using ,..., form? For example, I would like to change the following code ...
1
vote
1answer
240 views

Problem with fill between in pgfplots

I'm trying to generate a plot where I want to shade the region enclosed by the x-axis, the right-hand branch of the equilateral hyperbola x^2 − y^2 = 1 and the line y=x as x varies between 0 and 1. ...
1
vote
0answers
67 views

How can I enhance the plot of a convex hull?

I was trying to solve the problem of finding the convex hull of a set of points ( I posted a related question here ). I solved this problem by plotting all the possible links.. The correponding code ...
2
votes
0answers
89 views

Arrows with curved line

I Need to reproduce a figure somewhat like the one here: Drawing Angles The problem is that I get a figure wich differ from the original one: the arrow at the end of the spiral get vertical ...
2
votes
0answers
132 views

Draw a convex hull and a plane using Pgfplots, in this specific case:

I have 2 surfaces to plot. The first one is a convex hull that passes through 7 points, and the second one is a plane formed by 3 points. The corresponding code is the following: ...
4
votes
1answer
68 views

pgfplots: How can I set x-domain between data points?

I am plotting a piecewise-linear curve from a data file. I would like the x-domain to start and end at points that are between the x points in the data file so that the curve ends at or below the top ...
4
votes
2answers
189 views

How to move a single plot behind the grid?

I am trying to make an axis in tikz with multiple plots and a grid, where one of the plots is plotted behind the grid. In particular, I want to make a colored area to mark a region for other plots, ...
1
vote
1answer
37 views

Problem centering subfloat

Try running this code removing one by one each \pgfplotstablegetelem. You will see that the 2 subfloats will move step by step to the center. Why? Keeping all of them the result is the following. I ...
2
votes
1answer
42 views

Create a diagram from cvs: treat a contraction of numbers like a single number

I’m trying to have a diagram that shows the information produced by this MWE: \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{data.csv} Jahr, Treffer 1995-2010, 4 2005, 3 ...
2
votes
1answer
196 views

desired horizontal alignment of pgfplots' axis in tikzpicture environment inside tabular environment

this is the first time I ask a question on this site (benefited from a lot of answer, though). I have problems with horizontal alignment of pgfplots' axis inside a tabular environment. My target, ...
6
votes
1answer
159 views

restricting variables in pgf plots

I am trying to draw the 'level curves' of the following function: where the variables are restricted such that x,y are non-negative, and x+y is less than or equal to one. In other words, this is a ...
2
votes
1answer
116 views

How can I add minor mark ticks to every even x value?

I would like to add some minor ticks to the x axis, but not in every value (too many!). So I thought I could add every 2 units. However, minor tick length seems to be ignored here. Here is my code: ...
1
vote
0answers
23 views

Histogram: problem labeling x axis [duplicate]

I would like to add on the x axis the value for each bar that are 400, 500, 600 and 700. I don't know why the only one that appears is 400. The code I used is the following ...