# Tagged Questions

{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.

625 views

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 ...
2k 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 ! ...
822 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 ...
701 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: exp(0)...
7k 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! ...
3k 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, 20)...
937 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 ...
6k 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] \...
354 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 ...
2k 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 ...
698 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 ...
269 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] \addplot[fill,opacity=0.5,...
917 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 ...
502 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 ...
238 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 {...
1k 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} \usepackage{...
265 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, ...
748 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 ...
2k 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} \...
4k 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 ...
314 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 \$. \...
299 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 ...
202 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 ...
273 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 ...
59 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 domain=-1:...
391 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} \pgfplotsset{compat=...
1k 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) ...
309 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 ...
476 views

### Using external selective for TikZ-pictures [closed]

For the following example: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc,external} \usepackage{pgfplots} \tikzexternalize \begin{document} \tikzstyle{...
3k 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 ...
360 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} \begin{...
1k 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 ...
481 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 ...
422 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? \documentclass[a4paper,12pt]{...
492 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: \...
706 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 ...
3k 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 ...
995 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 ...
3k 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 ...
10k 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 ...
500 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} \...
549 views

### pgfplots: Plotting one data set with label and the other without label [closed]

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 ...
428 views

### pgfplots: using macro for tick label

I would like to use a macro to define the label of an extra tick in a pgfplots picture. When the macro uses a greek character it generates an error: ! Missing \endcsname inserted. Here is my MWE: \...
539 views

### Missing mark at legend for tikz bar chart

I have the following code: \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label First Second Third test 30 30 40 }\datatable \begin{axis}[ xbar ...
328 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 ...
1k views

### Group together two and two bars in pgfplots

I have a bar plot and i would like to emphasize that two and two pairs belong together. So i need some padding between Cornell Box and Conference Room, and Conference Room and Sponza. Also maybe a ...
594 views

### Externalize pgfplotstable with csv file

This is a direct follow-up question to this: Adding units to pgfplotstable header After fixing the output I tried outsourcing the table. After figuring out that standalone does not work with ...
2k views

### Create x and y label which overlaps for multiple plots

I have a groupplot of 5x3. Now I want to be able to 'overlap', so to speak, the ylabel over all the plots vica versa for the xlabel. This enables me namely to make the groupplot smaller. Currently I ...