Questions tagged [pgfplots]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
24 views

Drawing multiple arrows between two given points with pgfplots

I need to draw some arrows between two given points in my diagram. I want to turn the shorter arrow into four smaller ones and the longer one into seven, all joined together. How can I draw them ...
2
votes
2answers
64 views

How to choose the right sequence for intersection segments?

I would like to fill the intersection between the disk and the form delimited by the folling plot : \documentclass[11pt]{report} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween}...
2
votes
1answer
23 views

TikZ's \foreach tuple in PGF

I would like to plot a list of data and add according legend entries. I tried to use \foreach for tuples which is implemented in pgffor package and loaded with TikZ. Unfortunately, the second variable ...
1
vote
1answer
22 views

How to draw bar chart with symbolic x axis values and vertical lines separating the group?

I have a y bar chart with symbolic values for the x axis. I want vertical lines drawn the separate the groups. There are examples of this when the x axis is numeric, but not symbolic. \documentclass{...
0
votes
1answer
19 views

Number axis with interval symbols

I am looking for something like this: I have tried using the pgfplots package, but I cannot figure out how to add the brackets or the colors
2
votes
1answer
46 views

Change group size in bar graph created using data table

I want to create a bar graph using data from a table. Tikz automatically groups my data, but I need a different group size. The code that I wrote creates the following output: But I want groups of ...
3
votes
1answer
78 views

How to use arbitrary font in pgfplots?

I produce the following chart: With the following code (compiled with XeLaTeX): \documentclass[border=5pt]{standalone} \usepackage[table]{xcolor} % more control over colors \usepackage{tikz} \...
1
vote
1answer
31 views

Dimension too large for a simple cubic formula

This is the plot I'm working on: \documentclass{book} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center, samples=200, xlabel={\(x\)...
0
votes
0answers
20 views

pgfplot with multiple y axis stacked on top of each other

Hodgkin and Huxley have produced this plot in their 1952 paper How would we reproduce such axis position and scaling in pgfplots ?
0
votes
1answer
25 views

there is a gap when two line pass the same point, at x=0.3. How to eliminate the gap? Many thanks!

code \documentclass[border=3mm]{standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{width=10cm,compat=newest} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[ ...
0
votes
0answers
25 views

Pgfplots polar contour plot from file table with shading

I want to generate a polar plot with a colorbar quite similar to this one: from this question: Rotating polar contour plot messes with alignment of plot and axis I want to use this file with the ...
0
votes
1answer
31 views

tikz-plot label and ref in beamer inside only overlay

MWE: \documentclass{beamer} \usepackage{pgfplots, pgfplotstable,stackengine} \begin{document} \begin{frame}{Frame Title} \only<1>{} \only<2>{ \begin{tikzpicture} \begin{axis} \...
1
vote
1answer
50 views

Align tikz subfigures correctly while respecting margins

I have a document where I include different subfigures using tikz. The problem is, that the numbers on the y-axis of the subfigures can have different length, which results in subfigures that are not ...
0
votes
0answers
13 views

pgfplots - surface plot with multiple surfaces, unclear intersection

I use matlab2tikz to generate figures, see attached first figure (this is an example to illustrate the problem) where two surfaces intersect each other. The generated tikz figure is shown below and ...
1
vote
0answers
26 views

Nichols chart grid for PGFplots?

So I have seen smithchart in the pgfplots library. I know that there is the bodegraph package, but for some reason, I don’t like the look of the grids, and prefer the original pgfplots over bodegraph (...
0
votes
0answers
50 views

How to produce graph with pgfplots [closed]

I was wondering how one would produce a graph that looks like the one attached in pgfplots with that type of legend. Any help would be appreciated!
0
votes
0answers
15 views

Make a list in of strings in LaTeX which can be indexed in \foreach

I have a tikz picture like so: \begin{tikzpicture} \begin{axis}[ width=0.9\linewidth, height=0.25\textheight, legend pos=north west, ymin=0, ] \foreach \yindex in {2,...,7} { ...
0
votes
1answer
23 views

How to get and store a coordinate y value so that it can be printed elsewhere? [duplicate]

Is it possible to get and store a specific y value from a plot coordinate, so that it can be printed somewhere else (for example inside a node)? \documentclass{standalone} \usepackage{pgfplots} \...
0
votes
1answer
30 views

pgfplots: compute axis cs point with pgfmath

I'm trying to construct a plot using pgfplots in which I perform \draw commands using axis cs. Additionally, the coordinates of axis cs are assigned to the result of a math expression using an ...
0
votes
0answers
23 views

Insert .obj file in pgfplots

My idea is to reproduce a figure similar to this one. At the moment the approach I have thought about is to use any free 3D model of a head an load it using pgfplots and then draw the planes. Is there ...
1
vote
0answers
51 views

“TeX capacity exceeded, sorry” when drawing graph with PGFplots (whats the max that can be drawn)

Hey I have this graph I'm trying to draw but it uses about 15k (x,y) coordinates. When trying to create this document I'm getting this error that tex capacity is exceeded. Is there any way I can still ...
2
votes
3answers
155 views

Calculating definite integral of smooth function in pgfplots

I have the following code which plots the graph of (1 - x^2)^n for n=1,3,5,7. Is there a way to calculate the integrals from -1 to 1 directly in pgfplots? The goal is to have normalized functions. \...
0
votes
0answers
21 views

Hot to put some nodes only when specific condition mets in pgfplots (3dplots)

I used below code for drawing 3dplots to represent some data 1 % Preamble: \pgfplotsset{width=7cm,compat=1.3} 2 \begin{tikzpicture} 3 \begin{axis}[ 4 view/h=60, 5 plot box ratio={1}{1}{1}, ...
1
vote
1answer
21 views

Can values be too small/big for pgfplots?

So i've got the following code, in which I want to extraplorate a linear regression line. My attempt was to add \pgfplotstableregressiona*x+\pgfplotstableregressionb as a new plot, but it simply won't ...
0
votes
1answer
36 views

Axis with Border

I am new to tikz and have been trying to create different graphics. I am trying to get a nice grid around the axis (like shown above). I am having trouble. I have tried several things, but nothing ...
1
vote
0answers
33 views

pgfplot/tikzpicture declare function error with sqrt(): missing number treated as zero

I am adapting the solution here to plot the slope field for a differential equation. The equation I would like to use is dy/dt = -sqrt(1-y^2). I can get it working for "simple" functions (...
0
votes
1answer
34 views

How to put series of small graphics on the graph?

I am making plots with y-axis breaks by placing one \nextgroupplot above the second one. These plots have not only curves but also some additional graphics, which are assigned to bottom coordinate ...
0
votes
1answer
36 views

Drawing Straight Line y=x and Coloring and Labeling Two Regions [closed]

How can I draw something like the figure below using latex:
2
votes
1answer
46 views

How to make curved arrows

I am a math teacher and I still have a hard time getting started with Latex, but I would like to know if someone could help me on how to generate the following example. Researching on the internet I ...
2
votes
3answers
189 views

Help me to draw the figure using tikzpgf plot

How to draw the following figure using Tikzpgf ? I need to plot with the axes exactly in the figure. Also I want to display the vertex (4,-2). I know to join two points (a,b) and (c,d) by ...
0
votes
1answer
80 views

matlab2tikz - problem with german letters - ä, ö, ü, \cdot and r_N

I'm using matlab2tikz the first time and get some problems with the first graph. I could seperate the problem. In the moment, I insert german letters like ä, ö, ü or special code like \cdot and r_N in ...
2
votes
1answer
53 views

I can't get latex(tikz) to draw a right square bracket

I am a beginner so please forgive any obvious mistakes. When using the code below \documentclass[letterpaper]{article} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{arrows} \begin{document} \...
2
votes
1answer
23 views

pgfplots: Two Y-axes in different unit systems

I am attempting to create a graph showing some results, and to plot SI units on the left Y-axis and Imperial units on the right y-axis. My MWE so far is getting close, but as you can see from the ...
0
votes
0answers
22 views

Problem with TexWork PDF generator in plotting TikzPicture

I have to export a PDF composed of a lot of pages, but OverLeaf can't compile (I use the free license). So I'm using the TeXWork program but among all the TikzPicture images, only one of these fails. ...
1
vote
0answers
40 views

Smooth plot with mesh option and table data in pgfplots

Is it possible to have the same smoothness of the black plot while using the mesh option? \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \begin{filecontents}{data-fake.dat} ...
1
vote
0answers
51 views

Placing marks outside coordinate system with pgfplots

I have a table of data (time vs. time) in a separate file and want to plot it with pgfplots. It works fine, but I have some special values denoting timeout in that table and I want to put them outside ...
1
vote
1answer
17 views

On fixing the issue with ytick alignment in groupplot

I am experiencing some issues while trying to have a common y axis scale as well as ticks. I tried some solutions like every plot/.style to ensure the range of the axes over the groupplot is the same ...
2
votes
1answer
31 views

pgfplots: how to bring all node plot annotations to top in proper way?

I'm plotting many almost parallel lines (in the MWE I'm just plotting random stuff), where I am using the very convenient node[pos=0.x]{label} option to annotate my graph. The issue is, that multiple ...
0
votes
1answer
23 views

How can I make \newcommand work together with \ticknum

I'm trying to make a lot of different variations of PGFplots label styles so I'm trying to define different values and use \ticknum to pick one of them for example \newcommand{\x0}{0.3} \newcommand{\...
3
votes
2answers
82 views

How to graph a function outside the domain using tikz?

I want to graph the function (x^(2/3))*(6-x)^(1/3) that is displayed as the results of Geogebra. But I get an error in tikz and it can only be graphed in its domain [0,6] \documentclass{standalone} \...
7
votes
1answer
131 views

Fill the intersection of 3 (or more) curves

I couldn't find a simple way to fill the area of the intersections of 3 curves. I want to fill this area: My try: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \...
1
vote
0answers
25 views

Adding a letter to the x-axis ticks of pgfplots graph of function [duplicate]

I'm new to stack exchange, so please let me know if there is anything I should do to make my question more clear. I'm new to LaTeX, and I am trying to make a graph of the equation from special ...
1
vote
1answer
34 views

Plotting disproportionate sets of data

I solved an optimisation problem for three cases. I intend to plot the results as a groupplot (essentially a 3 by 1 groupplot). Since I present six sets of data in each plot, I get a graph that looks ...
3
votes
1answer
72 views

Filling area between 2 Plots made by coordinates with transparent

I am trying to fill the area between 2 plots with lil bit transparency. Actually i got with fill between this figure: How can I only fill the difference between the two plots. Make the actual orange ...
2
votes
1answer
29 views

Citations in tikzpicture bar chart

I am trying to draw a bar chart using pgfplots in which I want to add references to x coordinates. I am getting the following errors with the output. Paragraph ended before \XC@definec@lor was ...
1
vote
1answer
25 views

Adding an extra y tick, also adds an unnecessary one in the other part of the plot

I want to construct a normal distribution probability plot. The x-axis is for the x-values of my bins, and the y axis shows the cumulative probability on the tick labels, but the y-values are the ...
1
vote
1answer
35 views

How to draw a line before points in a tikz picture

I have a problem with drawn lines in a tikz plot. It feels like the solution should be really simple but I don't know how to solve it. When I plot data points and a line, the line is behind the data ...
0
votes
1answer
37 views

pgfplot x axis ticks aligned with a matrix beneath |

How can I make something like this as shown in the image using pgfplots in latex. I want the x-axis tick marks aligned with the other texts as shown in the image.
0
votes
1answer
43 views

3d plot with pgfplots and tikz [closed]

Following coordinates: O(0|0|0) P\left(-\frac{25}{2}|0| 0\right) Q\left(-\frac{25}{2}|-12|9\right) R(0|-12|9) L\left(-\frac{25}{4}|-8| 6\right) g: \vec{x}=\left(\begin{array}{c}0 \\ -12 \\ 9\end{...
2
votes
2answers
140 views

PGFplots - Automatic choice of a cycle list according to the number of curves

Is it possible for PGFplots to choose (automatically) such or such cycle list according to the number of curves to display ? To illustrate, and using the colobrewer library, PGFplots could be ...

1
2 3 4 5
159