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

Macro for pgfplot cycle list entry

I'm trying to define multiple cycle lists based on macro variables. The reason for this is that I need more than one list and I want to be able to change the appearance quickly while keeping the ...
2
votes
1answer
82 views

Force pgfplots to draw legend according to cycle list instead of the first plots

I use pgfplots to plot multiple curves from a file. The graph is plotted in two steps Draw only the marks, taking the original values from the file Draw only the lines, approximating the curve of ...
6
votes
1answer
131 views

How to make the legend box transparent in pgfplots?

The legend box is covering parts of the graph (even though I removed the borders). How do I make the legend box transparent?
1
vote
0answers
46 views

pgfplots: enlarge x limits abs value and date coordiantes

Enlarging x limits of date coordinates by an absolute value used to work with pgfplots 1.4, but it gives me an error with the newer version 1.8. Can anyone suggest a working solution to the minimal ...
3
votes
1answer
96 views

Pgfplots not plotting bar graph with all symbolic coordinates?

I am trying to create a bar graph using pgfplots. Specifically, I have 8 different bins of varying signal length against some computational time. I have set the x axis signal lengths to symbolic ...
0
votes
1answer
148 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)'); ...
4
votes
1answer
98 views

Drawing pgfplot from/to previously defined intersection points

I'm attempting to draw a plot, using pgfplots, where the start and end coordinates are intersection points I have computed earlier in the same tikzpicture. I start by defining the paths and ...
2
votes
2answers
121 views

addplot3 [area plot] filling the wrong area

using some saved data, i use (The data file cane be download from pX.txt where the first column is the x and at each iteration, I plot the other columns with respect to the first column) ...
6
votes
0answers
142 views

Different color

I use the following code to generate a plot \documentclass{article} \usepackage{xcolor} % colorize your documents \usepackage{graphicx} % and use graphics \usepackage{tikz,pgfplots} % ...
4
votes
1answer
147 views

How to move axis multiplier in a polar plot in pgfplot

How can I move the axis multiplier in a polar plot? In the following MWE, the axis multiplier is over the ticks and prevent the plot to be nice and readable. ...
4
votes
1answer
73 views

Problem in adjusting the mark size in pgfplot

I am trying to adjust the marker size in the following tikspicture. Unfortunately, when I configure the plot by adding mark size=0.85, the compiler complains with the following message. Illegal unit ...
3
votes
2answers
85 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 ...
5
votes
1answer
172 views

Pie chart slice with pattern background

I was able to create a pie chart based on the answer in How to draw Bar & Pie Chart. I realized my document is printed in grayscale and learned about patterns (Where is the pattern list gallery ...
11
votes
1answer
211 views

Polar Plots - layout and extraction of crucial parameters

Let S be some sort of function, depending on direction and frequency, for example: envir. background noise. I have S defined on a rectangular grid and I wanted it plotted on a polar grid. So far I ...
2
votes
0answers
46 views

How to get rid of base 10 multiplier in pgfplots axis [duplicate]

I'm making a graph in tikzpicture using the code below. \documentclass[11pt]{article} \usepackage[usenames,dvipsnames]{xcolor} %must come before tikz \usepackage{tikz} \usetikzlibrary{arrows} ...
2
votes
0answers
70 views

pgfplots: problem with stacked histograms

I want to plot data for a node that has several inflows and one outflow, using stacked histograms. I want the plot to look like this: First, I have tried stacked histograms (ybar stacked, see the ...
1
vote
1answer
132 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} ...
4
votes
1answer
99 views

read table from file , each row different number of columns

I have a data file where each row has a different number of columns, like this: x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ...
1
vote
0answers
47 views

pgfplots change fontsize to 1pt nodes near coords

i want to change the fontsize of the "nodes near coord" and also the y tick labels in a pgfplot to 1pt (no worries, that's just of theoretical interest). I found that ...
14
votes
4answers
339 views

How can I hatch the areas delimited by two intersecting curves like so?

This is a follow-up to one of my earlier questions: Fill area between curves. I want to color three regions delimited by two curves and a vertical line. Each should have its own shading and color. ...
4
votes
2answers
59 views

pgfplots ybar issue

I'm having trouble with pgfplots using ybar. When I try: \begin{tikzpicture} \begin{axis}[height=4.5cm, width=8cm, ybar, axis x line=bottom, axis y line=left, grid=none, ytick={0,10,20}, xmin=0, ...
3
votes
2answers
135 views

HSV shading of cone in pgfplots

How can I shade the surface of a cone according to the HSV color space? I'd like to create a drawing similar to this from Wikipedia: So far, I have this code: \documentclass{standalone} ...
1
vote
1answer
64 views

Axes for bivariate normal distribution with tikz

I got the following figure: with this code: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \def\centerx{2} \def\centery{-1} \begin{tikzpicture} \begin{axis} ...
3
votes
1answer
65 views

How do I get a pfgplot figure to take up the whole page?

So, I'm making figures using pgfplots and I have a problem: They don't centre on the page well. I'd rather stick to article for ease of printing and so I can have multiple figure in the same document ...
2
votes
1answer
45 views

pgfplots addplot 'domain' option overwrites/collides with axis 'domain' option

I have a problem with domain specification in addplot which collides with domain specification in axis. The code below plots the x axis as well as the function (expo) from 0.1 to 2. My desired ...
0
votes
1answer
63 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 ...
6
votes
1answer
143 views

How to glue these cubes together to form one big cube?

\documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ view={110}{45}, hide x axis, hide z axis, hide ...
6
votes
0answers
73 views

Automatically add discontinuities in some plots

I have multiple plots (about 15 different figures) that have the same axes (i.e., same ymin and ymax values and same xticks). One of the plots has very large values. I don't want to either increase ...
6
votes
1answer
100 views

How to orientate a pgfplot 3D plot

I am trying to plot a spiral such that it is orientated as shown in the rough sketch. The spiral is coming out of the screen. The script below yields the diagram shown at the end, but whatever I ...
15
votes
2answers
421 views

Fill area between curves

I need to reproduce the following plot: I tried the following code using pgfplots: \documentclass[8pt]{beamer} \usepackage{tikz} \usetikzlibrary{patterns} \usepackage{pgfplots} \begin{document} ...
9
votes
1answer
114 views

PGFPLOTS: Show x labels for every second tick

How can I show xaxis labels for every second data in this dataset. I want a bar for each tick, but not a label. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
2
votes
1answer
49 views

Loop in pgfplots doesn't work

I'm trying to do a loop in pgfplots to draw a bunch of rectangles under a curve, but it doesn't work. This is my code \begin{tikzpicture}\begin{axis}[ width=160pt,compat=1.5.1,grid ...
4
votes
1answer
184 views

Create PGFPlots Histogram from file

How can I create a histogram from a file as follows. I can't seem to pick up the variable names from the file even. \documentclass[tikz,border=12pt]{standalone} \usepackage{filecontents} ...
9
votes
1answer
123 views

groupplot pie charts

Is there a way to group pie charts using groupplots? I want to have something similar to this: Here is the MWE: \documentclass[times]{article} \usepackage{pgfplots, pgfplotstable} ...
4
votes
3answers
218 views

I want to plot the integral of sin(x^2) in pgfplots [duplicate]

i want to plot the integral of y=sin(x^2) in pgfplots but dont know what to put inside the ''{ }''. This is because its a prety hard function to integrate. Can someone help me!
1
vote
1answer
62 views

Number of rows in loaded table

Is it possible to determine the number of rows in a table read by pgfplotstableread{values.dat}\val ? My setup is the following. I make experiments to see how a parameter affects a convergence ...
10
votes
1answer
198 views

Solid sphere with a cylindrical hole through center (bead shaped solid)

I am trying to draw a solid sphere with a cylindrical drilled through its center. The best I have been able to do is: which does not show it is solid. How do I make it more solid in appearance? ...
0
votes
0answers
55 views

pgfplots: xticklabels and yticklabels in fractions

How to properly put xticklabels and yticklabels in fractions? \documentclass{article} \usepackage{pgfplots} \let\ds\displaystyle \begin{document} \begin{tikzpicture} \begin{axis}[ scale only ...
3
votes
1answer
61 views

Axis Multiplier near middle-axis

In PGFPlots I would like to have the multiplier for the specific axis near this axis when the axis is in the middle. The option xlabel near ticks does that, but moves the axis-label to the center of ...
4
votes
1answer
110 views

Change boxplot style

I'm following this PGFPLOTS manual. At first I was enthusiastic with it. However I'm finding some difficulties on doing even basic things. Now I'm trying to change boxplot style. Up to now I wrote ...
2
votes
2answers
72 views

How to change the x axis position pgfplots

I have trouble to shift the y axis. Is there any command to shift the y axis in the right direction (the first point where graph started) and start the graph exactly from the first point. Thanks.
0
votes
1answer
68 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 ...
8
votes
1answer
124 views

Help with a simple bar plot

I have some data in a table; the first column has some names; the second column associates a "category" to each name, and the third column associates a "section" to each name. All entries are ...
2
votes
0answers
20 views

Legend symbol not being displayed correctly in pgfplots [duplicate]

I'm trying to create a horizontal bar plot with log axis. Adapting several examples I could get what I needed. However, the legend symbols are not being displayed the way I want. Here's what I got so ...
6
votes
1answer
53 views

Not all tick labels are shown when using xtick=data

I'm trying to draw the following plot: \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} ...
4
votes
1answer
94 views

PGFplots: dashed lines

How can I do to draw vertical dashed lines which connect markers of one serie with the respective one of the other serie? X axes for both plot is the same. MWE: \documentclass[]{standalone} ...
4
votes
1answer
66 views

Create macro from fairly complex pgfplots code

I have this pgfplots code that takes data from a file mydata.tsv and creates a bar plot. Now I would like to transform it into a macro in order to use it for several files. \pgfplotstableread[col ...
2
votes
1answer
53 views

Math-type in y-label repeating; ghost line appearing

When I run the below code, my intended graph is created but with two issues: there is an odd grey line at the bottom which I can't track down and delete the math type from the y-label is repeated ...
2
votes
2answers
120 views

Reducing space in pgfplots xtick label number format?

With the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{intersections} %% named intersections \usetikzlibrary{fit} \usetikzlibrary{calc} ...
3
votes
1answer
61 views

Trouble plotting arctan with pgfplots

I'm trying to plot arctan(x) with pgfplots but I don't get a good output. Here is my code: \begin{cfigur}\begin{axis}[ width=160pt,compat=1.5.1,grid style={ultra thin},every axis plot ...