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
0 answers
63 views

Using pgfplotspointgetcoordinates together with fillbetween command

I'm curios with following strange behavior of my code (see MNWE below). If the command for filling area between function is added, than the coordinates A and B are changed. It is weird for me, because ...
user avatar
  • 3,506
2 votes
1 answer
68 views

Shading area with crunch in axis

As per a suggestion, I'm splitting my previous (multiple) question into separate parts. I want part of the area below a curve to be shaded, but using a filled rectangle results (of course) in the top ...
user avatar
  • 197
1 vote
3 answers
99 views

Plotting area under density curve with tikz

I want to plot the area of the curve below from x=-3 to x=0.32, but nothing I'm doing is working. Here's what I currently have: \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))} ...
user avatar
  • 173
1 vote
1 answer
56 views

Fill between: How to cover a line that goes cross a filled region?

I am trying to draw a figure where a red line runs cross a region filled with blue. No matter how I tweak the fill opacity. It seems that the red line is always ``one layer" above the shaded ...
user avatar
2 votes
1 answer
87 views

Fill a differential cross section

I am trying to fill an area between 4 paths, two lines, and two ellipses, that denote the area dσ. Here is my code. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{...
user avatar
5 votes
2 answers
498 views

How do you graph the definite integral of 1/x from -1 to 1?

I want to make a graph of the function 1/x with the area under the curve shaded, but I have absolutely no idea how to do that since the curve isn't continuous. Optimally, the negative area and ...
user avatar
  • 53
4 votes
2 answers
127 views

Fill area Between Two Lines with Only One Intersection

I am trying to fill the area between these two lines that only connect one one end. \documentclass{beamer} \usetheme{Berkeley}%{Marburg} \usepackage{tikz} \usetikzlibrary{patterns} \usepackage{...
user avatar
3 votes
1 answer
73 views

Coloring the area between circle and path in tikz

I'm new to tikz and for my thesis all the drawings I've made were in https://www.mathcha.io/editor and now the drawing I need to do can't done there so I need to code. The drawing I did is this and I ...
user avatar
  • 165
1 vote
1 answer
65 views

\pgfplotsinvokeforeach Add one to the variable

I am trying to use the variable from a \pgfplotsinvokeforeach as a path name. I want to get both #1 and #1 + 1 for each iteration. I have not been able to get the #1 + 1 to work; it tries to use ...
user avatar
3 votes
1 answer
121 views

TikZ artifact when graphing (and shading) functions of y

I'm trying to make a simple plot of two functions (of y) and shade the area between them. When I use the shading plot, I get an artifact in the picture. I've tried changing the bounds and splitting ...
user avatar
1 vote
1 answer
63 views

Fill between smooth vertical lines

I want to fill the area between two curves that are more or less vertical. They go slightly to the side and they are smooth, but the problem is also present when I remove smooth from the \addplot ...
user avatar
  • 113
1 vote
2 answers
62 views

pgfplots fill between and smooth don't work

I've been trying to fill the area between two curves plotted with pgfplots. The graphs are plotted from an external .dat file attached to the link below. The fill between command does not work for ...
user avatar
  • 23
2 votes
3 answers
134 views

Fillbetween is not working in my tikz image

I want the space between the two functions to be colored, with the domain in x of 0 to 4. But the space-filling is not working. Here's my code \documentclass{minimal} \usepackage[utf8]{inputenc} \...
user avatar
1 vote
1 answer
72 views

How to make dark the area under the curve? [duplicate]

I created the tikzpicture code using Geogebra. What change should I make to this code, to make the area under the curve shaded. The tikzpicture code is: \documentclass[10.pt]{book} \usepackage[...
user avatar
2 votes
1 answer
68 views

pgfplots fill polygon with gradient

I have the following three-dimensional surface plot and I would like to add a gradient to the red semitransparent area starting with black at x=0 and ending with white at x=1. Is it possible to add a ...
user avatar
  • 139
0 votes
1 answer
91 views

How to shade the upper contour set of a function (pgfplots, tikzpicture)

I would like to shade the entire area above the function f(x) = 0.5/x, over the entire domain of the function (that is 0.5:47 in my case) up to y=1. In other words, I'm looking to fill/shade the upper ...
user avatar
0 votes
1 answer
58 views

Tikz with fillbetween two defined paths

Setup: using Tikz in beamer. I want to fill with color a region delimited by some line segments and a circle. Since I did not manage to use \clip together with paths, I looked around and found this ...
user avatar
  • 107
0 votes
1 answer
311 views

Linear Programming in LaTeX: crosshatching the feasible region

I have the following graph: How can I crosshatch the feasible region? Here is my code: \begin{figure}[h] \begin{center} \begin{tikzpicture} \begin{axis}[ grid, grid style={densely dashed}, axis line ...
user avatar
0 votes
0 answers
41 views

Pgfplot/tikz shaded areas under curve [duplicate]

I am trying to make the plot of a bell-shaped curve with two intervals shaded but I am only capable to fill only one area, so this is the chart I got. I thought that adding another \clip (axis cs:0,0) ...
user avatar
  • 637
0 votes
1 answer
56 views

Plot graphs, shade areas and lines with Tikz [duplicate]

How could I do the following plot with Tikz: I'm new on Latex (and Tikz), thanks for your help!
user avatar
  • 169
0 votes
1 answer
61 views

'Dimension too large' when `useasboundingbox` with `fill between`

\documentclass[tikz]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=newest} \begin{filecontents*}{data.txt} X Y CI95 1 1.50 0.39 2 1....
user avatar
0 votes
1 answer
76 views

Shade an area on one side of the curve with the boundary of the irregular shading

I need to recreate this graph, with those shading on both sides of the curve, both with the line pattern down the curve, and the shading up the curve. Note that both limits of the shading are not ...
user avatar
0 votes
2 answers
108 views

How to Shade in Only Part of Overlapping Parabolas

I want to shade in the parabola facing up but only the area where the two aren't intersecting which is the area (0,-2) to (0,2). \documentclass[fleqn]{article} \usepackage{tikz} \usetikzlibrary{arrows,...
user avatar
2 votes
2 answers
218 views

Filling optical spectrum curve with color gradient

I have some difficulties creating a plot where the area between the curve and the x-axis is filled with a gradient. I want to plot an electromagnetic spectrum and I want the color gradient to ...
user avatar
  • 259
1 vote
1 answer
45 views

How to fill area between several paths

I have the folling tikz code, where several paths intersect each other. I struggle to find a way to fill the six different regions of the resulting picture, each with a different pattern (not ...
user avatar
1 vote
1 answer
54 views

pgfplots fill above two lines with domain

iam trying to fill above the green and the red line, between the two brown lines. Ive tried it with soft clip and domain, but i cant get it working. Here is what iam trying to achieve (thick organe ...
user avatar
3 votes
1 answer
127 views

Shading between curves using polaraxis

I'm using pgfplots and plotting the equations r=1 and r=1-sin(\x/2), but I would like to shade the 3 different regions formed by the curves. I found a link to this bug report asking about using fill ...
user avatar
-1 votes
1 answer
115 views

changing reference line of `\closedcycle`" and "`fill`" option in pgfplots

I have used Matlab2tikz package to obtain tikz files of some plots drawn by Matlab. They have a problem in showing colored confidence intervals using "fill" option. My conjecture is that the ...
user avatar
  • 13
1 vote
1 answer
80 views

PGFPlots "fill between" causes polar axis to disappear

Having a bit of a tough time figuring out what tikz/pgf want from me here. I've tried a few solutions from previous askers, and still can't seem to get anywhere. When I use \addplot fill between [of=A ...
user avatar
0 votes
1 answer
38 views

Tikzpicture not showing multiple fillbetween

I have the following code within a beamer presentation: \begin{frame}[c]{ } \frametitle{Section 5.2: Definite Integral} \begin{center} \begin{tikzpicture}[scale =1] \begin{axis}[ axis lines=...
user avatar
  • 175
1 vote
1 answer
34 views

What is the best way for several areas under the plot of f(x)?

The code: \documentclass[dvipsnames]{article} \usepackage{pgfplots} \usetikzlibrary{babel,calc,backgrounds,quotes,angles,patterns,decorations.markings,intersections,arrows,arrows.meta} \pgfplotsset{...
user avatar
  • 345
1 vote
1 answer
178 views

Hatching Shear and moment diagrams using Stanli package in 2D and 3D

Regarding drawing internal force diagrams through the use of the Stanli package. The following parameters are required for 2D internal forces command: Start point End point Value at start point Value ...
user avatar
  • 733
2 votes
2 answers
155 views

How to choose the right sequence for intersection segments?

I would like to fill the intersection between the disk and the form delimited by the folling plot : \documentclass[11pt]{report} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween}...
user avatar
  • 203
0 votes
1 answer
33 views

there is a gap when two line pass the same point, at x=0.3. How to eliminate the gap? Many thanks!

code \documentclass[border=3mm]{standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{width=10cm,compat=newest} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[ ...
user avatar
  • 15
0 votes
1 answer
48 views

Filling in Parametric Curve without Using pngplots

I am trying to fill in the area of two parametric curves like this: Here so far is my failed attempt: I would ideally like to not use pngplots. I know that pngplots comes with the fillbetween ...
user avatar
  • 1,329
7 votes
1 answer
159 views

Fill the intersection of 3 (or more) curves

I couldn't find a simple way to fill the area of the intersections of 3 curves. I want to fill this area: My try: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \...
user avatar
1 vote
1 answer
195 views

pgfplots, tikz: How to use fillbetween at a Bezier-curve

With normal curves it works all fine, but what's about Bezier curves? I have a Bezier curve of the kind (-0.3,3.7) .. controls (2.3,0.9) and ...... I want to set two coordinates on the Bezier-path ...
user avatar
  • 6,217
0 votes
1 answer
87 views

Why does my fill between in tikz produce weird results?

I am trying to fill the area between some linear functions. But the resulting fill looks weird. The following is the code: \usepackage{amsmath} \usepackage{systeme} \usepackage{pgfplots} \...
user avatar
9 votes
7 answers
514 views

Fill percent of path along pair of almost parallel hobby curves

I have two almost parallel hobby paths (red and blue curves) and want to fill a percent of the path between these two lines, starting from the bottom left. I think this may require a center path from ...
user avatar
4 votes
2 answers
146 views

Filling with color between functions

I need some help in filling with colors between some functions, here is my code: \documentclass[12pt]{report} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \begin{document} ...
user avatar
2 votes
2 answers
229 views

How to fill the area under a 3d parametric curve with variable height?

I have a scalar field f(x,y)=1-x and a curve C given as the graph of g(x)=4x(1-x). My goal is to fill the area between the curve (x,g(x),f(x,g(x))) and its projection (x,g(x),0). Up to this point, I'm ...
user avatar
  • 31
1 vote
0 answers
46 views

Fading away from curve using fillbetween library

I have two paths defined that I would like to have filled and have fading. I want the fading to be 100% along some curve, and then fading as it gets further away from that curve. So specifying [top ...
user avatar
  • 41
2 votes
1 answer
99 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 ...
user avatar
  • 337
4 votes
1 answer
77 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 \...
user avatar
  • 489
3 votes
0 answers
120 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)...
user avatar
  • 75
0 votes
1 answer
191 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 /...
user avatar
2 votes
2 answers
108 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{...
user avatar
1 vote
1 answer
62 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]{...
user avatar
  • 1,696
1 vote
1 answer
50 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} \...
user avatar
  • 1,427
1 vote
1 answer
199 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 ...
user avatar
  • 1,824

1
2 3 4 5