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
16
votes
2answers
858 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? ...
12
votes
2answers
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 ...
12
votes
2answers
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 ...
11
votes
4answers
3k 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....
11
votes
1answer
540 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 ...
11
votes
3answers
10k views

Shading areas in TikZ

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 ...
10
votes
4answers
702 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: \...
10
votes
3answers
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{...
10
votes
1answer
597 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 ...
10
votes
1answer
996 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 ...
8
votes
2answers
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{...
8
votes
1answer
770 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 ...
8
votes
2answers
671 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: ...
8
votes
2answers
510 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 ...
7
votes
2answers
648 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{...
7
votes
2answers
1k 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} \...
7
votes
1answer
63 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&...
7
votes
1answer
963 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 ...
7
votes
2answers
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=...
7
votes
1answer
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 ...
6
votes
2answers
498 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 ...
6
votes
1answer
669 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 ...
6
votes
1answer
184 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{...
6
votes
2answers
713 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{...
6
votes
2answers
446 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 ...
6
votes
2answers
874 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} ...
6
votes
2answers
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} \...
6
votes
1answer
114 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} \...
6
votes
1answer
729 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} ...
5
votes
4answers
630 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 ...
5
votes
1answer
214 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} \...
5
votes
2answers
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,...
5
votes
1answer
94 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 ...
5
votes
1answer
72 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,...
5
votes
1answer
327 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 ...
5
votes
1answer
471 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 ...
5
votes
1answer
422 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} \...
5
votes
1answer
444 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{...
5
votes
0answers
382 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 ...
5
votes
0answers
74 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 \...
5
votes
0answers
367 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 ...
4
votes
2answers
577 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{...
4
votes
1answer
117 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{...
4
votes
2answers
215 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{...
4
votes
1answer
195 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 ...
4
votes
1answer
89 views

How to color the area between two three arcs?

I am on my first Tikz attempts and I am trying to figure out a way to color the are between P_{\bot} and Q_{\bot}. What I tried was labeling the intersection such that I could color the area ...
4
votes
2answers
106 views

How to fill in the space between two drawn plots?

Someone's answered a question about the space between two drawn lines before, but I'm finding it impossible to see how their answer applies to mine and have no idea how the clips work and what I need ...
4
votes
2answers
455 views

Soft clip defined by domain fails in fill between for one of tables

I cannot understand why figure (a) does not display the filled region, while (b) does. PGF reports the following warning: Package pgf Warning: fill between skipped: the first input path is empty. ...
4
votes
1answer
2k views

shading area between two curves in pgfplots

I have the following latex code: \begin{tikzpicture} \begin{axis}[ xlabel=Strike Price (K), ylabel={Put Value (p)} ] \addplot [only marks=*,blue] plot coordinates { (40,10) (...
4
votes
2answers
175 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]{...