{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

7
votes
1answer
113 views

Remove the scientific notation which is unreasonable

From the original data, we know that they are nearly 0.087 rather that 0.087 x 10^-2. Why is there scientific notation (10^-2)? It looks ridiculous. Please help me figure it out. Thanks very much! ...
6
votes
1answer
33 views

pgfplots dollar sign in node, adjust space between bars

I'd like to format the nodes in this bar chart with $ signs (e.g $275). (The sets of bars could also be closer together; perhaps that should be another question.) The answer is probably out there ...
2
votes
1answer
44 views

Undefined control sequence \text when importing Matlab figures

I'm following a tutorial to import Matlab figures through tikz, however after trying to compile the .tex file I get the following error: ABD: EveryShipout initializing macros (./mysphere.tikz ! ...
0
votes
0answers
41 views

Evince does not read patterns properly [closed]

I found a bug of Evince not showing correctly TikZ patterns. If you compile the following code and open the generated pdf with evince you will see. The same happens with nautilus preview. With Acrobat ...
4
votes
1answer
63 views

Exact scaling with TiKZ-scale

I am using tikzscale to scale all my figures to the same size. This works quite nicely, but sometimes there is a difference in the scaled width. I can manually tweak the scale parameter (using pdfcrop ...
4
votes
1answer
99 views

Plot basic complex transformation in LaTeX

I want to first draw a shaded region on a xy-plane: 0≤x 0≤y≤π and then the image of the above region mapped onto a uv-plane by the transformation f=exp(z), i.e. the shaded region: ...
6
votes
1answer
76 views

Pre-defined color cycles à la RColorBrewer?

When I have multiple line plots in pgfplots, the colors of the lines cycle through a few colors (my guess is the colors are blue, red, black and dark khaki) before repeating with different marks. See ...
4
votes
2answers
58 views

Placing text inside graphs using pgfplot

My node markers disappear using this code. Is there a better way to do this? \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[domain=0:3] ...
4
votes
1answer
36 views

PGFplots axis with arrow tips at the end

By using the following code: \begin{tikzpicture} \begin{axis}[xmin=0,xmax=40,ymin=0, ymax=42, xlabel=Φρούτα,ylabel=Γάλα] \addplot [color=Blue] coordinates { (0 ,40) (20, 30) (30, ...
4
votes
1answer
36 views

Changing the format to a plot ticks (using pgfplots)

Dera all: I'm using pgfplots to plot the data from the table below (forst vs. fourth column), 3000 1.2970e+00 0.198956 0.258046 3100 8.6050e-01 0.18747 0.161318 3200 ...
4
votes
1answer
93 views

Multiple Y-axis plot (4 Ys YY-YY)?

Can someone help me creat a figure like the attached one which is generated by Origin Lab? According to Jack's suggestion, I made my tex code as follows. The last thing I have to complish is the ...
6
votes
2answers
72 views

Adding jitter to a straight line

I have found a post about: How to add a jitter to a scatter plot with pgfplots. I'd like to add jitter to a straight green line to recreate this graph.. Would this be the best way do you think? Also ...
4
votes
1answer
45 views

Modified pattern does not see the pattern color option

I have modified the north east lines pattern to accept a \LineSpace option that sets the density of the pattern (see the question Can I control the density of a pattern in TikZ?). The code works very ...
3
votes
2answers
282 views

Pgfplots \closedcycle introduces unwanted slope

I'm trying to plot two graphs with the area between them filled. This works fine, except for the fact that the \closedcycle does not go down vertically, but rather at some (arbitrary?) slope, circled ...
8
votes
2answers
98 views

how can I change the exponential value to decimal?

I want to make my plot completely in decimal. I used the function \pgfkeys{ /pgf/number format/precision=1, /pgf/number format/fixed zerofill=true } to make my decimal like 2.0 instead of ...
5
votes
1answer
45 views

Bug with smooth style and \closedcycle in PGFPlots

Could you please confirm the bug? \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines=middle,xmin=0,ymin=0] ...
1
vote
0answers
52 views

Free space in bar-chart with empty entries

I would like to plot some data set with the ybar option of pgfplot. But not all entries are nonzero. The zero entries waste space between the bars and when the plot gets crowed it is not clear anymore ...
1
vote
1answer
45 views

Gap between xaxis and bars in tikzpicture

I am adding a bar chart with tikzpicture and I am getting a strange gap between the bars and the y axis. Am I doing something obviously wrong? Because my other bar charts works fine... Should I ...
4
votes
1answer
48 views

Adjusting the distance between label and axis in pgfplots

The single label of following plot is intersected by the curve. How can I make it a little far from axis and point to axis by a dashed line? \documentclass[border=5mm]{standalone} ...
1
vote
1answer
46 views

Strange behavior with \draw within axis environment

Consider the following snippet of code: \documentclass{standalone} \begin{document} \begin{tikzpicture} \begin{axis} \draw[-latex,cyan] (axis cs:0,0) -- (axis cs:1,1); \addplot coordinates ...
6
votes
1answer
59 views

How to change the scale between ticks

Is it possible to change the spacing between two ticks? 4000-3000 = 3000-2000 = 2000-1500 = 1500-1000 \begin{tikzpicture} \begin{groupplot}[ group style={ group name=my plots, ...
4
votes
1answer
55 views

Consistent distance between bar plot groups of different sizes

I'm trying to make a bar plot where i always have one single bar paired against multiple bars. Two problems arise -- first, the first bar is assumed to have 6 other bar buddies and gets pushed to the ...
14
votes
1answer
129 views

How to add a regression line to randomly generated points using pgfplots in Tikz?

\documentclass{article} \usepackage{tikz} \usepackage{color} \usepackage[active,pdftex,tightpage]{preview} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
41 views

Problem importing a table containing dollar signs in pgfplots

I use pgfplot for plotting (obviously). I load a table from a file, but I have the problem that my columns can have a dollar sign in them and then LaTeX complains: ! Extra }, or forgotten $. ...
3
votes
2answers
128 views

Distance of the labels from the axis

I am a beginner with the package TikZ. I am using pgfplots to produce a very simple plot. The code I am using has been copied from an example found on the web, but my output is different from the ...
1
vote
0answers
41 views

How to turn off the axis in tikz plot? [duplicate]

Anyone knows how to let the axis disappear from my plot. \begin{tikzpicture} \begin{axis}[colorbar] \addplot3 [surf,faceted color=blue, samples=15, domain=0:1,y ...
4
votes
2answers
73 views

Add text around the X label

Fig 1 is generated by Matlab, and the following code is created using Matlab matlab2tikz package. The different between Fig. 1 and Fig.2 is the position of % symbol. Fig.2 is produced by the converted ...
1
vote
1answer
52 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 ...
4
votes
1answer
51 views

Display problems when plotting large datasets (unwanted spikes)

I have a problem concerning pgfplots and large datasets. I have the following minimal example: \documentclass{scrartcl} \usepackage{tikz} \usepackage{pgf} \usepackage{pgfplots} ...
7
votes
0answers
137 views

Unsung Heros - PSTricks, TikZ, pgfplots,

While watching presentations (mostly made with beamer) at my university I noticed, most people here use LaTeX to create there presentations which is really nice. (not just for the health of my eyes) ...
3
votes
0answers
70 views

Using `external` selective for TikZ-pictures

For the following example: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc,external} \usepackage{pgfplots} \tikzexternalize \begin{document} ...
0
votes
1answer
89 views

pgfplots: How to fix the number of yticks?

With max space between ticks= it is possible to set space between ticks, but I would like to setup the number of ticks, so all my graphs will look similar. I would be happy with 4 ticks, so if y vary ...
4
votes
0answers
40 views

pgfplots: percentages and endvalues in stacked ybar

I have two questions regarding the pgfplots package. I have attached the source code I worked on. There are two features I am not able to realize: I would like to put the total value (sum of the ...
5
votes
2answers
77 views

colored dotplot with pgfplots

How can I control the color of a dotplot created with pgfplots? I tried the point meta key, but apparently I did not get it right, since it is not respected. \begin{edit} I would also like to have ...
2
votes
1answer
94 views

Adding extra ticks inside the axis environment

I am wondering if it is possible to add extra ticks to a plot without declaring them in the options of \begin{axis}. Consider the following example, where I would like to have the coordinates of the ...
5
votes
1answer
51 views

Change font family in pgfplots (followup)

The MWE below shows that the solution at How can I change the font family in pgfplots? does not cover all the cases. The digits in the plot itself and the subscript in math mode in the title need ...
6
votes
1answer
219 views

How do I zoom a rectangle area in pgfplots adding a gray background even for the axis labels?

The background to this question is: I want to "zoom" into a certain area of a function and show it a little bigger. Furthermore, I want to put a gray rectangle as a background of the zoomed area, ...
3
votes
0answers
45 views

Increasing dateplot's resolution to seconds

These three dots should be spread out over a period of 50 seconds, but for some reason they all appear at 13:00:30. \documentclass{minimal} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} ...
3
votes
1answer
56 views

Scaling a multi-column TikZ/pgfplots groupplot to page width

I am trying to scale a pgfplots groupplot with multiple (and variable numbers of) subplots to match the \textwidth of a document. What I found is that there seems to be no direct relationship between ...
6
votes
0answers
81 views

externalize pgfplots, and only pgfplots

I would like to externalize the plots in my document (using pgplots), but not other inline stuff, such as bonds automatically drawn by chemmacros. That is, in the following test document: ...
3
votes
1answer
69 views

! Dimension too large

I keep getting the error Dimension too large when i make my \Desktops{80} and my \DTUnits{20} however if I change my \DTUnits{14} it works, can someone help me please? ...
2
votes
1answer
71 views

pgfplots “dimension too large” with 3D graphic from external source

I want to include a 3D plot that I created in R. The plot is prepared according to the example given for Matlab in the pgfplots manual. I cropped the whitespace around the saved png, added ...
6
votes
1answer
69 views

How to Graph Floor/Ceiling Functions in LaTeX (PGFPlots)

I am trying to make a graph of some floor/ceiling functions for examplep the floor of 3x+2 like this: http://www.wolframalpha.com/input/?i=graph+of+floor%283x%2B2%29#=. However, I searched through ...
10
votes
1answer
104 views

Presumed error of pgfplots in the “cutting” of a surface

I'm struggling with a 3D representation through the use of the package pgfplots. I'm faced with an alleged error in pgfplots (from my point of view). Consider the txt file (which is attached here) and ...
4
votes
1answer
52 views

Stretch y-axis in pgfplots

I'm using pgfplots for simple plotting 2-dimensional data from a plain datatable file. What i try is to "stretch" the y-axis by a factor (say currently i have stretched it by factor '1' which is the ...
22
votes
2answers
1k views

Axis break in pgfplots

Is there an easy way to 'break' the axis in a pgfplots environment? What I'm talking about is something like this Any minimal plot will do as an example...for example \documentclass{minimal} ...
10
votes
3answers
182 views

How to plot a surface from a set of data?

Disclaimer: I already read questions like 2D surface on a 3D surface plot external data in a file and 3D surface plots in TikZ but these did not solve my problem. I have this set of data: x y ...
8
votes
1answer
110 views

Background image for pgfplots chart

Following up on the answer to proper tool for charts in tex I've built this picture to simulate/replace a scanned image from a newspaper: I've tried several ways to put the background newsprint ...
1
vote
0answers
47 views

pgfplots: Plotting one data set with label and the other without label

I am trying to generate a plot using two data series and have the labels just on one of the series, but not the other. In the following example I would like to see the labels on first \addplot, but ...
5
votes
1answer
46 views

Reverse xaxis on polar plot

I'm tring to obtain a clockwise polar plot, keeping the zero in north direction. The plot is correctly displayed but I can't fix the xtick style. \documentclass[10pt,border=10pt]{standalone} ...

1 2 3 4 5 27