Skip to main content
The 2024 Developer Survey results are live! See the results

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
4 votes
1 answer
75 views

PGFPlots library fillbetween causing a bunch of "Missing Character" warnings

When trying to shade the area between 2 paths using the fillbetween pgfplotslibrary, I'm getting the following warnings: Missing character: There is no . in font nullfont! Missing character: There is ...
msom's user avatar
  • 43
1 vote
2 answers
85 views

3D graph - issues filling space between curves and xy-plane

So I have a bunch of datasets stored in several .dat files that I have drawn on a 3D graph to show the data evolution according to a third parameter. In order to make the graph prettier, I would like ...
Marck's user avatar
  • 167
3 votes
1 answer
61 views

Filling a specific area with tikz

I am trying to fill a specific area in my tikz picture but didn't manage to do it correctly. It is a wave shape so it makes it a bit tricky to fill since it's not perfectly sinusoidal (on purpose). ...
Waxler's user avatar
  • 860
0 votes
2 answers
60 views

Fill Between Polar Graph Part 2

I have been looking for about 30 minutes and can't figure out how to shade the where area S is (both sides). I can fill the entire plot, but can't figure out how to use a soft clip to highlight the ...
Nick B's user avatar
  • 937
1 vote
2 answers
70 views

fill between curve and y axis

The following code fills the area between the function and the x-axis but the compiler ignores the fill between the function and the y-axis. I tried range= on the second fill because domain= seems odd ...
TonyK's user avatar
  • 647
2 votes
1 answer
72 views

PGFPlots bug between trim axis, fill betwen, and error marks

Using PGFPlots to plot a datapoint with error bars, in addition to using the fill between function, as well as the TikZ trim axis left, trim axis right keys, I get a weird bug where the error marks (...
asbjos's user avatar
  • 43
1 vote
0 answers
20 views

\pgfplotsset causes Error in combination with fill between or pattern

I want to do several plots in a .tex document and I don't want to set the linestyle for each line seperate. so I used '\pgfplotsset{every axis plot/.append style={mark=*, mark size=2pt, line width=1pt,...
Schranke's user avatar
0 votes
2 answers
86 views

Color the surface below and over a curve

After defining a curve as follows: \begin{tikzpicture} \draw[->] (0,0) -- (8,0) node[right] {$t$}; \draw[name path=black_function, thick] (0,2) .. controls (2,3) and (3,2) .. (4,1) .. ...
hanava331's user avatar
2 votes
2 answers
115 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
85 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,121
1 vote
1 answer
100 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
91 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
64 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
2 answers
90 views

pgfplots: 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
491 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,213
0 votes
1 answer
67 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
131 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,927
1 vote
1 answer
197 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,927
3 votes
2 answers
201 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
  • 599
1 vote
0 answers
55 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
  • 473
2 votes
1 answer
100 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
517 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
68 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
43 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,322
0 votes
1 answer
71 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
129 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
81 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
105 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
102 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
  • 863
3 votes
2 answers
181 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
201 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
545 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
  • 647
1 vote
1 answer
119 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,659
1 vote
2 answers
120 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
  • 339
3 votes
2 answers
399 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,598
2 votes
1 answer
79 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
267 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
523 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 ...
Waxler's user avatar
  • 860
3 votes
2 answers
492 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
126 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
57 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
268 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
79 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
126 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
  • 4,006
2 votes
1 answer
160 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
  • 339
3 votes
4 answers
275 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
  • 225
1 vote
1 answer
86 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
102 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
1k 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
200 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

1
2 3 4 5 6