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
2
votes
1answer
196 views

Overlap and non-functioning filling in groupplots

I'm trying to place multiple plots in the same figure. In each plot I'd like to have a certain region highlighted. However, there is significant overlap between the plots and the highlighting doesn't ...
3
votes
1answer
72 views

Filling space under curve in a plot with date coordinates

How can I fill the space between the curves underneath the lines. The red filling should go to y=120, the green to y=80. And only if the datapoints are over this values. \documentclass{scrartcl} \...
6
votes
2answers
492 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
74 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
30 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
153 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 ...
3
votes
1answer
28 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
48 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
54 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
39 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
67 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
47 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
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
368 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 ...
0
votes
0answers
44 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 [...
4
votes
2answers
171 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]{...
3
votes
1answer
248 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
105 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
114 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} \...
2
votes
2answers
137 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 ...
7
votes
1answer
60 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&...
3
votes
1answer
209 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 '...
4
votes
1answer
114 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
57 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= ...
4
votes
2answers
567 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{...
1
vote
1answer
54 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
79 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}...
10
votes
4answers
696 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
54 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
21 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
67 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
1answer
77 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 ...
3
votes
2answers
466 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 ...
2
votes
1answer
74 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
106 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
588 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
101 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
67 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
174 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
205 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
110 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
196 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
107 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 ...
-2
votes
1answer
153 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
87 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
118 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 ...
9
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{...
3
votes
1answer
534 views

fill between and axis equal not getting on (pgfplots) [closed]

I'm trying to visualise the area under the curve in the first quadrant of a function, say f(x) = 6-2x. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \...
3
votes
0answers
125 views

pgfplots - fill between changes with plot width [closed]

I'm plotting some distribution functions for my students, and I am shading regions of the plots. If I reduce the plot width to 0.35\textwidth or less, the shading disappears. How do I ensure that it ...
3
votes
1answer
360 views

pgfplots' fill between with wrong segment split [closed]

I want the last segment to be white, but it seems that the last segment is combined with the previous segment. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{...