Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
3
votes
0answers
127 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 ...
6
votes
2answers
720 views

Filling between two lines

I'm trying to create a figure using Tikz. A part of the figure looks like this. \documentclass[11pt, a4paper]{article} \usepackage{textgreek} \usepackage{amsmath} \usepackage{graphicx} \usepackage{...
2
votes
1answer
265 views

Fill between curves in pgfplots for two plots side-by-side [closed]

In the following code I want to have the area between the curves filled in both plots. I tried the "fill between" package but when I apply it to both plots, the first one is not displayed. Any ideas ...
4
votes
1answer
288 views

Problem filling between two plots

I wanted to be able to plot two curves will fills like this: This is the code that I have so far: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{...
1
vote
0answers
71 views

pgfplots: shade area between two table-generated curves [duplicate]

I have three statistical quantiles generated via \addplot table. I would like to shade the area between the highest and lowest quantiles (the mid one is the median). If I use \closedcycle, I shade ...
3
votes
1answer
401 views

Fill Between Missbehaviour?

everyone! I am trying to color with intense red the triangular area between the black line and the two red lines that is currently in light red (in the right). After reading the corresponding section ...
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,...
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} \...
7
votes
2answers
1k views

pgfplots: tick marks on axis with fill between [closed]

I am plotting a graph and shading some area beneath it using fill between like in this example: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=...
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 ...
4
votes
0answers
59 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 ...
2
votes
0answers
235 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
352 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 ...
10
votes
1answer
1k 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
92 views

Fillbetween two curves in differents axis environments

I am trying to fill an area between two curves. Easy with \fillbetween, right? Except that the two curves are drawn in two distinct axis, so that the name path is lost between them. To get an idea, ...
3
votes
2answers
470 views

filling curved figure - hydraulic brake system

I'm trying to draw a simple hydraulic brake system. I've already managed to make a simple hydraulic system. \documentclass[11pt,a4paper]{book} \usepackage[utf8]{inputenc} \usepackage{amsmath} \...
4
votes
1answer
119 views

pgfplots+fillbetween code no longer compiles correctly

I recently dug up some old code and it doesn't compile the way it used to. Here is a MWE: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usepackage[english]{babel} \usepgfplotslibrary{...
1
vote
1answer
1k views

Problem with fill between in pgfplots

I'm trying to generate a plot where I want to shade the region enclosed by the x-axis, the right-hand branch of the equilateral hyperbola x^2 − y^2 = 1 and the line y=x as x varies between 0 and 1. ...
2
votes
1answer
198 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 ...
2
votes
0answers
76 views

“[name path=]” causes document to not finish compiling [closed]

I want to plot the area between two functions. On one machine it compiles nicely, on the other one it hangs. Code: \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots, ...
6
votes
2answers
458 views

function epigraph possibly using fillbetween

I want to shade and label the epigraph (region above a function) of different functions in latex, and have tried to use fillbetween, though im not quite sure how to do this as usually I specify two ...
2
votes
1answer
234 views

How to fill area bounded by two curves using tikzpicture more complicated case

The following is the code I am using. Basically, I am trying to shade the area between the two curves and the lines $y=1$ and $y=2$. When I use fill between, how do i actually restrict this between ...
11
votes
4answers
3k views

TikZ Fill for Fraction Diagram

I'm trying to shade in one third of this circle. Obviously, it's not working. What did I do wrong? I got no error messages for either of my attempts in the code below, but neither filled anything in....
3
votes
1answer
372 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{...
3
votes
1answer
277 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
2k views

How can i use the content of the \usepgfplotslibrary{fillbetween} in the LaTeX Code WITHOUT the order: \usepgfplotslibrary{fillbetween}

Hey I have to use LaTeX in Wordpress with the plugin Quicklatex. There is a problem while using the pgfplots package. When I type \usepgfplotslibrary{fillbetween} in the preamble, i get the error: I ...
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 ...
4
votes
1answer
2k views

shading area between two curves in pgfplots

I have the following latex code: \begin{tikzpicture} \begin{axis}[ xlabel=Strike Price (K), ylabel={Put Value (p)} ] \addplot [only marks=*,blue] plot coordinates { (40,10) (...
1
vote
1answer
484 views

pgfplots fillbetween doesn't work with newenvironment

Here is a minimal nonworking example: % preamble \documentclass[class=minimal,border=0pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \usepgfplotslibrary{fillbetween}...
16
votes
2answers
863 views

Fill in between polar curves

I am trying to fill in space between a pair of spiral curves in tikz. I have tried using the fillbetween library but it just shades in the whole spiral. Does anyone have a hint they could offer? ...
6
votes
1answer
741 views

Problem with fill between option in pgfplots

I have a problem with fill between option when I try to use it for more than one plot. Here is the code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} ...
5
votes
1answer
471 views

How to add arrows near the plot path and fill the area under this path?

I'd like to draw a closed plot path filled with pattern and surrounded by arrows: When I used @Jake's solution to add arrows (Decorate a path with little arrows parallel to it) then the pattern made ...
3
votes
1answer
171 views

pgfplots: figure too large

I have a problem with pgfplots and it took me a while to strip down my problem to the minimum. I try to add two lines and fill the area between them. The curves have points outside of the axis area. ...
6
votes
1answer
430 views

pgfplots complains path is empty

I'm trying to fill an area under a curve drew with pgfplots. I've tried the solution outlined in this answer: \documentclass{article} \usepackage{amsmath} \usepackage[usenames,dvipsnames]{xcolor} \...
2
votes
1answer
572 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} \...
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} \...
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 \...
0
votes
1answer
258 views

How to fill the area between a listplot and a psline in pstricks?

I have a .txt with data I use to plot a curve with lisplot and I need to fill the space between this curve and a psline in pstrick. Does anyone know how to do it?
2
votes
2answers
959 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 ...
7
votes
1answer
3k views

How to fill an area with fading color?

I want to fill an area on a x--y plane with fading color, but have no idea how to do it. I know how to fill shapes with color, but not how to do it when the area is not a well defined shape. Let me ...
6
votes
2answers
881 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} ...
6
votes
2answers
1k views

Tikz: Filling Parabola and Rounde Arrow

I edited my code to fill the area and plot the round arrow. The arrowhead shows upwards as shown here: http://www.directupload.net/file/d/3751/q4ohidu4_pdf.htm \documentclass[a4paper,10pt]{article} \...
5
votes
0answers
367 views

pgfplots groupplot: fillbetween breaks alignment of plots [closed]

I recently (foolishly) updated all my TeXlive packages, including pgfplots (from 1.10 to 1.11). I now have an issue with the groupplots and fillbetween libraries, where using the fillbetween library ...
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 ...
1
vote
1answer
176 views

Filling a page with figures

I have a text and then a bunch of figures. I would like to fill A page with all the figures so the text would continue AFTER this page. In other words I would need something like this : Page 1 : text ...
12
votes
2answers
1k views

How to draw areas between curves of the form $x=f(y)$ and $x=g(y)$?

I want to shade the region between two curves whose equations are of the form $x=f(y)$ and $x=g(y)$, where $f(y)\leq g(y)$ for all $y\in [c,d]$. I heard that pgfplots can be used. Also, the ...
3
votes
1answer
462 views

pgfplots \closedcycle command inside \foreach returning error

The following code demonstrates the problem. It builds fine, but if I add the commented \closedcycle command, it won't build (undefined control sequence). \documentclass[tikz]{standalone} \...
4
votes
1answer
196 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 ...
7
votes
2answers
649 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{...