{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

9
votes
2answers
3k views

matlab2tikz - TeX out of memory

I am using matlab2tikz to import figures from MATLAB to tex. However I quickly get the message TeX capacity exceeded, sorry [main memory size = 3000000]. I have tried expand main memory using ...
7
votes
1answer
293 views

PGFPlots: synchronize the filling of the bars with the colorbar

How i can synchronize the filling of the bars with the color of the color bar to the right? they are a little shifted... \documentclass[border=0.5mm,12pt]{standalone} ...
3
votes
1answer
235 views

PGFPlots: convert the filling of the bars

How can convert the filling of the bars from horizontal to vertical ? \documentclass[border=0.5mm,12pt]{standalone} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{% ...
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 ...
4
votes
1answer
1k views

Problem with pgf-plots and \pgfplotsset

Sorry for the somewhat long code, this is as minimal as I could make it. The first code is for typesetting pictures to indicate how a function increases and decreases. It is taken from a previous ...
1
vote
1answer
713 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 ...
5
votes
1answer
637 views

Counting points from csv file pgfplots

I am importing data from a .csv file to obtain a scatter plot, here's the MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ jitter/.style={ x ...
6
votes
1answer
529 views

Pgfplots remove darker borders on marks

Hi is possible remove the darker borders on marks indicated from the arrow ? Thanks \documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici ...
7
votes
2answers
528 views

PGFPlots colored regression legend

how can i have this legend? in this plot: \documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/number format/use comma,compat=newest,% ...
3
votes
1answer
317 views

Tikz : column header in groupplot legend with a loop

I'm trying to plot some data using loops, but i've some issues when I try to extract the column header and have it as a sub legend. Does anyone have any idea to fix it up ? \documentclass{minimal} ...
10
votes
1answer
2k views

pgfplots how to nicely place nodes

The picture produced by code blow, there are two problems I have. (1) the number above point overlapped (2) the precision of number is not right, eg. I want 0.913, not 0.91 For the first problem ...
6
votes
1answer
1k views

plotting a line in a barchart

Problem: line stops at given coordinates, ymax is not obeyed. \documentclass[a4paper,10pt]{report} \usepackage[left=1.5cm,top=2cm,right=1.5cm,bottom=1.5cm]{geometry} ...
3
votes
1answer
682 views

How to scale y axis and position labels in xbar plot

I have the following xbar plot. I have two problems: 1) to see all the bars I have to do "enlarge y limits = X", where X is found by trial and error. This seems to result in the bars not being ...
10
votes
1answer
2k views

How can legend entries be obtained from different plots in a groupplot?

I would like to place a legend outside an axis using symbols from multiple plots within a groupplot. Trying it the way I show below doesn't seem to work, just the last entry is shown. How can this ...
5
votes
1answer
320 views

PGFPlots - shift marks

I'm plotting two lines, more or less on top of each other. This is fine when you can see the colors, but not on a black and white print. I have added marks, but due to the data points being take ...
1
vote
1answer
182 views

PGFPlots: strange behaviour

Look at the differences between the following two plots. I would like to have in plot "1" the same distances between the colorbar, axis labels and the ticks labels that I get in plot "2". How can ...
6
votes
1answer
3k views

Logarithmic y-axis and restrict y to domain fails

I'm trying to plot data with a logarithmic y-axis and restricting the y-data to a specified domain, but compilation fails for a reason I don't understand. This is the code: \documentclass{standalone} ...
14
votes
1answer
482 views

PGFPlots % in ticks labels

Hi i want to put this simbol "%" in the tick labels only in the x axis how can i do?
3
votes
1answer
384 views

PGFPlots staggered axis

Why in this plot the axis are all staggered ? \documentclass[12pt,% % corpo del font principale a4paper,% % carta A4 % ...
9
votes
1answer
1k views

Is it possible to change the color of a single bar when the bar plot is based on symbolic values?

I am beginner in LaTeX, trying to use it for industrial documents. I wonder if there is a way to change the color of only one bar of the plot below, ie "TestDetails", to illustrate it is a local macro ...
1
vote
1answer
676 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?
5
votes
1answer
879 views

Is there any way to remove mesh lines completely in a pgfplots faceted 3d plot?

I can not seem to find the way to remove the lines in the surface mesh in a 3d faceted plot. I need a solution that does not use the "shader=interp" (i.e. gradient filling) so that the faces are ...
9
votes
2answers
714 views

Is lualatex supposed to be a superset of pdflatex? (regarding production of PDF)

In other words, is it a bug if lualatex cannot compile a document that pdflatex can? Based on the answers to this question How to expand TeX's "main memory size"? (pgfplots memory ...
1
vote
1answer
1k views

How to include extra ticks in pgfplots without them appearing in bold face?

In order to include a cross through the origin in my plot, I write the following under \begin{axis}: extra x ticks={0}, extra y ticks={0}, extra tick style={grid=major}, However, the 0s appear in ...
3
votes
1answer
2k views

Distance of the axis labels Pgfplots

Why this options change the distance of the axis labels in this plot ? \pgfplotsset{/pgf/number format/use comma,compat=newest,% width=12cm,% height=9cm% ...
2
votes
1answer
406 views

Pgfplots two datatable in the same document

\documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/number format/use comma,compat=newest} ...
4
votes
0answers
440 views

Decorate pgfplots mesh

In my quest to solve this question I'm trying to see if I can decorate a mesh-plot by drawing many circles or maybe rectangles with a radius determined by \pgfplotspointmetatransformed. But I can't ...
14
votes
1answer
1k views

How do I draw a plot with a variable line width in pgfplots?

I have highly dimensional data for which I'd like to draw a plot where I vary the line-width, somewhat similar to the famous Minard chart: I suspect this can be done with some combination of point ...
6
votes
1answer
736 views

How to regulate the decimals in numbers placed above barplots?

I am using the latex package "pgfplots" for producing x-barplots. In these plots the height of each bar is placed as a number to the right of the bar, as shown here: The code for producing these ...
7
votes
1answer
664 views

Two different scales on stacked barplot

What I want to plot I'd like to plot several stacked xbar plots where each bar plot contains two values. The total from each xbar-plot is based on one unit, i.e. the smallest bar represents "1" ...
7
votes
1answer
662 views

How to change the weight of a pin line in PGF Plots?

Using pins is a nice way to annote your plots in PGF Plots. However, I would like to have the weight for the line leading from a point on the graph to the text to be bold. How do I do this? Consider ...
3
votes
1answer
270 views

Why aren't the titles ordered in the same way data is in groupplots?

I'm trying to display a few plots using pgfplots and groupplots using the following example. I take the titles of each plot from a different data file than the data itself. The data appear to be ...
5
votes
1answer
344 views

How to change the spy connection path

Is there a way to change the spy connection path to looks more like these in red on the picture beneath? Thx in advance. \documentclass[frenchb,11pt,a4paper]{report} %Type de ...
14
votes
2answers
5k views

Change linestyle within a plot to add dashed trendline?

I'd like to add a dashed line to the end of a plot to indicate a future projection as opposed to real data. I can do this by adding a second plot, as in the example below. However this isn't really ...
5
votes
1answer
1k views

Dates as xticklabels ; number formated dates provided

I would like to plot temporal data and have dates as tick labels. I have seen chapter 4.20 Symbolic Coordinates and User Transformations from pgfplots manual but it does not correspond to my situation ...
8
votes
3answers
2k views

Surface plot with coordinates in pgf

Is it possible to draw a three dimensional surface using coordinates instead of formulas? MWE so far: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
7
votes
1answer
2k views

Zero space between bars in pgfplots bar graph

I want to draw a bar graph with the bars touching, like in a histogram, using pgfplots. This is basically what I'm aiming for: That plot is generated with this code: \documentclass{article} ...
4
votes
0answers
29 views

Mask Scaling Factor from axis [duplicate]

Possible Duplicate: How do you remove the axis multiplier? I'd like to mask the scaling factor from my plot: Here's an image I marked it with two red circles. How can I do this? ...
6
votes
1answer
3k views

Vertical line in ymode=log plot

Please have a look at the following MWE: \documentclass{article} \usepackage{pgfplots,pgfplotstable} \begin{document} \begin{tikzpicture} \begin{axis}[ %ymode=log, ] ...
5
votes
1answer
1k views

pgfplots axis cs nodes inside a scaled tikzpicture

I would like to join a node inside a pgfplots axis to a node belonging to a different tikzpicture. I can do this with an overlay from inside the axis. However, if I scale the tikzpicture that encloses ...
9
votes
1answer
596 views

Circular drop shadow around a spy in pgfplots

The pgf manual isn't really explicit about it, so i'm here to ask it to the stack communauty. I tried to put some shadow/blur effect around the spyonnode but with no effect at all ! I tried this : ...
9
votes
1answer
1k views

PGF Plots compatible for black and white printing

A plot I originally prepared using colors needs to be printed in a journal that only permits black and white graphics. My question is two-fold: What is the best way to clearly make different graphs ...
8
votes
1answer
909 views

pgfplots: color a surf using arbitrary colors

I am trying to figure out if there is an equivalent in pgfplots to what in MATLAB is done through the following command: surf(A,B). This would plot the geometry A, using the colors specified in B. I ...
1
vote
0answers
1k views

Can't plot a surf from MATLAB using pgfplots [closed]

for whatever reason I cannot come up with I am not able to plot a surf figure I have generated in MATLAB and then converted to tikz using the script available here. I am getting the following errors: ...
3
votes
1answer
763 views

coloured fitting pgfplots

I want to fit this data with a straight line and both the straight line that the points have to follow the color of the colorbar horizontal. Another problem is that I can not adapt the grid scale.. ...
25
votes
3answers
5k views

How to design a 3D donut pie chart with pgf-plot?

It seems that pgfplots users don't like pie charts but sometimes we can't go without (for some reasons). So I was wondering if there was a way to make what is called a donut chart. For example one ...
6
votes
2answers
1k views

Force “axis on top” for plotmarks in pgfplots

The pgfplots manual says that axis on top=true won't affect the plot if using plotmarks as this usually doesn't make sense, which I agree with. However, in this case I'd prefer both the axis and tick ...
4
votes
1answer
592 views

pgfplots, plot options ignored when using “restrict expr to domain”

This is my first post here. I want to use pgfplots (wonderful piece of software/code) to display some data (A,B,C) from a experiment. In some diagrams I want to plot x=A and y=B but only for some ...
5
votes
1answer
2k views

pgfplots particular legend

\usepackage{pgfplots} \pgfplotsset{width=10cm} \begin{figure} \centering \begin{tikzpicture} \makeatletter \newcommand{\pgfplotsdrawaxis}{\pgfplots@draw@axis} \makeatother \pgfplotsset{axis line ...
29
votes
2answers
5k views

How can I add a zero line to a plot?

I frequently need to draw a horizontal or vertical line passing through the axis origin that spans the entire width or height of my plot area. I don't want to use axis lines=middle, because the tick ...