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
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} ...
7
votes
1answer
965 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 ...
10
votes
1answer
997 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 ...
3
votes
1answer
489 views

Fill between two functions

In the example below, I am trying to present two pictures, one with shading between a wave profile and the ship profile (successful) and the second with shading between at water line at \zeta=0 and a ...
6
votes
1answer
670 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 ...
3
votes
1answer
8k views

text with semi-transparent color filled box

I have this text: \begin{flushleft} \fontsize{16pt}{16pt}\selectfont\textit{some text}\\ \fontsize{16pt}{16pt}\selectfont\textit{some text} \end{flushleft} and I would like to have a filled ...
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 ...
3
votes
1answer
274 views

Scaling problem with fillbetween in pgfplots

I recently ran into scaling problems with the very nice pgfplots library fillbetween. See the following example, which is perfectly fine: \documentclass{standalone} \usepackage{pgfplots} \...
2
votes
1answer
106 views

Graphics: Tikz Picture Placed Incorrectly when Drawing Areas Between Curves

I'm trying to use the method outline in Graphics: Area between curves to create a graph of the area between two curves to insert into a solution sheet. However, when I do, the box is placed ...
3
votes
2answers
481 views

How to fill 3 areas or more under a curve with different dashed colors?

I tried to use tikz and pgfplots packages in order to fill different areas under a curve with different colors. The issue is in the script below. When I define the area's draw pattern for two first ...
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 ...
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
215 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} \...
3
votes
1answer
115 views

Fill between breaks suddenly when using shifts

I am trying to plot a function as shown below: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepgfplotslibrary{fillbetween} \begin{document} \...
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 ...
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} \...
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 ...
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{...
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{...
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: ...
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{...
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
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]{...
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
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{...
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 \...
4
votes
2answers
456 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
0answers
58 views

Multiple axis and filling between curves [duplicate]

I am currently using multiple axis environments in a single tikzpicture environment. It all works quite well. However, if I want to fill the area between two curves, only the first call of fill ...
4
votes
1answer
319 views

How to use fill between package along the y axis

I am currently wanting to shade the area S_{2} which is the area bounded by the curve y=g(x) and the lines y=10 and y=4. Now, the following code is what I am using but how do you use the fill between ...
4
votes
2answers
189 views

pgfplots: Fill between breaks background layer

I'm using the fillbetween library of pgfplots and I want to show background rectangle of the enclosing tikzpicture. However, the \addplot fill between command seems to break the background layer. ...
3
votes
2answers
71 views

pgfplots: Fill between makes xshift/yshift options for axis environment misbehave

I'm using the fillbetween library of pgfplots and I want to shift the position of the axis environment with xshift and yshift options. However, there seems to be a discrepency between what the ...
2
votes
1answer
564 views

Fill between on top of axis background

How can I draw the fill between area on top of another fill area that is drawn in the axis background preaction? MWE: \documentclass{article} \usepackage{pgfplots, pgfplotstable} \...
2
votes
1answer
462 views

pgfplots fillbetween layering issue

I am using ticklabel style={fill=white} with pgfplots to ensure my tick labels are readable despite my grid-lines. However, it seems that when I use fillbetween the ticklabels get drawn after the ...
2
votes
2answers
958 views

Tikz addplot fill between depending on sign

i have following problem. I read data from a table and plot it and then fill the area between the x-axis and the curve. This works fine. Well at least a bit. I want the "negative part" filled in ...
2
votes
0answers
230 views

Intersection segments are not as expected

I have a question about intersection segments in package pgfplots. I want to intersect circle (named mypath) with another circle and would like to draw the intersection segments L1,L2,L3 of the the ...
1
vote
1answer
426 views

How to choose options for example the color globally for every fill between plot?

I want to set globally the color and other style options for every fill between plot in my document. How can I do this? I tried the following, but it doesn't work: \documentclass[tikz]{standalone} \...
1
vote
1answer
348 views

Fill area above and below lines in pgfplots

In the code below, when I try to implement the soft clip command \addplot [red, fill opacity=0.1] fill between[of=C and D,soft clip={domain=0:0.6336}], my output file comes out blank showing just the ...
1
vote
1answer
1k views

Fill area between two lines tikz

I am quite new at Tikz and I am trying to fill in some space between lines with color. This is my code: \begin{tikzpicture} \node[scale=0.1] (a) at (1.5,1.5) {\phantom{$.$}}; \node[scale=0.1] (b) at ...
0
votes
1answer
194 views

Color intersection between curves using fillbetween

I have two Guassian distribution curves, as shown here and I am attempting to color the areas under the curves as well as the intersection between them, like here: I assumed fillbetween would be the ...