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
1
vote
1answer
55 views

How to fill a colorbar in a channel with changing width in pgfplots?

Let's assume I have a plot with two functions, f(x) and g(x) (see the graph below). Now I would like to fill the channel between these two curves with colormap such that the bottom is blue and the top ...
4
votes
1answer
45 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 \...
3
votes
0answers
79 views

how can I fill an “fill between” area by point meta?

All, consider the following MWE: How to fill the blue!20 area by point meta e.g., point meta=x^2 ? I mean the filling should be like a contourplot, with colors determined by some function (like x^2)...
0
votes
1answer
32 views

Fill between area legend

I have a problem with a legend of filled area between curves. I want to have a legend item with a small square which represent a filled with fill between function. When I used "area legend" in /...
1
vote
1answer
39 views

Problems when I try to concatenate intersection segments

I try to draw the next figure: So, I create two paths "background" (the low curve) and "resonance" (the spikes) in this code: \documentclass[margin=5pt]{standalone} \usepackage{tikz} \usepackage{...
1
vote
1answer
41 views

How to fill everything on one side of path

Consider I have some image. I want to "cut away" part of an image using a double lined arc (see page 110 of the TikZ/PGF manual). This can be done with the following MWE documentclass[tikz]{...
1
vote
1answer
36 views

Shading under the curve problem

Code: \documentclass[12pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usepackage{changepage} \usepackage[margin=1in]{geometry} \...
1
vote
1answer
41 views

Fill between curves – pgfplots

I've seen enough simmilar topics, but after tweaking fill between option for so long I couldn't get the right fill between curves and y=1. This is the best result I could achieve so far. Here is the ...
1
vote
1answer
61 views

Filling an area between more than two curves (with TikZ)

This is my first post here so I'm learning how to use the different features of the website. Sorry if there's any awkwardness... I would like to fill an area between the x axis, a curve and a ...
2
votes
1answer
52 views

How to fill area bounded by two parabolas in Tikz?

How can I fill between two parabolas using Tikz? I have tried with the below codes. But I could not able to fill the area. \documentclass{article} \usepackage{tikz} \begin{document} \begin{...
2
votes
1answer
25 views

Fill between absolute value function and x-axis

I am trying to shade the area between an absolute value function and the x-axis on a given interval. It is working for one equation, and not working for another. Could someone help troubleshoot the ...
0
votes
0answers
85 views

pgfplots: How to use fillbetween correctly at 3D-diagram?

I would like to create something like that (with pgfplots): How do I have to set the fill between's correctly? With different layers? The tricky part is: % Fill \noexpand\addplot[\Color] fill ...
0
votes
1answer
70 views

Clipping a fill between region in pgfplots

I'm trying to create a drawing of the cylinder that is created when integrating the solid of revolution using the shell method. I'm trying to clip the "bottom" of the cylinder using the black arc. E....
1
vote
1answer
31 views

Cannot use fill between and clip markers

In the groupplot environment I need to use fill between two paths and one of these path have markers that are on the axes. I want to clip these markers but it causes a problem with fill between, as ...
3
votes
0answers
37 views

Wrong font scaling using when groupplot, tikzscale and fillbetween, maybe a bug (?)

Situation: I am trying to place one bigger pgfplot at the left side of a figure and four small plots (2x2) on the right half, like this: |--------|----|----| | | P2 | P3 | | plot 1 |----|-...
1
vote
1answer
48 views

Fill overlapping area between rectangle and function

I am trying to fill the overlapping area between a rectangle and a function (a Gaussian in my case). I tried doing so using the approach outlined in the answer to this question: \documentclass{...
1
vote
1answer
85 views

Fill space between three \draw lines with arbitrary intersection points

I would like to fill the space between the three curves in this MWE \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[scale=3] \...
6
votes
2answers
184 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 ...
2
votes
2answers
61 views

filling plot region changes error bars of another plot

I have the following plot: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepackage{pgfplotstable} \usepgfplotslibrary{fillbetween} \pgfplotstableread{ X Xminus Xplus ...
2
votes
1answer
93 views

Use custom layers with fillbetween

I would like to have two layers behind the background layer: waybackgroundlayer and boundingboxlayer and also use the fillbetween. The MWE below uses \AxisEnvironmentFig to graph the curves. The * ...
6
votes
2answers
547 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 ...
3
votes
2answers
280 views

Pgfplots fillbetween and Tikz \shade

I am trying to replace the rainbow in this MWE \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfmath} \usepackage{amsmath} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \...
1
vote
1answer
40 views

tikzfillbetween Ignoring Control Points

I have a simple question. I am creating a schematic drawing in TikZ without using the axis feature where I need to shade a region between a L-shape (part of a rectangle) and a spline generated using ...
3
votes
1answer
32 views

why does \fillbetween two curves command works partially?

I used the \fillbetween to fill between the two curves shown below. It fills very awkward between the curves on the negative x-axis. Does anyone know why? Here is the code I used \documentclass{...
0
votes
1answer
91 views

fill between and axis on top causes title to be behind grid lines

I want to color an area between two plots using the fillbetween library. Additionally, I want my grid lines on top of the plot (i.e. "axis on top", like in pgfplots' area style; I can't use area style ...
1
vote
2answers
75 views

Fill area below curve from filecontents in PGFPlots [duplicate]

I would like to shade an area underneath a curve. Although this has received attention in previous posts, such as this, I am instead plotting some data using the filecontents package - so the function ...
1
vote
1answer
46 views

Color the space under the ploted line in a pgfplot

I have plotted some values on a pgfplot and I wish to color in red the part under the line. Some suggestion about a package or what I need to look into would be great. In this case googling it did not ...
2
votes
1answer
78 views

Fill between functions like x=f(y)

I'm trying to fill the area between functions of type x=f(y) ... \documentclass{article} \usepackage{pgfplots} \usepackage{tikz-3dplot} \pgfplotsset{compat=1.12} \usepgfplotslibrary{fillbetween} \...
2
votes
1answer
66 views

Adding a shaded region between two curves on a PGFPLOTS graph

Ok, Say we have a graph defined as \begin{center} \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=middle ] \addplot[black,domain=-pi/2:pi/2]{cos(deg(x))}; ...
6
votes
1answer
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{...
0
votes
0answers
56 views

Problem with fill between when using tikzpicture

Related to this question, my code: \begin{tikzpicture} \begin{axis} [domain=0:12, samples=100,grid=major, domain=1:4, xlabel=$\lambda$, ylabel=$f$, legend pos=north west, no marks] \addplot [...
3
votes
1answer
385 views

How to use fill inside the \draw command in Tikz/PGF?

I am quite new at trying Tikz and PGFplots so apologies if this question is rather naive.I have been trying to fill the area under this manually made curve and I have tried to use \clip and \draw[clip....
2
votes
1answer
144 views

pgfplots fill between broken in TeXLive 2018?

I recently upgraded to TeXLive 2018 and found that the behavior of the addplot fill between behaves differently now. What I'm trying to do is to fill the area between a straight line and a parabola. ...
3
votes
1answer
126 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} \...
7
votes
1answer
99 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&...
4
votes
1answer
158 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{...
3
votes
1answer
467 views

Why I get “the requested layer 'background' is not part of the list” error if it is part of the list?

The following code gives me the error: ! Package pgf Error: Sorry, the requested layer 'background' is not part of the layer list. Please verify that you provided \pgfsetlayers and that 'background '...
3
votes
1answer
67 views

Area under curve in pgfplots

\begin{figure}[H] \begin{center} \begin{tikzpicture} \begin{axis}[xticklabels={},yticklabels={},axis x line=center, axis y line=center, xlabel={$x$}, ylabel={$y$}, xlabel style={right}, ylabel style= ...
1
vote
1answer
73 views

Filling the peaks and troughs of an oscillating 3D curve using alternating colors

I would like to fill the peaks and troughs of a circle vibrating with respect to its static configuration using alternating colors. I tried using the fillbetween package (with pgfplots 1.15) and it ...
3
votes
1answer
147 views

Adding legend entry for border of fill, from fillbetween

I've made a plot like the one below to show a distribution of values in the dependent variable versus the change of the independent variable. \documentclass[varwidth]{standalone} \usepackage{pgfplots}...
4
votes
2answers
758 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{...
2
votes
1answer
74 views

Strange pgfplots behaviour using fillbetween

I'm using the following code to draw a simple graph and colour in the area under it. The expected result would be a fully filled-in area under the curve. The actual result is that the colouring is ...
1
vote
1answer
26 views

Individually moving z labels gives error in pgfplots

If I add the vertical blue plane to this tikzpicture I lose the ability to individually move the z tick label, i.e. I get the error Undefined control sequence. <argument> (\tick ...
1
vote
1answer
103 views

pgfplots: fill between and soft clip don't work as expected

This question is related to this other question. Fill between fails to fill the correct region in this MWE. \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \...
2
votes
2answers
301 views

TikZ spy and PGFPlots fill between

I used PGFPlots library fillbetween to create a plot, and now I want to magnify part of it using TikZ spy library. However, when I do it the filled area between plots disappears, both from the ...
2
votes
1answer
145 views

How to unfill an area inside a filled one in tikz

I've searched a bit and tried in different ways but I don't manage to get the area of the inside circle unfilled, or, alternatively, to be able to fill only the area between the two circles. Here is ...
10
votes
4answers
829 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: \...
2
votes
1answer
124 views

Pgfplots: fillbetween, enlargelimits and soft clip have interesting interactions

Setup: TexLive 2018 Consider the MWE below, provided by one of my users. He complained that the pattern disappears as soon as soft clip was used. Creating the MWE we noticed the following If ...
2
votes
1answer
247 views

Pgfplots fill between, axes disappear

I have a problem on pgfplots with "fill between". In particular, the filled area covers the axes; see attached figure. What puzzles me is that I tested the same code on a different machine and ...
10
votes
1answer
674 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 ...