Questions tagged [fillbetween]

{fillbetween} is a library of {pgfplots} that allows to fill the area between two arbitrary named plots. It can also identify segments of the intersections and fill the segments individually.

Filter by
Sorted by
Tagged with
2 votes
2 answers
75 views

Fill between f(y) and f(x) functions

I want to fill the area between an f(x) functions and an f(y) function. This is what I have so far: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz,bm} \usepackage{...
PlutoDust's user avatar
1 vote
1 answer
65 views

Fill between 4 circle and arc

I need to fill a zone defined by 4 arcs for which I know there centers and radius. I didn't manage to create the contour of this area and fill it. Here is my MWE with circle but the size of the ...
Sigmun's user avatar
  • 1,111
1 vote
1 answer
82 views

Help Tikz fill in between three curves solutions

I wanted my fill-in to go over and under the blue line. But i don't want the fill-in to go past the x axis to the other side (see image) I want no fill-in between there. Are there any solutions? \...
user303626's user avatar
1 vote
1 answer
37 views

How to Shade Area between Three lines in Tikz/PGF [duplicate]

I'm only aware of how to shade area between two curves, Simply by specifying a path for each curve with the parameter : Name path=A, etc. so far it worked by specifying 2 paths and then using command \...
Cristofer's user avatar
1 vote
1 answer
48 views

Fillbetween an interior bounded by multiple curves

I am using curvilinear coordinates to plot two "TV screens", and want the one in front to occlude the other. I would like to use \fillbetween to paint inside the outer one, but because all ...
Greg Zitelli's user avatar
3 votes
1 answer
46 views

pdfplots: fill area to LEFT of curve

I am trying to fill to the left of a curve, rather than below it. When I tried fill between, I got: Instead, the shading should be to the left of the curve, on the range [1.5,3]. My code: \...
Michael S's user avatar
5 votes
4 answers
413 views

TikZ, fill the space between two paths

I would like to fill the space between the central semi-circumference and the solid black lines above. \documentclass[tikz,border=1.5cm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \...
BowPark's user avatar
  • 1,181
0 votes
1 answer
50 views

Color different regions of graph (tikz)

I would like to color the 6 different regions of a graph, delimited by curves, with different colors. It seems like I can only color one area at a time. This works to color one region: \begin{...
Valentina Rutigliano's user avatar
0 votes
2 answers
109 views

Filling the outside of the intersection between 2 curves in TikZ

I am trying to fill the outside of the intersection between 2 curves, using fillbetween option in TikZ. This drawing is a part of a more complicated picture; so I prefer to use my curve definition ...
Hany's user avatar
  • 4,637
1 vote
1 answer
128 views

Using fillbetween options to fill intersection areas in TikZ

I am trying to control filling different intersection areas in TikZ (including using patterns), utilizing the following code (I do not want to use \addplot, so that I can control the shape of the ...
Hany's user avatar
  • 4,637
3 votes
2 answers
94 views

Fill between relations

I am trying to make this graph. Reading a bit I got information about shading the inner part between two functions, but in my case neither is a function. I tried to do the following, but no success. ...
Zaragosa's user avatar
  • 561
1 vote
0 answers
36 views

How to improve this `pgfplot` break even chart?

I just finished my code for plotting the Break Even Chart, which automatically determines (almost) everything from only 4 initial data. The assumed minimum code is as follows: \documentclass{...
JJ Henry's user avatar
  • 403
2 votes
1 answer
72 views

Fill area between two lines and curves

I would like to fill the area as marked in the picture (blue color), I didn't manage to do so, this is my attempt \documentclass{article} \usepackage{tikz,amsmath, amssymb,bm,color} \usepackage[margin=...
Hariz Khaled's user avatar
4 votes
2 answers
346 views

Fill area under curve

I would like do highlight an area under a plot of data. The first area should be below the plot and above 8 on the y axis. The second area should be below the curve and below the first area and above ...
Michael Dorner's user avatar
2 votes
1 answer
62 views

Area under a curve between limits unbounded on one end and x=a

\documentclass[border=0pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{colormaps} \usepackage{subfig} \usepackage{graphicx} \usepackage{listings} \usepackage[format=hang]{...
Firebolt's user avatar
0 votes
0 answers
41 views

strange behavior when changing the x axis

I have a problem with my plot of a spectrum with shaded standard deviation. When I change the x axis, the whole graph is shifting. The problem does not occur, when I comment the fillbetween command. ...
Excelsior's user avatar
  • 2,282
0 votes
1 answer
52 views

Why is fillbetween not working

I want to fill the area between the function -x^3+4.5x^2-5.5x+3 and 0 in the domain [0,3] in the following, but I'm getting the error message: Runaway argument? {}lbetween[of = f and g]; \end {axis} \...
Thomas Anton's user avatar
1 vote
1 answer
62 views

pgfplot: Fill between while including decoration function

I am trying to fill between area for a specific plot within a groupplot environment. I have already tried to follow the pgfplot manual which is pretty clear with respect to the name path abd \path[] .....
otiuuaugusto's user avatar
0 votes
1 answer
76 views

axis lines on top fill between and clip marker don t work together

Taken independently the options work. But together : the fields are above the axes and the 1 is not displayed Field 2 and 3 are above axis Different color for Line and Field I tried several proposed ...
Latlock's user avatar
0 votes
1 answer
77 views

Why is the soft clip domain code not working properly when filling the area between two curves?

Why the soft clip domain code doesn't work to fill 0 to 3? \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{ decorations.markings,arrows.meta} \pgfplotsset{compat=...
Mehmet Onat's user avatar
1 vote
2 answers
83 views

pgfplots: Fill area delimited by 3 graphs

I have the following function plot: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0:0.8, ymin=0, ymax=2] \addplot[...
azimut's user avatar
  • 861
3 votes
2 answers
106 views

area legend and fillbetween

I would simply like to change the legend entries from being lines to a green rectangle for the first entry of the legend and a green rectangle for the second: I am using pgfplot and fillbetween, I ...
Matteo Bulgarelli's user avatar
0 votes
1 answer
95 views

Using fillbetween in pgfplot

I need to colour the area between the first and the second line of the graph in green and the area between the second and the third line of the graph in red: I am trying to do this with fillbetween, ...
Matteo Bulgarelli's user avatar
1 vote
1 answer
175 views

Trying to shade area under curve using pgfplots

From scanning Q/As here I've learned I need to add the fill between library. However, it is designed to fill between curves and I want to fill between a curve and the axis to indicate the integral. I ...
TonyK's user avatar
  • 489
1 vote
1 answer
80 views

pgfplots: Interaction of "fill between" with scope and foreach loop

I intend to create several plots in different places, each with fill between areas, using the foreach loop. While all other plot lines do appear as expected for every iteration of the loop, the areas ...
FlorianL's user avatar
  • 1,629
1 vote
2 answers
98 views

Filling the area delimited by several curves

I'm trying to draw the feasible set of a maximization problem. I've been able to draw the boundary of it, but I'm struggling to shade it. I understand that my fill between statement fills the area ...
Patricio's user avatar
  • 285
3 votes
2 answers
300 views

How to fill area between two ellipses and two lines?

Actually a question. I can not find a simple and elegant answer. The use of arcs makes me despondent. \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{intersections} \begin{document} \...
sergiokapone's user avatar
  • 5,368
2 votes
1 answer
57 views

Undesired line between "fill between" regions

i´m trying to make this plot: As you can see, I am having trouble on the right side. I want to make the colored regions disappear softly to the right. To make that I defined, for each color, two ...
DerSpanier's user avatar
5 votes
1 answer
190 views

Capillary waves in tikz-3dplot

Here I am again humbly pleading for your assistance. I need to replicate this figure: So far, I have managed to get this (the view point is not so important): But I am struggling to replicate the ...
Choguerrero's user avatar
0 votes
1 answer
172 views

Most efficient way to fill an area under a curve in TikZ

I would really like to have a simple explanation to how the path and fill functions work in TikZ. For instance, I don't know why I am unable to fill the whole area under the curve despite putting a ...
Wiss's user avatar
  • 515
3 votes
2 answers
351 views

Filling this parabola with pattern

I'm not entirely familiar with tikz but I want to create a drawing of a parabola, shaded (with the pattern, north west lines) and bounded. So far I've got this: \documentclass{standalone} \usepackage{...
Numenorean's user avatar
0 votes
1 answer
64 views

fillbetween gives undefined sequence error

I wish to create a shaded region between the step function and the curve. The following code gives the below graph. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \...
GNUSupporter 8964民主女神 地下教會's user avatar
0 votes
1 answer
42 views

Filling between two lines and an arc

I want to fill the space between two lines and an arc with color like in the photo This is the code I wrote: \documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{center} \begin{...
Tarek Acila's user avatar
2 votes
2 answers
180 views

Filling surface between a line and an arc in tikz

I have the following figure: And I want the surface A to be filled with color. Here's a my code: \documentclass[12pt]{article} \usepackage{tikz, pgfplots} \usepackage[utf8]{inputenc} \usetikzlibrary{...
Baya Electronics's user avatar
0 votes
1 answer
68 views

Fill an area between two curves

I am trying to fill the small area between the two circles, between paths A and B (in the code), could you help me, please? \documentclass[tikz,border=2mm]{standalone} \usepackage{pgfplots} \...
F.Marko's user avatar
  • 85
2 votes
0 answers
89 views

Using pgfplotspointgetcoordinates together with fillbetween command

I'm curios with following strange behavior of my code (see MNWE below). If the command for filling area between function is added, than the coordinates A and B are changed. It is weird for me, because ...
JardaFait's user avatar
  • 3,836
2 votes
1 answer
133 views

Shading area with crunch in axis

As per a suggestion, I'm splitting my previous (multiple) question into separate parts. I want part of the area below a curve to be shaded, but using a filled rectangle results (of course) in the top ...
Patricio's user avatar
  • 285
3 votes
4 answers
211 views

Plotting area under density curve with tikz

I want to plot the area of the curve below from x=-3 to x=0.32, but nothing I'm doing is working. Here's what I currently have: \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} ...
Lex_i's user avatar
  • 193
1 vote
1 answer
77 views

Fill between: How to cover a line that goes cross a filled region?

I am trying to draw a figure where a red line runs cross a region filled with blue. No matter how I tweak the fill opacity. It seems that the red line is always ``one layer" above the shaded ...
nnorange's user avatar
2 votes
1 answer
97 views

Fill a differential cross section

I am trying to fill an area between 4 paths, two lines, and two ellipses, that denote the area dσ. Here is my code. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{...
Edward Finkelstein's user avatar
5 votes
2 answers
847 views

How do you graph the definite integral of 1/x from -1 to 1?

I want to make a graph of the function 1/x with the area under the curve shaded, but I have absolutely no idea how to do that since the curve isn't continuous. Optimally, the negative area and ...
mlxd41's user avatar
  • 53
4 votes
2 answers
170 views

Fill area Between Two Lines with Only One Intersection

I am trying to fill the area between these two lines that only connect one one end. \documentclass{beamer} \usetheme{Berkeley}%{Marburg} \usepackage{tikz} \usetikzlibrary{patterns} \usepackage{...
Collective Action's user avatar
3 votes
1 answer
135 views

Coloring the area between circle and path in tikz

I'm new to tikz and for my thesis all the drawings I've made were in https://www.mathcha.io/editor and now the drawing I need to do can't done there so I need to code. The drawing I did is this and I ...
PunkZebra's user avatar
  • 165
1 vote
1 answer
238 views

\pgfplotsinvokeforeach Add one to the variable

I am trying to use the variable from a \pgfplotsinvokeforeach as a path name. I want to get both #1 and #1 + 1 for each iteration. I have not been able to get the #1 + 1 to work; it tries to use ...
Daniel Duque's user avatar
3 votes
1 answer
216 views

TikZ artifact when graphing (and shading) functions of y

I'm trying to make a simple plot of two functions (of y) and shade the area between them. When I use the shading plot, I get an artifact in the picture. I've tried changing the bounds and splitting ...
Zennin Casl's user avatar
1 vote
1 answer
240 views

Fill between smooth vertical lines

I want to fill the area between two curves that are more or less vertical. They go slightly to the side and they are smooth, but the problem is also present when I remove smooth from the \addplot ...
Max Power's user avatar
  • 113
1 vote
2 answers
170 views

pgfplots fill between and smooth don't work

I've been trying to fill the area between two curves plotted with pgfplots. The graphs are plotted from an external .dat file attached to the link below. The fill between command does not work for ...
maximus's user avatar
  • 23
2 votes
3 answers
240 views

Fillbetween is not working in my tikz image

I want the space between the two functions to be colored, with the domain in x of 0 to 4. But the space-filling is not working. Here's my code \documentclass{minimal} \usepackage[utf8]{inputenc} \...
Rafa_Asp1's user avatar
1 vote
1 answer
116 views

How to make dark the area under the curve? [duplicate]

I created the tikzpicture code using Geogebra. What change should I make to this code, to make the area under the curve shaded. The tikzpicture code is: \documentclass[10.pt]{book} \usepackage[...
Noor Aslam's user avatar
2 votes
1 answer
228 views

pgfplots fill polygon with gradient

I have the following three-dimensional surface plot and I would like to add a gradient to the red semitransparent area starting with black at x=0 and ending with white at x=1. Is it possible to add a ...
brnk's user avatar
  • 189

1
2 3 4 5