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

Reproducing a 3dplot example from texample.net using pgfplots: drawing angles with pgfplots in 3d [closed]

I am trying to reproduce the 3dplots example from www.texample.net using pgfplots: So far, I did not come far at all, actually. One problem is that pgfplots does not allow to work in spherical ...
1
vote
0answers
200 views

Pgfplots: How to get the data to be shown by hours instead of days? [duplicate]

Possible Duplicate: pgfplot: Datafile format for datetime field The solution to the following problem is probably very straightforward, but I've yet to find the right solution. I'm trying ...
1
vote
1answer
553 views

use the coordinates of an axis tip with pgf plot

here's a drawing I just made (the sine function are replaced by external datas) \documentclass[12pt]{article} \usepackage{pgfplots} \usepackage{tikz} ...
1
vote
0answers
451 views

pgfplotsinvokeforeach using parameter [closed]

The following code works in the minimal example but not in my document \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \pgfplotsinvokeforeach{1,2,...,10} { ...
0
votes
2answers
216 views

LaTeX: plotting function, formatting axis

I've got some problems with plotting a function in a diagram with logarithmic axis: I doesnt give me any errors, but I don't see a graph. Do I need to include any other package? \begin{tikzpicture} ...
0
votes
1answer
41 views

How do I apply nodes near coords to a single bar / to a single plot?

After reading the pretty population pyramid question, I was inspired to "Tufte-ify" the graph to remove redunancy and clutter (and to become more familiar with pgfplots). I modified the code from ...
0
votes
1answer
310 views

pgfplots ybar glued to the y axis

My ybars are glued to my yaxis. How can I increase the horizontal space between the axis and the first bar, making them more condensed? I already tried setting x = 5cm for instance, but I just want ...
0
votes
1answer
636 views

tikz pgfplots forget plot

I'm having problems finding how to use forget plot in tikz. I need only 2 legendentries like this: but get a massive long list of every object in the graph. This post addresses the problem but seems ...
0
votes
1answer
141 views

Align right in table if no expression

I am using pgfplotstabletypset to read in a table -- I want all cells in the first column with the expression Factor in them to be aligned to the left and bolded, and I want all cells without that ...
0
votes
1answer
715 views

xlog scale with pgfplots for random x-values

in the code below, two things should be modified: xlabels and xgrid should appear for x=10^-0.1, x=10^0 and x=10^0.1 only the grid along the x-axis should reflect the logarithmic scale (ie, not ...
0
votes
1answer
55 views

Colorbar for pgfplots contour plot

I have to draw a contour plot of a large dataset, so I use lualatex as compiler. This example also works with normal latex, i.e. latex+dvips+ps2pdf. It works fine in latex but for the large amount of ...
0
votes
1answer
311 views

Dimension too large from matlab2tikz, and aligning graph axis

I have a MATLAB generated plot that looks as follows: Generated with this code: plot(fitGoodnessNRMSE,'b','LineWidth',1); axis([1 511 0.5 1]); ylabel('Normalized RMS error'); xlabel('q (um^-1)'); ...
0
votes
1answer
180 views

Import selected rows without header in pgfplots

Import of selected rows of a data set (without header line) The import should make use of the column numbers instead of row headers. The pgfplots' manual presents the possibility to use the command ...
0
votes
1answer
186 views

How can I draw with coordinates of intersection in pgfplots?

When using pgfplots, the command \pgfgetlastxy works well without axis environment and with axis environment set as default. But it is hard getting the correct coordinate of intersecting, when ...
0
votes
1answer
319 views

PGFplots ybar patterns not showing

I have a bar plot graph and I want to use patterns to fill the columns. However it seems that patterns are not working. For compiling I use pdflatex or lualatex. I also wanted to use pattern width ...
0
votes
1answer
48 views

How can I minimize the distance between 2 values on the x-axis?

I am totally new to pgf plots... My plot looks like this right now: How can I minimize the distance between "EOD" und "LOD"? That is my code: \begin{axis}[height=6cm, ybar stacked, ...
0
votes
1answer
55 views

\label \ref pair in pgfplots does not work on running latex command second time

I am preparing a long document with Latex on Linux. The document uses lots of plots including 3D plots. Without externalizing the plots, latex gives me a message of memory problem. After much ...
0
votes
1answer
128 views

Aligning .tikz pgfplots with semi custom styles

Previously I was helped with how to align and position graphs in a table with optional subplots in this question: Overlay two .tikz files from input It worked great, but I was not happy using scaling ...
0
votes
1answer
92 views

Scatterplot add a x line top of the line using Pgfplots

I want to draw a x line on the Picture-1 exactly like picture-2. I also want to remove the arrow as marked with circle. Any suggestion or complete code will be greatly appreciate. Picture-1 Code ...
0
votes
1answer
83 views

Failed to put two functions in one graph [duplicate]

I was trying to put two plots of different functions in one graph, but the second one didn't show up in the graph. Does somebody see the mistake? Here is the code: \documentclass{article} ...
0
votes
1answer
214 views

Package collision matlab2tikz and legend in polaraxis. pgfplotset and multiple size definition problem

How can plots, created by matlab2tikz and common tikzpicture-polaraxis be correctly used within the same document? The example is of the structure packages, matlab2tikz-pic1, matlab2tikz-pic2 and ...
0
votes
1answer
303 views

How to correct problem with ybar plot: bad axis and too many labels in x axis

I need a bit of help here with the axis... Any suggestions would be always welcome. I have got 2 extra labels at the x axis... \documentclass{scrreprt} \usepackage{pgfplots} ...
0
votes
1answer
156 views

Nearest-neighbour surface plot from matlab2tikz fails with colormap

I load an external custom colormap with \input{coolwarm_.map} I have a range of complex surface plots created with matlab2tikz which use this colormap and compile successfully. One does not. It ...
0
votes
1answer
339 views

Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf

I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled: dat1= [-500:1000, rand(1501,1}] dat2= [-500:1000, cos(rand(1501,1})] ...
0
votes
1answer
161 views

Stacked chart in TeX (added up line loads)

I've got a problem with finding the correct way or commands to make a nice plot in TeX, even with some basic experience in pgf/TikZ. Imagine a weight distribution with start- and stop values and a ...
0
votes
1answer
98 views

Switch from in-code data table to external file in macro

I have used the very nice grouping macro described here: How can I mix an "ybar" and an "ybar stacked" with pgfplots? I would like to be able to use it with data that I have read ...
0
votes
1answer
1k views

Labeling the axes of my plot

I would like to add a label to the axes of my plot. This is my code: \begin{figure}[!h] \centering \begin{tikzpicture}[scale=1] \begin{axis}[% % Lengend position legend pos = outer ...
0
votes
1answer
768 views

PGFplot Dimension too large/TeX Capacity Exceeded after reduction in domain and range

In trying to graph the intersection of 3^x and x^3, I was shrinking the domain to properly show one of the intersections. However, once I reduce the domain, I get either Dimension too large, or TeX ...
0
votes
0answers
25 views

Change line to “dashed” without changing markers [duplicate]

I use pgfplots and I would like to have a dashed or dotted line that still has solid markers. When I use dashed, it also affects the markers. That looks weird, and I would like to have solid markers ...
0
votes
0answers
49 views

How to draw linear inequalities in LaTeX [duplicate]

I want to draw the following inequalities in LaTeX. This set of inequalities define a region. I want to plot this set of inequalities. How can I do this? I want to achieve something like this. ...
0
votes
0answers
40 views

Loading table with zero values in pgfplots

I'm trying to create a stacked bar plot where the data is loaded using the pgfplotstableread command. I want to use a logarithmic scale rather than a normal scale. However, when I change theaxis ...
0
votes
0answers
42 views

matlab2tikz not maintaining subplot dimensions

The following Matlab script gives me the two plots of the time series object T204 a1=subplot(3,1,[1,2]) plot(T204) a2=subplot(3,1,3) plot(T204) It looks like this in Matlab: Then I use ...
0
votes
0answers
52 views

Break y axis for values exceeding range

Related to this question regarding values that exceed the axis range (which also provides the code for a MWE), I would like to modify the output slightly: instead of displaying the numbers above the ...
0
votes
0answers
56 views

Stacked Barplot inside Table in Latex [duplicate]

I would like to plot stacked bar plot inside table in latex. I have code which plots two different bar plots inside table. But i want to plot single barplot with stacked bars. How can I do it in ...
0
votes
0answers
124 views

pgfplots + gnuplot not working, shell escape and windows PATH are ok

I'm trying to get pgfplots to work with gnuplot to get this answer to work (i.e. triangulate a surface from a set of points). Shell escape was already enabled since I use TikZ externalization. gnuplot ...
0
votes
0answers
58 views

Choosing location of legend entries in Pgfplots

I am fairly new to using pgfplots and have been combing the manual for a couple hours now and I can't find an elegant solution to my problem. I would like to have two columns of legend entries and ...
0
votes
0answers
7 views

Skipping ticks in pgfplots plot [duplicate]

I have frequently the problem that too many data points are available for the x axis, I want to show them all in the actual plot, but I would like to show only a subset of the ticks. For instance, if ...
0
votes
0answers
49 views

Varying Error Bar Length In Timeplot Graph

I have a quick question about the Error Bars functionality in LaTeX, specifically - I am using pgfplots and tikzpicture packages. I was wondering if it is possible to vary the length of the Error bar ...
0
votes
0answers
105 views

Clipped bars in a stacked bar chart with pgfplots

I want to reproduce the effect from here where the bars are clipped if they are too long. However, I am using a stacked barchart and restrict y to domain*=0:<value> does not work. How can I do ...
0
votes
1answer
128 views

Trouble with pgfplots and ubuntu [duplicate]

Using writelatex (because I was at work where I had to use a windows machine which did not have a working Latex setup) I was able to produce some relatively nice-looking graphics using pgfplots. My ...
0
votes
0answers
17 views

Get (obtain/print/typeout) the width of a (standalone) pgfplot? [duplicate]

I'm using the tikz2pdf script, which I think internally uses the standalone class, to compile my tikz and pgfplots figures. Say, I have this simple example: \begin{tikzpicture} \begin{scope} ...
0
votes
0answers
51 views

Writing pgfplots macros that take coordinates as input

Is it possible to write macros for pgfplots that take coordinates as arguments. I want to use it like that: \begin{axis} \myMacro{(1 2 3)}; \end{axis} The goal is to write a macro that plots a ...
0
votes
0answers
84 views

How can I plot an implicit function in pgfplots without having to use gnuplot?

I have been trying to plot a couple of really simple implicit linear functions using only pgfplots internal facilities. Here is my MWE: \documentclass{article} \usepackage{pgfplots} ...
0
votes
0answers
44 views

x axis label on pgfplot [duplicate]

Hey all! I can't get rid of the 10:2 base at the x axis. I tried changing the precision, defining the ticks manually via xticks={...}. Everything works well on the y axis, I just can't figure out ...
0
votes
1answer
576 views

label font size in matlab->matlab2tikz

Does anyone knoy how can we increase the labels fontsize when we use the matlab2tikz (see this link) function from the mathworks file exchange? I always have to access the *.tikz generated file and ...
0
votes
0answers
64 views

Dimension too large in TikZ [duplicate]

I have some problems with drawing plots in TikZ. I use GeoGebra to build two curves and then export code into TikZ. So I get following: \definecolor{ffffqq}{rgb}{1,1,0} ...
0
votes
0answers
21 views

Bar Graph with Scale Break [duplicate]

I am new to PFGPlots and have been trying my best to create bar-graphs with error bars AND scale/axis break, but this is proving difficult please help me. Currently the Bar-graph C has too high of a ...
0
votes
0answers
59 views

pgfplots: undefined control secquence in a foreach loop [duplicate]

I am getting an undefined control sequence when using \col in a \foreach loop. ! Undefined control sequence. \pgfkeyscurrentkey ->\col \documentclass[tikz, dvipsnames]{standalone} ...
0
votes
0answers
27 views

How to install pgfplots in Ubuntu 12.04.3 LTS? [duplicate]

How to install pgfplots in Ubuntu 12.04.3 LTS from Terminal? I have the following: a@a-Compaq-Presario-C700-Notebook-PC:~$ pdflatex --version pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) ...
0
votes
1answer
165 views

PGFPlots: How to use a parameter t when plotting in 2D

I would like to plot some characteristic curves of the wave equation with parameter t which is time. x - \frac{\omega}{k}t = c where \frac{\omega}{k} is the phase velocity and c is constant. In my ...