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

Colormap with Tikz

What I have tried so far \documentclass[a4paper]{article} \usepackage{pgfplots} \begin{document} \pagestyle{empty} \begin{tikzpicture} \begin{axis}[view={0}{90}, ...
3
votes
2answers
169 views

pgfplots log axis with only minor ticks/labels

I'd like generate sheet of blank semilog paper. Every decade shoud have labels from 1 to 9. I only managed to have an unlabelled axis, but had no success to set the x axis labelling according to my ...
3
votes
1answer
122 views

Graphing an arcsin function using pgfplots

I am trying to graph this function using pgfplots: D(x)=180+2x-4(arcsin(sin(x)/1.33)) What is the how to I represent this in the the addplot function in pgfplots? I am also confused as to what to ...
3
votes
2answers
166 views

PGFPlots: point meta colormap index as fill value

I have the following simple PGFPlots sample \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=1, ymin=0, ...
3
votes
1answer
1k views

Resize font in legend below \tiny

I have small graph in my presentation (I have to). To adjust the size of the legend, I have to use very small legend. But \tiny is not enought. Here is a MWE : \documentclass{beamer} ...
3
votes
1answer
201 views

Why doesn't this example from the pgfplots manual compile?

I copied this example from page 134 of the pgfplots manual (version 1.12.1): \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.12} \usepgfplotslibrary{patchplots} ...
3
votes
2answers
75 views

Plot “timeout” with pgfplots

I'm plotting some timing results using pgfplots. The times are shown on a log scale. Each of the three techniques eventually ends in a timeout, and I'd like to show that somehow in the graph. I ...
3
votes
1answer
1k 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 ...
3
votes
2answers
229 views

Monte Carlo Method Drawing

I would like to produce a Monte-Carlo-Plot with tikz and pgfplots, similar to this: I've already tried to adapt from this thread: Filling specified area by random dots in TikZ I've tried defining ...
3
votes
1answer
486 views

get caption/subcaption every plot using groupplot pgf tikz

Hello I want to have Under each plot (subgroup plot) its caption or label, so I can also reference it in my document. Here in my example I used (a), (b), (c) I can keep them but they are not well ...
3
votes
2answers
310 views

Vertically stacked group plot with different horizontal scaling

I've 4 data sets that I'd like to present as a stack using pgfplots' groupplot library. What I'm struggling with is that the first data set has a larger horizontal range to the remaining three. I'd ...
3
votes
1answer
270 views

Is it possible to choose the base line of the ycomb?

Is it possible to choose the base line of the ycomb (vertical lines)? For example, in log scale, the default base line is at y=1 (or y=10^0). But I would like to make it at y=0 (i.e. minus infinity). ...
3
votes
1answer
187 views

Nodes Near coords hide when 0

Is it possible to hide nodes near coords in pgfplots when value = 0 ? I have something like this. And axis setting \begin{axis}[ ybar, bar width=3pt, nodes near coords ]
3
votes
1answer
299 views

PGFplots z buffer does not sort the plotted objects properly

I have a PGFplots axis environment in which I attempt to plot several line objects and a surface object. The objects have to be 'sorted' in the sense of which object is drawn before or behind the ...
3
votes
1answer
307 views

use axis of original plot in \spy plot

I use \spy in an plot. This works generally, but I want the axis in my magnification too. I attach a picture to clarify. I do not want to do this with a \node and manually calculate and add the axis ...
3
votes
2answers
306 views

Point Cloud Symbol in a PGFplot legend

I have a point cloud of data in a plot, and a reviewer commented on changing the legend entry for the point cloud from a single dot to a point cloud like or at least a few dots in the legend. However ...
3
votes
2answers
210 views

Adding label to a pgfplot

How can one include a label on the x-axis of a pgfplot. Below is a MWE. What I desire is simply to have the label -0.7 indicated on the x axis. \documentclass{article} \usepackage{tikz} ...
3
votes
2answers
280 views

Reducing space between annotation text and the line in a pin (PGFplots)

I need to reduce the distance between annotation text and the line which together form a conventional pin in pgfplots, see the figure below. Could anybody help me with this, please? MWE: ...
3
votes
1answer
164 views

How to stop pgfplots scatter to sort the data table?

I want to draw a scatter plot, using pgfplots and I want the data to appear in the plot area the same as it is listed in the table. I don't want the data to be sorted and then be plotted. As it is ...
3
votes
1answer
266 views

How to draw some lines between figures in LaTex

I want to draw the following figure. How do I do this? Some lines between figures, and Can you give me this lines some color? Some color lines in figure, as following:
3
votes
2answers
191 views

Pgfplots labels jump between beamer slides

Below is a MWE that demonstrates my problem. The problem is how the labels move through each slide. It seems as though they are first right aligned and then become centered for the next slide. How can ...
3
votes
2answers
2k views

TikZ inside pgfplot axis environment

I am trying to use the TkZ command MarkRightAngle in an axis environment, however I cannot get it to work. I get a "Missing character: There is no ; in font nullfont!" error and "Line 21: Package pgf ...
3
votes
1answer
226 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 ...
3
votes
1answer
274 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
3answers
356 views

Wrong placement (and/or size) of picture / plot with groupplot of table (… and discontinuity)?

Consider this MWE: \documentclass{article} % \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5.1} \usetikzlibrary{pgfplots.groupplots} \usepackage{pgfplotstable} ...
3
votes
3answers
480 views

Highlight a coordinate in a tikz / gnuplot graph

I want to place a coordinate on my tikz/gnuplot graph. How to do this? Preferrably I want the graph to overlap the little red dot, and I'd like the dot slightly larger. \documentclass{article} ...
3
votes
1answer
860 views

font size scaling and node placement issues using pgfplots and tikzscale

From the tikzscale documentation I understand, that it is supposed to keep font sizes constant. However, this does not seem to apply to axis ticks or axis labels from pgfplots' axis environment. Also, ...
3
votes
3answers
120 views

Different xlabels for same x values on different plots

I have two tables that hold different values for the same x values. To compare them, I want to plot both of them in the same plot but with different xlabels. The tables should remain the same, i.e. I ...
3
votes
2answers
729 views

Log scale with integer numbers on y-axes

I'm writing a report and one of the requirement of my Bode-plots is that they are logarithmic, but I need integer numbers (i.e. 10, 20 and 30) on the y-axes. I tried using ytick={} but these numbers ...
3
votes
1answer
266 views

Why does datatool/pgfplots only plot for last row in table?

I'm trying to use datatool to put a bunch of circles on a pgfplots plot. I tried the following: \documentclass{article} \usepackage{datatool,tikz,pgfplots} \pgfplotsset{compat=1.9} ...
3
votes
1answer
1k views

Latex fonts causing “Undefined control sequence” error in pgfplot

I am trying to modify the font size of some text labels in a pgfplot graph I'm playing around with, but it seems pgfplot doesn't understand certain font sizes such as \normal etc. Yet the pgfplot ...
3
votes
1answer
96 views

Label placement in pgfplots

I want to have the label arrows look that I get when using axis lines=center but I also want my x and y label to be on the outside of the plot and not inside the actual plot area. I have been looking ...
3
votes
2answers
320 views

How to expand a plot in a matrix over 2 or more matrix elements?

I use a matrix to arrange and align plots in a groupplot (as discussed here) and I want to create a groupplot with one subplot which have the size of for example two subplots as shown below. I ...
3
votes
2answers
231 views

Error when using surf in pgfplots

I try to make a contour plot with pgfplots similar to the pyplot.contourf but I'm getting errors: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} ...
3
votes
1answer
247 views

Pgfplots - Labeling Regions

I'm trying to draw chart which indicates different regions of stability/instability in all the areas demarcated by the different curves. How can I manually put in Roman numerals or letters on ...
3
votes
1answer
166 views

How to use the same linestyle for different isolines in pgfplots

I need assistance on how I can use the same linestyle in ternary diagrams where there is no need for using different colors, linestyles and legends.An example is given in the following programme which ...
3
votes
1answer
1k views

Bar chart - Single colored bar

For the bar chart proposed, I would like to use different color for each single bar. How can I do this? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
689 views

Drawing a hyperbolic trajectory

In Drawing the Celestial Sphere with Tikz Package, they use pspicture. Is there a way to use pspicture inside of tikz? I want to have a hyberbola pass by the Earth with a periapsis of 500km (scaled ...
3
votes
2answers
3k views

IC50 with curve fit line and value of IC50 appear on the graph using pgfplot

Please help me to make IC50 graph with data as follow S(mM) Activity (%) 0.00080 99 % 0.00800 91 % 0.08000 89 % 0.40000 89 % 0.80000 79 % 1.60000 61 % 4.00000 39 % 8.00000 25 % 80.00000 4 % ...
3
votes
1answer
117 views

problem with plot

I am having a problem with the following code for generating a plot. I don't know why the first group (Yago) does not include the first entry (the blue one for Sys1) and the second group does not ...
3
votes
1answer
2k views

Use pgfplots \addplot plot coordinates with relative coordinates

I want to use in pgfplots \addplot plot cordinates with relative coordinates. However the following syntax doesn't work: \documentclass{article} \usepackage{pgfplots} \begin{document} ...
3
votes
1answer
258 views

enlarge axes limits by fixed distance

According to pgfplots manual it is possible to enlarge axes limits using enlarge x limits and enlarge y limits properties. One can specify relative and absolute values, but they are in units of the ...
3
votes
1answer
206 views

Interconnected graphs in pgfplots

Is it possible to create interconnected graphs in pgfplots (e.g. common grids), like the picture below? And, related to the question above, if you have one tikzpicture environment with two axis ...
3
votes
2answers
1k views

Using node shapes or self made tikzpicture as image in legend

I am using the solutions of Using a pgfplots-style legend in a plain-old tikzpicture and Legend in tikzpicture to create a legend in a tikzpicture. In this legend I need a cylinder as image. I ...
3
votes
1answer
866 views

Filling path in pgfplot and pushing into background?

I'm using pgfplots to produce a plot of a closed path in the x-y plane. For reasons that are not important here, I would like to fill the closed path. That works fine, but the axes are then hidden by ...
3
votes
1answer
5k views

Formatting a pgfplot graph. Thicker bars and total width

I am creating a stacked barchart with the following code. However, I have some problems. How do I set the width, of the whole thing? width= does not do it ... How can I get thicker bars? How can I ...
3
votes
1answer
2k views

how to plot a sequence of numbers (not co-ordinates as such) using pgfplots

I have a data file containing a sequence of numbers, to be plotted against integers starting from 1. So the x co-ordinate is the row number of the data in the file. How to plot this data using ...
3
votes
2answers
1k views

title of sub plots with ybar groupplots

I tried to use groupplots to arrange several bar plots but the titles are drawn on top of the axis labels of the plot above. Am I doing something wrong here? \documentclass{article} ...
3
votes
1answer
74 views

Shading parts of a plot using pgfplots

I have the following plot that I need for my presentation. I have a minimal code for the same, however the shading is an issue. I am yet to be fully in grips over using PGFPlots. \usepackage{tikz} ...
3
votes
1answer
34 views

filter pgfplots data more than once (e.g. with discard if)

I want to filter a dat file more than once (i.e., filter on multiple columns), and the usual solution with "discard if" and "discard if not" doesn't seem to work. I.e., the following (were file.dat ...