{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

2
votes
0answers
342 views

node not appearing when used with pos option in a pgfplot [closed]

I want to place a node on a plot using the pathway modifier: node[pos=0.5] {node text};. The pgfplots manual clearly describes how that is done, but my node doesn't appear. Could my scaling be a ...
2
votes
0answers
53 views

custom function in pgf doesn't behave consistently [duplicate]

Possible Duplicate: Is plotting exponential graphs a known source of bugs in TikZ? I want to use a custom function in pgf plots and in text, like in this example: ...
2
votes
0answers
872 views

pgfplots - subplots with common legend [closed]

This is a followup question of this one. It uses the same MWE but about a different issue so a separate it here. I used Tikz node to create the custom legend but used absolute positioning to place it ...
2
votes
0answers
176 views

Incorrect plot with pgfplots and LaTeX [duplicate]

Possible Duplicate: Incorrect plot using Pgfplots I'm trying to plot a function with pgfplots for LaTeX. Unfortunately, pgfplots plots the function incorrectly. Here is the LaTeX code I ...
1
vote
3answers
279 views

How to create a 32 by 32 grid?

I want to create a 32 by 32 grid as shown below. And I also want to add two labeling in x and y directions. 1) 0 - 31 (grid number) 2) 0- 1 (box unit) I a next slide I have to draw a new box ...
1
vote
1answer
190 views

Pgfplots and round-off error

Hi have a graph that must demonstrate the oscillation of energy of a numerical scheme. The problem is that the energy is something like this: -9.99999994950000e-01 and I have oscillation after 8 ...
1
vote
1answer
1k views

PGFPlots: symbolic x coords + extra ticks

how can i add in this plot the extra x and y ticks ? \documentclass[border=0.5mm,12pt]{standalone} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{% mesh line ...
1
vote
2answers
401 views

baseline of custom marks in pgfplots

I'm trying to plot some intervals with pgfplots and wanted to use a custom mark for upper and lower bound. I planned doing this by using a "V" for the upper bound and a "^" for the lower bound ...
1
vote
2answers
96 views

Control pgf/tikz semilog factor

I'm currently using the semilogy environment and wondering on how to control whether they actually take 10 log or 20 log.
1
vote
1answer
574 views

pgfplots: plot smaller range of table and still use enlargelimits=true

I am using pgfplots to plot two simple (x,y)-plots of the same data from a table file. The first plot shows all of the data points and in the second plot I want to zoom in on some specific range of ...
1
vote
2answers
467 views

pgfplots - axis xmode/ymode in user-defined style

I would like to specify xmode and ymode for the axis with \pgfplotsset (or any other way, so that the mode can be changed by an if statement) The error message which I get is: ! Package pgfplots ...
1
vote
1answer
722 views

TikZ externalize option causes error in compilation

As the title says, the externalize option causes some strange errors I can't figure out of. It works for some figures (e.g. figures for which the code I've found in the pgfplots manual), but for some ...
1
vote
1answer
2k views

Some simple surface drawing using addplot3 for pgfplots won't compile

I am having trouble compiling even some very simple surface drawing using pgfplot and addplot3, for example please see the attached code, I keep getting error saying \begin{axis} on input line 8 ended ...
1
vote
1answer
2k views

Pgfplots: Linewidth when using \ref in custom legend

I'm creating a custom legend for some pgfplots graph by drawing a node containing a shortstack. Inside the node I'm using \ref{} to insert correct line-styles in front of my text labels. The problem ...
1
vote
2answers
58 views

pgfplots mistake with label

i have a problem with my graph. i can't figure out why latex puts this into my description. i had to specify the xticklabels manually. but latex still gives me that number on that position. i'd like ...
1
vote
2answers
85 views

pgfplots figures in publications

Journals usually ask for the figures in a publication to be in some specific formats (e.g. eps, svg, tiff etc). Now that I have used pgfplots to make all the figures in my article, what is the best ...
1
vote
1answer
67 views

pgfplots: Optional graph range arguments in a macro

I defined a macro that inserts a plot that I can re-use the same graph style in multiple places. Mine actually loads data from a file, but a similar MWE looks like: \newcommand{\drawGraph}[1]{ ...
1
vote
1answer
63 views

How to put a table next to a plot?

I made a plot and a table, and I want to put the table next to the plot, how can I do that? \begin{tikzpicture} \begin{axis}[ axis y line=center, axis x line=middle, axis equal, grid=both, ...
1
vote
2answers
94 views

Interval of x tick labels are to close

I have some trouble with the interval of the x tick labels. I have two much labels so the text overlap each other. My code is following: \begin{figure} \begin{tikzpicture} \begin{axis}[ ...
1
vote
1answer
118 views

PGFPlots - trying to combine legends

I have an interesting problem. I am trying to create two graphs using the groupplots environment, side-by-side, that show different sets of data elements with different legend entries and different ...
1
vote
2answers
150 views

pgfplots - How to draw zero line for y (from xmin to xmax) when one uses symbolic x coords?

Based on the code provided by Jake: \draw[very thin] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0); I am drawing a zero line for y-values for bar plots. ...
1
vote
1answer
135 views

how to change color at line chart?

I have the following code. \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, width=15cm, height=8cm, % size of the image grid = major, ...
1
vote
2answers
112 views

Non-linear plot looks linear

I am plotting a non-linear function -2/3 x^ 3 + x^2-3x+4/3 in the interval [0,1/2], I tried to change the scales to make it look less linear but still looks like a straight line. Any suggestions? ...
1
vote
1answer
287 views

Positioning of node label in pgfplot

I am using pgfplot to make a 2D plot with the nodes labelled. However, some of the text labels interfere with each other as they're too close. The default positioning of text labels in pgfplot seems ...
1
vote
2answers
557 views

3D as 2D plots using Matlab data

I am trying to plot 3d data as 2d (please refer to the attached figure). Is that possible at all in Tex (or Matlab)?(Usually, this is done a s a legend, however, when no colors are allowed, I have to ...
1
vote
1answer
154 views

Using a macro inside the axis options for pgfplots

I want to create an macro to replace the string '{a,b,c}' in my code: xticklabels={a,b,c} so I set \newcommand\inputnames{a,b,c} xticklabels=\inputnames but this gives me the same result as ...
1
vote
1answer
687 views

Default distance between axis numbers and axis labels pgfplots

What is the default distance between the axis numbers and axis labels in the plots made with pgfplots?
1
vote
1answer
21 views

How to center a pgfplot? [duplicate]

I am trying to center a graph made with pgfplots with \centering. If I put \centering within a group to limit its scope, the graph does not get centered. If I don't limit the scope of \centering, then ...
1
vote
1answer
32 views

Externalizing figures in consistent size

I'm using pgfplots to plot figures, then I'm using the externalize library to output standalone pdfs, which I include in another document. The problem is that the outputted standalone figures have ...
1
vote
2answers
36 views

Moving one tick mark on the x-axis leftward

I want to move one extra tick mark on the x-axis leftward by about 2pt. I have tried using the spacing command \hspace*{-2pt} before the label and \hspace*{2pt} after the label. The tick mark is not ...
1
vote
1answer
93 views

Connecting points on graph via dotted lines

How could I connect these points with dotted, vertical lines? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines=center] \addplot [only ...
1
vote
1answer
76 views

How to hide the legend in a tikz picture

I am trying to hide the legends in the following tikzpicture code. However, after I use every axis legend/.code={\let\addlegendentry\relax}, it messes up the picture. Could someone help me how I can ...
1
vote
1answer
92 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} ...
1
vote
1answer
117 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 ...
1
vote
1answer
154 views

Plotting an arbitrary function in latex [closed]

I would like to know how I can replicate the diagram below in latex. thanks. Edit: I can plot a function using tikz/pgfplots if I know how the function is defined. Unfortunately, I don't know how ...
1
vote
1answer
188 views

Modify tikzpicture plot outside .tikz file

I am not sure if my title gets through what I'm after, but basically I am using matlab2tikz to generate some plots for me and am wondering how you can do some modifications from outside the .tikz ...
1
vote
1answer
232 views

Grouped Bar-Chart, all four in a panel

I am tryin to show all four graphs in a single panel page. Also, I want to see my graphs being very professional for beamer presentation in a single frame. Thanks. \documentclass{article} ...
1
vote
1answer
320 views

Place vertically centered legend to the right of groupplots

I want to place the legend to the right of groupplots using the pgfplots package, and for the legend to be vertically aligned at the center. In other words, I want the legend to be placed at the point ...
1
vote
1answer
180 views

Tikz won't plot the function properly

I tried to plot the following function but it didn't work: y = 300 + 1000/x + 2.5x. This is the document, but instead of the plot it only shows the axis. \documentclass{article} ...
1
vote
1answer
149 views

Reduce vertical distance of “above right” to label a plot

How can I label a plot using above right but with reduced vertical distance? I tried a syntax like above right= value1 and value2 but this isn't working for me. For example in the following plot: ...
1
vote
1answer
207 views

Revisiting: Plotting Population Regression Function with pgfplot

I want the make the following population regression function after some modifications with pgfplot (response from previous question here). Required Modifications Draw small circle at each normal ...
1
vote
2answers
573 views

pgfplots: How to place the legend box in the middle of an axis

I would like to have something like legend pos= west, %insted of north west, south east... because I don't wanna place it in the corner but vertically in the middle. How could I do this?
1
vote
1answer
178 views

Legend entry with curve fits

I am plotting two data sets with curve fits added manually (by defining two functions). How can I edit my legend entry to combine the data points and lines into one icon? So instead of having four ...
1
vote
1answer
217 views

Automate Controls for Curves

I am looking to automate (simplify) the path drawn in blue on my MWE. I am trying to avoid nodes if possible as this is nested in a tikzpicture. Ideally I was hoping to simply specify the begin and ...
1
vote
1answer
493 views

pgfplots, toks, position of pin edge

I want to use pins to comment specific points in a diagramm. When I use a edge like -> it works fine. But if I use *- for example then the center of the dot is not at the position it should be. ...
1
vote
2answers
849 views

How do I add a marker to TikZ plot for specific x coordinate? [duplicate]

Please take a look at my code. I am plotting values from a file and I want to add a marker at the x coordinate of 100 GHz. \documentclass[convert={density=400,outext=.png}]{standalone} ...
1
vote
1answer
311 views

PGFPlots slow down compilation when plotting from external files

I am writing a report containing multiple plots of spectroscopic data by way of PGFplots which is fetching data from external files. It used to do the work, and after a few minutes of compilation it ...
1
vote
1answer
132 views

Does anyone know if the listed prerequisites for TikZ's pgfplots package are slightly off?

Does anyone (not to specifically ask Christian) know if the prerequisite PGF/TikZ version listed in the PGFPlots manual is off by a bit? I've been trying to use \tikzset{external/mode=list and make} ...
1
vote
1answer
667 views

Marker color in legend

Since I updated to TexLive2012 yesterday, I can't get ant colored markers in my legend. Where as first I could put the following in the \addlegendentry options, it now won't work. ...
1
vote
1answer
504 views

Using pgfplots, why do minor ticks disappear when I change the base in logarithmic plots?

Plotting the same thing, just with different values for log basis y, the minor ticks disappear. \documentclass{article} \usepackage{fullpage} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...