{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

4
votes
1answer
66 views

define color in pgfplots

I want to plot funtions and data with own colors using \definecolor{<name>}{<model>}{<value(s)>}. If I use this command in \tikzpicture it works. But if I use this command in ...
1
vote
0answers
15 views

Setting fontsize dynamically at runtime in matlab2tikz

I'm using the following matlab2tikz command to convert a Matlab plot into tikz: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', false, 'strict', ...
3
votes
1answer
26 views

Result of Catchfile doesn't work inside a tikzpicture environment [duplicate]

This is a follow-up to this question. I am trying to get points to be graphed using data from an external file. The vertical coordinates are countries, and the horizontal ones are years. For this to ...
2
votes
0answers
18 views

Pgfplots center plot horizontally, disregarding legend [duplicate]

I tried a lot around with setting anchors in the plot, but I couldn't manage to center the plot correctly. In this example the bounding box of plot and legend gets centered, but I want the plot ...
1
vote
0answers
41 views

Dimension too large when changing y axis mode

I am using tikz to plot a figure in x-y plane, however when I change the y axis mod to logarithmic scale, I face to an error "Dimension too large". I searched in this website, but there were the same ...
7
votes
1answer
152 views

How can I get a stacked bar with single values and sum on the side

Based on this question I was able to put partial and total values on my bar plot. My bars have some really small values though and it is impossible to fit the numbers in some ranges. I would like to ...
2
votes
1answer
41 views

Label problem in figure

I am new in tikz, in below red boxed parts shows x,y axis labels, Now it's automatically (appearing) incrementing (0,5,10,15,20) my expected out is like (1,2,3,4). I am using the following code. How I ...
6
votes
2answers
185 views

How to fill the space between two \draw lines

I am drawing two lines and I need to fill the space between them with a green color. How can I do that in tikz? \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{patterns} \begin{...
6
votes
1answer
83 views

pgfplotstableread + addplot table: scale column for re-use

I get output files from a code and I want to display the output file with pgfplots. I want to create several different plots with the same files. Therefore, I read them in a macro with pgfplotstable. ...
6
votes
1answer
91 views

using variables or commands in pgfplots axis definitions

This is probably a silly way of doing it but bear with me. I have a document in which I define values in lua tables to reuse them either in a tables or in a pgf plot after applying some calculations ...
2
votes
1answer
31 views

Tick labels with decimal places

I want to have my axis tick labels in a plot with the first decimal place: 2 -> 2.0, 5 -> 5.0 Have anyone an idea how to do this?!
0
votes
0answers
28 views

Dynamically setting the fontsize with matlab2tikz

I'm using matlab2tikz to create a tikz file out of my Matlab plot. I'm using the following code: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', ...
2
votes
1answer
22 views

Repeated and misaligned xticks in PGFplots

I have a problem with the xticks in my PGFplot that I'm not sure how to even start troubleshooting. The tick labels are repeated and misaligned; basically they are all over the place. \...
3
votes
1answer
45 views

Problem with ticks and caption when importing Matlab figures using matlab2tikz

I have created a nice plot in Matlab and converted it into tikz with the matlab2tikz library. It works great but there are two problems: The ticks of the axis are not good. Especially for the y-axis ...
8
votes
2answers
82 views

tikzpicture cv graph

I've got a problem with tikzpicture. I've made my cv in Latex but one thing isn't working fine. The first graph should look like the other ones. If I remove the enlarge y limit={abs=1cm}, the graph ...
5
votes
1answer
77 views

Graphic-Tikz in latex

I have the following code: \documentclass[]{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \pgfmathdeclarefunction{gauss}{2}{\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2)...
1
vote
1answer
57 views

Plots are too small with two minipages

I have two plots, each one in a minipage, so they could be side by side. The left plot is significantly smaller than I would like it to be. How can I fix it? \begin{frame}[t,fragile]{CI construction -...
3
votes
1answer
23 views

Pgfplots: Scope inside axis environment - follow up

This is a follow-up question to this question: I still want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position....
0
votes
1answer
27 views

Standalone and PGFplot cropping

As asked here I set up a template for plots that can be used with standalone and included into the main document. 1 remaining problems is that the cropping does not crop enough of the whitespace ...
1
vote
1answer
12 views

Pgfplots: Alphanumeric x tick label

I have some data that needs to be plotted against time. But the time is not absolute (NOT 0,1,2,3,...). So I want to represent x tick label as relative labels (like t, t+1, t+2, t+3, ...). My data set ...
3
votes
2answers
120 views

How to use Tikz/Pgfplots to plot an algebraic curve on a restricted domain?

I want to plot for example equation y^2 x + x^3-3y^2-2x^2+x=0. But at the same time I need to gray out some parts of the plane (see shaded area). Is there a way to do this?
2
votes
0answers
49 views

Bar graph with elements from the document

In my document, I define some elements which all have a number (from 1 for the first to n for the last one) and a level (1, 2 or 3). At the end of the document, I'd like to create a bar-graph with ...
2
votes
1answer
56 views

pgfplots: macro to draw lines from point to y-axis

After reading pgfplots: help with macro to drop line to x-axis, I was wondering if I could do the same thing but with a line connecting the point with its y-axis projection. So I tried to modify the ...
2
votes
0answers
75 views

How to create a checkerboard tile pattern in pgfplot tikz

I am aware of several patterns available in tikz patterns, such as vertical lines, crosshatch and etc. However, I need to create some tile pattern similar to that of checkerboard pattern in order to ...
2
votes
1answer
47 views

Pgfplots: Scope inside axis environment or other relative positioning

I want to place an external figure inside a pgfplots plot. Additionally, I want to put some labels inside the external figure to mark the position. The expected result should look something like this:...
0
votes
1answer
47 views

Change direction of tikz pgfplot colormap

i want to change the direction of the colormap of a scatterplot. The "best" points in my plot are in the lower right, the "worst" in the upper left. So it would be nice, if the points in the lower ...
4
votes
1answer
85 views

Plotting ranges of data with tikz or pgfplots

I have a sample with countries and data. I would like to have a "comb" graph to show the years covered in the sample for each country. My data is like this : ####################################...
2
votes
2answers
79 views

How to use colors from a pgfplots colormap in pie chart?

I like the pie chart from http://www.texample.net/tikz/examples/pie-chart/, but it's in grey color. Then I found the modified version to add colors by "Sigur" here:How to give different color to each ...
3
votes
0answers
173 views

Coordinate Transformation for labeling with PGF-Plot

Difficulty with drawing the right coordinates I use pgfplots to draw a set of data points, fit them with gnuplot and then find the intersection points between the linear fits and a vertical bar. Now ...
1
vote
1answer
64 views

How to make the axis of the same?

How can I reproduce the top picture? Here's what I have so far: \begin{tikzpicture} \begin{axis}[xticklabel style={anchor=east,rotate=90}, date coordinates in=x, xticklabel={\day.\month.\...
2
votes
1answer
42 views

How to increase the thickness of the graph lines and remove the point?

It is necessary to remove the round and square dots on the graphs lines. And to increase the thickness of the line. \begin{tikzpicture} \begin{axis}[date coordinates in = x, table/col sep = ...
2
votes
1answer
151 views

How to turn 90 degrees to the axis of the date?

Rotate 90 degrees date. How to implement this?
3
votes
1answer
11 views

Use one axis' limit values in another axis

I'm working on a pgfplots source that plots a (dynamic) data file with different scale of the parallel axis. This is easy when you know the axis/data range in advance, but what if the range of axis/...
1
vote
1answer
32 views

Horizontal lines in dataplot

I want to add only horizontal help lines in my plot and not a grid. So I decided to add lines with \draw[very thin] but somehow these lines are different from each other. I want them to be all the ...
2
votes
1answer
55 views

lighter mesh grid line (faceted) color

For certain colormaps, the mesh grid line color is too dark. I would like to make it less dark. However not a fixed color as set with faceted color=blue,. My approach was to adjust the opacity as in ...
2
votes
0answers
30 views

Mark local maximum and calculate gradient in PGFplots

I'm using data from a tensometer to generate a stress-strain curve, but I want to find the yield point and the gradient between the start of testing and that point to calculate Young's modulus. Can ...
4
votes
1answer
31 views

Pgfplots bar chart with \times symbol as multiplier

I have a bar chart with relatively large values and I am using the near coords option to show the values over the bars. I want the \times symbol instead of \cdot for pgfplots multiplier. I know how to ...
1
vote
1answer
39 views

pgfplot: plot non-numerical data from CSV file [duplicate]

I have a csv file like: column1,column2 string1,value1 string2,value2 … Values are integers, strings are alphanumeric. I tried to plot it, with strings on x axis and values on y axis. After some ...
1
vote
0answers
14 views

pgfplot connects first and last point of line in the surf plot [duplicate]

I'm plotting a surface from data file arranged in columns x,y and value. The result looks like this: As you can see, first and last point of every line is connected. Relevant code: \begin{...
5
votes
2answers
68 views

Using Separate Serif and SansSerif Fonts in a Document

I have a bunch of figures that I am compiling using the standalone class in which I load two font packages mathpazo for the serif fonts and cabin for the sans serif fonts. The problem is that when I ...
2
votes
1answer
50 views

Spy glasses in a group plot

I have a group plot in which the graphs have common x axis and are stacked one over the other- like the one givenhere. Now, I want to have a spy glass on each of these plots in the group. But when I ...
1
vote
1answer
50 views

PgfPlots - Plot semilogx of a matched filter

I tried to plot a frequency response of a matched filter, which its response defined by: H(f) = Since x (=f) runs from very big negative value to very big positive value, and y (=H(f)) runs only ...
4
votes
2answers
65 views

Make a smoother plot of functions with pgfplots

The following code gives me a plot which is not very smooth. It looks like several points (with spacing 0.5 in the horizontal direction) are drawn first and then connected by straight lines. What ...
1
vote
0answers
22 views

Large data in pgfplots. Error exceeds memory?

Good evening. I am trying to include a sismo signal in my homeworking, it has 8,000 points. Is it possible to work in pgfplots? This is the error: ./Tarea 3.tex:266: TeX capacity exceeded, sorry [...
1
vote
1answer
22 views

Tikz: Square all y values in plot [duplicate]

I have a tikz file that contains a table. Can I tell tikz to square all $y$-values before plotting? That is, I want the entry $(2,3)$ to be plotted at $(2,9)$, without changing all entries in the ...
3
votes
1answer
52 views

How to join the points from an external file with smooth lines in tikz

I am working on plotting data from an external file. When I use the following code I get the points in the curve joined with lines, however I would like to join them using smooth curves. \begin{...
1
vote
0answers
28 views

tikz figure input line width from file

I would like to create a figure with different line plots, where I input the coordinates of the lines from a file. I would like to also input the width of each line from another file. is this possible?...
3
votes
1answer
19 views

pgfplots extra y tick formatting

In the MWE below I'd like to know to format the drawing such that the extra y tick is formatted with two decimals, but the rest with just one decimal Why doesn't it print zero? Zero should not be ...
2
votes
1answer
43 views

PGFPlots: Shift the entire axis environment to the right

I would like to plot two separate data files in two separate axis environments so that they are placed right next to each other. They will be part of the same subfigure, so I think I need to shift the ...
3
votes
1answer
45 views

adjustbox missing endgroup inserted. How to fit longtable to page width?

I am working on my thesis. The appendix contains 2 large tables that span multiple pages. These tables are wider than the page height in landscape mode. When using the \begin{adjustbox}{width = 1\...