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
0
votes
0answers
75 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
57 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
28 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
35 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
39 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
51 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
155 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
58 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
70 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
522 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
228 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
39 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
70 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
65 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
43 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
73 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
55 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
52 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
326 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
125 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
121 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
78 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
149 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
399 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
66 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
64 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
124 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
676 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
68 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
90 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
235 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
122 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
783 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
102 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
182 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
642 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 ...
2
votes
1answer
145 views

Tikz- Fill an arbitrary area and Draw a line to another line

Hi!I have two questions about my current paper. Sorry for my poor hand drawing. How can I fill an Arbitrary part (Red area with A)? I want to draw some lines from the buttom curve of filled Area A ...
3
votes
2answers
90 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 ...
4
votes
2answers
285 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
215 views

To Shade the Area Between $x^2$ and $\sqrt{x}$

I want to draw the following image in tikZ Basically I want to draw the boundary of the unit square, plot the x^2 and \sqrt x functions, and shade the area between them. In my attempt to draw the ...
6
votes
1answer
127 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} \...
1
vote
1answer
281 views

Fill the area between several paths

How can the PGF library fillbetween be used to fill the area marked "A" in this figure? Here is the preliminary code for the figure: \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{...
2
votes
2answers
113 views

Fill between two curves using the fillbetween macro

I managed to color the domain limited by the two curves without using the macro fillbetween because the instruction \addplot[gray] fill between[of=F and G, soft clip={domain=0:4}]; does not give the ...
3
votes
1answer
201 views

fill cylinder in latex

I want to fill the below cylinder same as picture And my code \begin{tikzpicture} \def\a{1} % bán trục lớn = bán kính trụ \def\b{0.3} % bán trục nhỏ \def\h{3} % chiều cao trụ \shadedraw[left ...
-2
votes
1answer
179 views

Fill integral exponent function [duplicate]

I want to fill integral limits by exponent function y=e^{x-1}; y=2-x, and Ox. Please everybody help]1
4
votes
1answer
99 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 ...
0
votes
1answer
185 views

No line and no marks in plot to use fillbetween

This seems like it should be simple, but I was unable to find any line style or line width that allows one to have no line in a plot. I want to draw to plots without a line (0 line width), and then ...