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

167 questions
Filter by
Sorted by
Tagged with
964 views

### Fill in between polar curves

I am trying to fill in space between a pair of spiral curves in tikz. I have tried using the fillbetween library but it just shades in the whole spiral. Does anyone have a hint they could offer? ...
4k views

### TikZ Fill for Fraction Diagram

I'm trying to shade in one third of this circle. Obviously, it's not working. What did I do wrong? I got no error messages for either of my attempts in the code below, but neither filled anything in....
2k views

### PGFPlots - Fill area between two curves

Recently I found a great example provided by the community of Stack Exchange where fillbetween was used to fill the area between a curve and a constant (see 1st image). I liked it especially, since ...
1k views

### How to draw areas between curves of the form $x=f(y)$ and $x=g(y)$?

I want to shade the region between two curves whose equations are of the form $x=f(y)$ and $x=g(y)$, where $f(y)\leq g(y)$ for all $y\in [c,d]$. I heard that pgfplots can be used. Also, the ...
1k views

### How can I fill between three circles like this pictures?

I am trying to fill like this picture, but I can not. My code is \documentclass[12pt]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns} \pgfplotsset{...
705 views

### Tikz - Filling a node with random smooth, closed shapes

I am trying to create the following illustration. Using Tikz, I managed to achieve a partial effect as shown below (please ignore the dimension mismatches). The code I used (MWE) for arriving thus ...
1k views

### color area under plot in pgfplots

I am trying to color the area under a plot between x = 500 to x = 1000. I am not sure how to get the colored area to show up just under the curve within those limits. Can you help me color the area ...
10k views

It's an easy TikZ question for people who use it. I tried reading the TikZ manual p. 112 several times but it seems too complicated on the filling part, all the infinity and whatnot... So I currently ...
836 views

### How to fill space between dotted lines in tikz picture?

I'm trying to fill an area between two dotted lines. I tried a lot of options, but none of them seem to work. I labeled the areas I need with the specific colors to fill. My current code is: \...
677 views

### Fill the area between two curves

Hi I am trying to fill the area between two curves. One curve is two joined arcs, and the other is one freehand curve. The part I want to fill is the white area. I use the fillbetween library but I ...
697 views

### Strange fill between behavior

I have just started to use the fill between library and it is very useful but I admit it sometimes is a black box for me. For example, if I want to fill the space enclosed by y=x^2 and y=2-x^2 (So ...
1k views

### Fill area between two curves up to intersection

I want to fill the area between two curves. What I have so far: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{patterns} \usepgfplotslibrary{fillbetween} \begin{document} \begin{...
914 views

### PGFPlots - Fill area between two curves

Three days ago I posted a question on Stack Exchange on how to fill the area between two curves (see question). It is my goal to have the fill area of two curves color differently based on when one is ...
728 views

### Fill area between two curves

I just asked a very similar question: Fill area between two curves up to intersection. However it turned out that my minimal example was too simplified. In fact, I want to achieve the following: ...
672 views

### FillBetween library sometimes works and sometimes does not [duplicate]

I have the following MWE using the relatively new fillbetween library from pgfplots. \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween, decorations.softclip} \pgfplotsset{...
2k views

### Fill intersection between two parametric paths (e.g. circles) in pgfplots

I tried to use the fillbetween library of pgfplots to fill the intersection of two circles. However I get it with "inverted" colors: \documentclass{standalone} \usepackage{pgfplots} \...
100 views

### Plot basic graphs (inequality)

I am beginner (and it is my fourth article here) and I am struggling with plotting some basic graphs. I found here some similar articles, but it did not help me. :( I want to plot graph, where is: y&...
1k views

### pgfplots fillbetween with multiple curves

I have a TikZ picture like this: \begin{tikzpicture} \begin{axis}[ axis lines=middle, xmin=-0.5,xmax=3.5,ymin=-0.5,ymax=3.5 ] \addplot[very thick,blue, samples=300, domain=0:3, name ...
1k views

### pgfplots: tick marks on axis with fill between [closed]

I am plotting a graph and shading some area beneath it using fill between like in this example: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=...
3k views

### How to fill an area with fading color?

I want to fill an area on a x--y plane with fading color, but have no idea how to do it. I know how to fill shapes with color, but not how to do it when the area is not a well defined shape. Let me ...
549 views

### How to shade area from one point to other for hobby curves?

I am trying to construct a image similar to a book. I am almost done except a last thing. What I want is and what I have is All I need now is to shade the area from $a$ to $b$. I tried soft clip ...
185 views

### Tikz/pgfplots shade to origin (polar)

I'm trying to shade in just one petal of a polar function. Specifically, I was wondering if there was a way to shade in the bounded region that lives between my two rays: I've tried searching for ...
748 views

### Filling areas under multiple adjacent curves

I want to shade the area of overlap for adjacent normal curves, shown in the lower graph. I can get shading between the first two curves but not for subsequent curves. I need shading at overlapping ...
187 views

### Filling in Area Under Curve Causes Alignment Issues

I am trying to fill in the area under the curve of sin(x)/x. Here is my code: \PassOptionsToPackage{usenames,dvipsnames,table,x11names}{xcolor} \documentclass[a4paper, 12pt]{article} \usepackage{...
772 views

### Filling between two lines

I'm trying to create a figure using Tikz. A part of the figure looks like this. \documentclass[11pt, a4paper]{article} \usepackage{textgreek} \usepackage{amsmath} \usepackage{graphicx} \usepackage{...
526 views

### function epigraph possibly using fillbetween

I want to shade and label the epigraph (region above a function) of different functions in latex, and have tried to use fillbetween, though im not quite sure how to do this as usually I specify two ...
910 views

### fillbetween from pgfplots does not work inside groupplots [closed]

MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \usepgfplotslibrary{groupplots} \usepgfplotslibrary{fillbetween} \usepackage{filecontents} ...
1k views

### Tikz: Filling Parabola and Rounde Arrow

I edited my code to fill the area and plot the round arrow. The arrowhead shows upwards as shown here: http://www.directupload.net/file/d/3751/q4ohidu4_pdf.htm \documentclass[a4paper,10pt]{article} \...
487 views

### pgfplots complains path is empty

I'm trying to fill an area under a curve drew with pgfplots. I've tried the solution outlined in this answer: \documentclass{article} \usepackage{amsmath} \usepackage[usenames,dvipsnames]{xcolor} \...
134 views

### Problem with fillbetween pgfplots library and intersections

In this MWE \documentclass[11pt, oneside, landscape]{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{ calc, intersections, } \usepgfplotslibrary{fillbetween} \...
878 views

### Problem with fill between option in pgfplots

I have a problem with fill between option when I try to use it for more than one plot. Here is the code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} ...
694 views

### Fill area between wave-lines

I want to draw a diagram in which one bar is too large to fit in the axis. So I want to indicate this by "cutting" the bar with two parallel wavelines. My approach was to draw the diagram with the ...
289 views

### fillbetween not working in scope

I want to display three plots each stacked vertically. As shown below in the figure. Generated by the following code. But fillbetween is not working. \documentclass{standalone} \usepackage{amsmath} \...
2k views

### Fill between and soft clipping doesn't work as expected [duplicate]

I am trying to visualize the oriented area under a curve using pgfplots like in the following example. However the output is messed up. What's wrong here and how to fix it? \documentclass[tikz,...
114 views

### Tikz efficiency, Joule expansion diagram

I was trying to draw the well-know Joule expansion experiment in Tikz, and I managed to get through it thanks to many (many) other topics. However, it seems to by quite slow, as it takes 10 seconds ...
75 views

### Plot changing abruptly when xmin is changed slightly

When I run the following \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz,pgfplots} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture} \begin{axis}[xmin=-1.6,...
391 views

### How to fill region defined by several smooth plot tikz

I am having problems filling the region below that is given by 4 paths with known intersection points. After playing around with clipping and doing my due diligence searching the forums I am still ...
486 views

### How to add arrows near the plot path and fill the area under this path?

I'd like to draw a closed plot path filled with pattern and surrounded by arrows: When I used @Jake's solution to add arrows (Decorate a path with little arrows parallel to it) then the pattern made ...
209 views

### How can I fill below of intersection of a plane and a cylinder of this picture?

I want to fill below of intersection of a plane and a cylinder of this picture, contain of arc AB and A'B' and below of polygon ABB'A' (fill form water). My code \documentclass[border=2mm,12pt]{...
518 views

### Fillbetween doesn't fill entire area under graph [duplicate]

I'm trying to fill the area under a graph in tikz so that it looks like this: However, this is what I end up with: Here's the MWE: \documentclass[class=minimal,border=0pt]{standalone} \usepackage{...
448 views

### PGFPlots fillbetween layer issue with main layer

I am using fill between to create some diagrams where I need semi-transparent fillings above ploted lines. As normally fillings are put into a separate layer pre main below plot lines, I tried to move ...
75 views

### Pgfplot image messed up with newer texlive [duplicate]

EDIT: The question has been marked as duplicate, since the fillbetween not working in groupplots is a known issue in pgfplots newer than 1.10. But the question remains, that why doesn't using \...
369 views

### pgfplots groupplot: fillbetween breaks alignment of plots [closed]

I recently (foolishly) updated all my TeXlive packages, including pgfplots (from 1.10 to 1.11). I now have an issue with the groupplots and fillbetween libraries, where using the fillbetween library ...
761 views

### Fill color between two coordinates

Question: How can I fill the region between O(0,0) and A(1,1)? This is what I've done so far: \documentclass[12pt]{article} \usepackage{pgf,tikz,pgfplots} \pgfplotsset{compat=1.15} \usepackage{...
160 views

### Shading the region bound by two graphs

How do I shade the region bound by the standard parabola and the square root function? \documentclass{amsart} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc,intersections} \usepackage{...
231 views

### Shading in area between f = 1 and g = |x|

I have the following: \documentclass{article} \usepackage{pgfplots} \usepackage{mathtools} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{...
201 views

### Fillbetween library has different effect based on plot contents [duplicate]

I'm trying to get fillbetween to fill the area of two graphs in two seperate plots: I've set the same domain for both fillings, but it seems to be filling different domains. (quite frankly I'm not ...
47 views

### Filling between two boundary lines

in the following example I plot two demonstration trajectories: Instead of the arrow that I drew, I would like to highlight the surface between the two trajectories with the mechanism from \...