{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
0answers
22 views

Reading a defined number of line from a file with **addplot**

I'm using addplot to create figures from an external txt file. I want to create different figures, using an increasing number of lines of the data file. Obviously i can create different data files ...
2
votes
0answers
66 views

How to make 3D ribbon plots in PGF/TikZ

I'd like to make a bunch of 3D ribbon plots in TikZ or PGF, I've taken a look around and I've found no hints on how this might be accomplished, is there a simple way to do this? I'd settle for a 3D ...
2
votes
0answers
44 views

stacking histograms in pgfplots

The stacking is not working correctly. This is what I get: This might be a problem of different bins, but even restricting them is not working (slightly related questions about common bins are ...
2
votes
1answer
44 views

How to have unconnected points on a plot?

I'm trying to create a graph which has all of the datapoints from an inline table plotted, without a line connecting them, but still having the points on the graph. The issue with the MWE is the line ...
2
votes
0answers
57 views

Why the `.tex` file is running indefinitely in PdfLaTeX?

I am using the following code to plot a set of graphs from the experimental data given in book1.txt. This .txt file is also kept in the same folder along with .tex. My book1.txt file is A B ...
2
votes
0answers
60 views

Blurred colormap using matlab2tikz to export Matlab imagesc picture

I'm using matlab2tikz to export imagesc figures into TikZ/pgfplots code. This process gives me a TikZ file and a rasterized png version of the image with colours matching the colourbar at the time of ...
2
votes
0answers
34 views

Little problem ploting edge with mesh, pgplots

I'm ploting the function z=1+|x²-y| making \documentclass{article} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.12} \begin{document} \section{Introduction} \begin{figure}[h!] \centering ...
2
votes
0answers
38 views

Polaraxis with error bars in pgfplots

Im trying to plot some values with error bars in polar coordinates. Here is my MWE \begin{tikzpicture} \begin{polaraxis} \addplot+[only marks,mark size=1.5pt,error bars/.cd,y dir=both,y ...
2
votes
0answers
55 views

Tikz/PGFPlots produce different graphs when compiled on my desktop and ShareLaTeX [closed]

I am experiencing a weird Tikz/PGFPlots issue. For some reason, the y-coordinate of nodes is being places relative to the bottom of the tikzpicture instead of the origin. The weird part is that it ...
2
votes
0answers
33 views

How do I set /pgfplots/trig format?

I am trying out pgfplots: \documentclass[]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[xmin=0,xmax=2,ymin=0,ymax=1.25, samples=50, /pgfplots/trig format=rad] ...
2
votes
0answers
46 views

pgfplots 3D plots size versus 2D plots size

I wanted to create a 3D plot but it's not possible for me to set the right size. Should I try out until I find the right values for height and width for the 3D plot or is there an easy way to find ...
2
votes
0answers
48 views

Translate plot data from file in tikz

I have some x,y coordinate data organised as two columns in my mydata.dat text file. I have no problem plotting this, but I want to plot the same data but just translated by some 2d Vector. My attempt ...
2
votes
0answers
62 views

\foreach in pgfplots [duplicate]

My final goal is to create a groupplot with 10*10 figures. I here have reduced the problem so that it will be easier to explain. First, I have created some dummy data which I store in test.txt and it ...
2
votes
0answers
36 views

Adding a Trend Line to a dateplot

How could I add a trend line to this plot? Many thanks! \begin{tikzpicture} \begin{axis}[ date coordinates in=x, xtick=data, xticklabel style= {rotate=90,anchor=near ...
2
votes
0answers
42 views

Plot three dimensional surface plot using (x,y,z) coordinates [duplicate]

The following is the data I am trying to plot in latex. Rise_time_id,Overshoot_id,Settling_time_id,Rise_time_iq,Overshoot_iq,Settling_time_iq 0.0075165,1.4333,0.3615,0.0016402,20.752,0.37196 ...
2
votes
0answers
49 views

Increasing datetime resolution, to be used for log files

I have some log files with a full time stamp like this: time value 2015-10-15 13:16:48.019901 56 2015-10-15 13:16:48.066701 53 2015-10-15 13:16:48.097900 57 2015-10-15 13:16:51.126281 61 ...
2
votes
0answers
69 views

PgfPlots - Data in one column to be plotted into separate graphs

I have a large amount of measured data, that I would like to plot. Data are organized into three columns where the first column provides a frequency, the second and third column are values measured at ...
2
votes
0answers
62 views

Plot table in 2 colors

I have the following result: but I need this result: The code I used is the following. \begin{figure}[H] \centering \begin{tabularx}{12cm}{c} \begin{tikzpicture} ...
2
votes
0answers
28 views

pgfplots not adjusting y axis

I'm using pgfplots to do a simple plot, but where the functional values are huge with very small differences. The problem is, that the y axis is not automatically scaling as it should to look good. ...
2
votes
0answers
58 views

Using pgfplot to draw lines with semilogyaxis with negative y values

I'm trying to draw lines with log y mode using pgfplot. I have a table looking like the following: 0.00097656 -56126 0.0019531 -53585 0.0039062 -33705 0.0078125 -25956 0.015625 -18886 0.03125 -10538 ...
2
votes
0answers
42 views

pgfplots+fillbetween code no longer compiles correctly

I recently dug up some old code and it doesn't compile the way it used to. Here is a MWE: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage[english]{babel} ...
2
votes
0answers
73 views

Arrows with curved line

I Need to reproduce a figure somewhat like the one here: Drawing Angles The problem is that I get a figure wich differ from the original one: the arrow at the end of the spiral get vertical ...
2
votes
0answers
107 views

Draw a convex hull and a plane using Pgfplots, in this specific case:

I have 2 surfaces to plot. The first one is a convex hull that passes through 7 points, and the second one is a plane formed by 3 points. The corresponding code is the following: ...
2
votes
0answers
84 views

PGFPlots: Sometimes minor ticks don't show [duplicate]

See code below: xtick={-0.8,0,...,3.2} does not show minor x ticks, but, for example, xtick={0,0.5,...,3.5} does. I'm confused, what's going on? \documentclass[border=0pt]{standalone} ...
2
votes
1answer
97 views

Draw sphere and add scattered data with color information [closed]

My goal is to plot 3D data (x,y,z coordinates) such that a certain path on/inside a unit ball is illustrated. Since the path will not only be on the surface of the unit ball I have to encode the norm ...
2
votes
0answers
23 views

Colorbar for lineplot using pgfplots [duplicate]

I am doing a lineplot with pgfplots. However, instead of the usual legend, I would prefer a colorbar, as I am basically trying to visualize a transition, and for that I chose colors in a gradient like ...
2
votes
0answers
38 views

Change ONLY the color of the plot for z = 0 with surf, possible?

Is it possible to change the classical blue color for the surface on the plane at z = 0? I would like to change ONLY the blue with a transparent colour or white. Thanks.
2
votes
0answers
66 views

Box plots from dataset with metadata in one column and data in another

How can I instruct pgfplots to generate a boxplot from a dataset with an identifier in one column (Label in the example below) and the data in another column (Value in the example below)? I would like ...
2
votes
0answers
42 views

PGFPlots colorbar incompatible with set layers

This is just out of curiosity. If I use the command \pgfplotsset{set layers} in conjunction with a colorbar, the plot is shifted on my page and the colorbar does not appear where it is supposed to. ...
2
votes
0answers
98 views

How can I automate the plotting of step functions?

I'm using a lot of step functions in my master's thesis and would like to automate the plotting. I can get them to look just as I want by hand using this method, but when I try to automate it like ...
2
votes
0answers
111 views

Adding Arrows and Text in tikz figure

I need your input on something again. I'm playing around with Tikzpicture and creating plots within the latex environment. I am trying to produce this graph (or something similar to this): So my ...
2
votes
0answers
209 views

'parula' colormap in pgfplots

I try to implement 'parula' Matlab colormap in pgfplots drawings. Here is the MWE for that palette with 10 points for interpolation: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ ...
2
votes
0answers
83 views

How to set axes limits for two types of plots when using groupplots

I have a rather big figure with two rows of plots where the first row has one y-axis and the second row has another y-axis. I would like to set the axis limits for these two sets of y-axes without ...
2
votes
0answers
208 views

Legend entry for each point in scatter plot with matching color

I have a file with multiple columns, of which I create scatter plots where positions are given from column 1 vs column 2, while the mark color is based on column 3. I now wish to automatically create ...
2
votes
0answers
50 views

Weird plot from discontinuous data [closed]

Tex gurus; I'm trying to plot some data against time, for which I have some missing values. Most of the time, this works well, but for one plot in particular I am getting some very strange results. ...
2
votes
0answers
46 views

Why does pgfplots scale dimensions differently in a polar plot

I am using pgfplots to draw two images with polar coordinates. Even though I specify the same value that represents the 100% value (radius of a 100 for both red circles, they are the last plots in ...
2
votes
0answers
20 views

pgfplots: tik labels missing and axis labels are inside plot [duplicate]

I am having major trouble in getting pgfplots to work on my Ubuntu 14 System. I am running the minimum example from http://www.texample.net/tikz/examples/pgfplots/ and the result looks like the ...
2
votes
0answers
490 views

Error using tikz externalize: can't write md5 file

I tried to use the externalize library. It worked fine when all my files where located in the same folder. Usually I am using a subfolder as build folder, where all generated files should be stored. ...
2
votes
0answers
119 views

Positioning of named nodes and paths within groupplot environments

I am having issues with pgf, pgfplots and the groupplots library. The issue is best explained with an example \documentclass[tikz]{standalone} \usepackage{pgfplots} %\pgfplotsset{compat=1.12} ...
2
votes
0answers
145 views

Import data to smith chart?

I have data in CSV format (or I can make it tab-delimited ASCII) and I would like to import it to a smith chart using the pgf (edit: pgfplots) package. The data contains 2 columns with the real and ...
2
votes
0answers
141 views

Groups of boxplots using symbolic coordinates

I would like to create a plot similarly as to the bar plot example, but with boxplots instead of bars. So far what I have this MWE: \documentclass{article} \usepackage{amsmath} ...
2
votes
0answers
119 views

Pgfplots' groupplots, automatic legend and axis name placement

So, I've been working on an answer to this question and worked on adapting it to groupplots, i.e. placing automatically legend on the outside margin, axis ticks and labels on the inside I'm facing two ...
2
votes
0answers
92 views

errorbars in pgfplots using raw gnuplot

I use pgfplots always in combination with the 'raw gnuplot' option because I like it better to preprocess my data using gnuplot. (curve fitting, complex calculations etc.) Now I am facing a problem ...
2
votes
0answers
153 views

Mark nodes/coordinates by label (pgfplots)

I am drawing a scatterplot, where the data is in a table and the values are labeled. I want to connect certain nodes with straight lines and in order to do so, one has to label the nodes/coordinates. ...
2
votes
0answers
92 views

3D plot from file

Hi I am currently learning how to do plots in Tex and I found a problem which I cant solve. I would like to do 3D surface plot from file but all what I get is a 3D line. For learning purpose I used ...
2
votes
0answers
79 views

Problem with pgfplot [closed]

I'm trying to use the template that can be found here https://github.com/matze/mtheme but I'm running into a problem which I can't resolve. The error message says; I can't find file ...
2
votes
0answers
215 views

Plot data and the mean of each column

I have a data file which looks like this: 1 256 2 197 3 190 4 188 5 219 6 169 7 179 8 181 9 182 10 178 where the first column are timesteps and the second column contains the ...
2
votes
0answers
101 views

Tips for making a lightweight long document

I wonder what tips should we keep in mind to keep a long document lightweight. I've written 3 chapters from my thesis with ~30 figs and some math, and document size is exponentially increasing (10MB ...
2
votes
0answers
171 views

Comparison of the plots of the same line on the Cartesian plane using pgfplots and TikZ

I have the plot of a line using pgfplots and the plot of the same line using TikZ. I would like them to be identical. I need to correct a mistake in the plot of a line using pgfplots. The point ...
2
votes
0answers
61 views

Misaligned text strings in pgfplots with view option set [closed]

Please see this post for more background. The problem is that tick mark labels explicitly specified by code of the form: text(x(k),y(k),labs{k},'horizontalalignment',horizk,... ...