Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [path-clipping]

The tag has no usage guidance.

0
votes
3answers
66 views

Semicircle from a circle in TikZ

Referring to the \clip answer in Drawing a semicircle in TikZ, I wanted to draw a semicircle. But the approach doesn't work here. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \...
6
votes
1answer
144 views

Crop image to path created in TikZ?

Is it possible to use a curved path created in TikZ within a LaTeX document to crop an image to fit it, or should I do this in (eg) GIMP outside the document and just insert the image? I have the (...
0
votes
1answer
35 views

How to fix circles as background and write text and insert figures in the foreground in a0poster?

Please find the MWE below and kindly help me to fix my issues. \documentclass[portrait,a0b,posterdraft]{a0poster} %% posterdraft is for printing the poster on a4 size. \usepackage[paperheight=119cm,...
3
votes
3answers
282 views

Clipping shaded areas to a curve boundary

I am trying to draw the following graph, but I failed to achieve it. What is wrong with this code \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{verbatim} \usepackage{tikz} ...
1
vote
2answers
65 views

Contour around intersected (clipped) area

I would like to know how to draw a (visible) contour around a clipped figure in Latex. As a basic example, consider some basic Venn diagram like that: \begin{tikzpicture} \begin{scope} \clip ...
4
votes
2answers
116 views

Tikz: convert a (fit) node into a path, for clipping, filling

I would like to do something like here in order to clip text outside of an area. But I'd like to specify the area using precisely a given node (that, in my case, is constructed using fit). The thing ...
3
votes
1answer
65 views

How to issue a warning when something is clipped in TikZ?

As the title states, I'd like to know if it's possible to issue a LaTeX warning if something was clipped in a tikzpicture. And, if so, how would I achieve this? My use case is that I'm working on a ...
1
vote
1answer
100 views

crop region outside a path

this is the first time i code with tikz and i'm stuck in trying to delete everything outside the path drawn in black. Can anyone help me? \begin{tikzpicture} \foreach \x in {-15,-14.5,-14,-13....
1
vote
1answer
98 views

Fill intersections using clipping

I am trying to obtain something similar to the attached figure, however I am not getting all the intersections correctly colored, any help? \documentclass[border=1mm]{standalone} \usepackage{tikz} \...
2
votes
0answers
144 views

tikz inverted clipping of named paths

I'm trying to employ the extremely cool inverted clipping from this question in combination with reusage of named paths with the use path key I stole from this question. However, it seems like my ...
3
votes
1answer
146 views

How do i clip the border of an area?

I want to clip the parts of an area such that a path which goes through it proceed at the border of the area. It should look like that but there must be a better solution instead of cutting with that ...
3
votes
1answer
247 views

Inverse clipping and decorated paths

I tried to implement the suggestions of this answer (Paul Gaborit's invclip) to make a "spotlight" effect (to be used with beamer). It works perfectly with simple shapes, but things get tricky when ...
4
votes
2answers
415 views

Soft clip defined by domain fails in fill between for one of tables

I cannot understand why figure (a) does not display the filled region, while (b) does. PGF reports the following warning: Package pgf Warning: fill between skipped: the first input path is empty. ...
2
votes
1answer
404 views

Properly Clipping in Tikz?

With the amazing help of this community, I draw the picture below some months ago. Back then, I was very happy with it; but as time goes by, I want my figures to look better and better. As you can see ...
8
votes
2answers
640 views

TikZ clip shapes using several (built in) shapes

I'm looking for a way to draw one image composed of a union of multiple cloud shapes. The following MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{...
3
votes
1answer
120 views

Inverted clipping using node shape?

I'm am able to invert clipping regions (as discussed in this question) and to use node shapes for clipping (as discussed in this one), but I'd like to combine the two, and I don't see quite how to do ...
3
votes
2answers
153 views

Connecting text and graphics

The idea was shamelessly stolen from: http://www.texample.net/tikz/examples/connecting-text-and-graphics/ This is my MWE: \documentclass{article} \usepackage{tikz,tkz-euclide} \usetkzobj{all} \...
5
votes
2answers
396 views

How to write a text on a curve, removing a piece of it in this section? (No fill=white)

I would like to erase a piece of graph where I want to put a label. I do not want to place there rectangles of color. The background color can be changed. At this stage, I do not know what will be the ...
3
votes
1answer
350 views

Straightforward gaps in crossing lines with gapless background highlights?

I'm drawing some crossing lines, some of which are emphasized by a thick, gray line in the background. Now, I'd like to have gaps where the lines cross, and I am able to achieve this by using inverted ...
1
vote
1answer
238 views

How to clip with a path between customized, bent sides (e.g. as drawn by edges from graphs)?

In the next MWE, I tried to clip by using a path drawn by edges between nodes, a circle, but I didn't succeed. It's not essential to draw it using automata, though. But the point is: being able to ...
3
votes
2answers
398 views

TikZ: even odd clipping using named path by intersections library

I would like to generate the following Venn diagram: which can be generated by the following \documentclass[tikz,margin=0pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,intersections} \...
2
votes
1answer
316 views

I put \pgfresetboundingbox after \clip, what should the bounding box be?

Short question After a \clip and a \pgfresetboundingbox, the bounding box is permanently (0,0)rectangle(0,0). How can I turn on the bounding-box calculation and obtain a fairly small bounding box? ...
2
votes
1answer
209 views

Reverse clipping in a 3D figure - Projection issue

I have an issue with a reverse clipping on a 2D surface represented in a 3D space. Although the reversed clipping is working, the cut part is not projected on a plane. Here is the MWE: \...
0
votes
0answers
35 views

shading region bounded by several curves [duplicate]

I have the following code: \documentclass{book} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,...
3
votes
1answer
157 views

How to clip a gap between a word and its “shadow”

I want to achive a text effect like this: It is the "gap" between the word and the shadow. I understand I have to use two layers to create shadow and word. But I don't know how to clip the shadow ...
7
votes
2answers
648 views

Rotate and clip shading in TikZ

I'm trying to produce a copy of the right hand side of this picture using TikZ shadings. I thought it would be a simple task but it has proven itself difficult (at least for me). First I couldn't ...
6
votes
1answer
589 views

How does TikZ clipping work? (the size ot the output)

Consider the following code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \clip (1,1) rectangle (9,9); \foreach \x in {0,...,10} \foreach \y in {0,...,10} ...
4
votes
3answers
254 views

How to clip shapes within a double path

I need to clip the circle so only the part of the circle within the path is visible (my output is the reverse). This is the code I have tried. What am I doing wrong? \documentclass{book} \usepackage{...
4
votes
1answer
400 views

TIkZ: fit clipped nodes

I would like to draw a box that encloses several shapes using the fit option. But when some shapes are clipped, fit still takes the whole shape into. Here is a minimal working example. \...
9
votes
1answer
742 views

Tikz: Fill the intersection between two polygons

I'm trying to fill the intersection of the two polygons that I have made using tikz. But it seems like I have some mistake in my \clip and \fill commands that I can't get what I want. This is what I ...
6
votes
2answers
512 views

Filling a non-convex path in tikz

I am trying to fill a path consisting of two semicircles, and I only want the area between them to be filled. The following code doesn't work correctly. \documentclass{article} \usepackage{tikz} \...
5
votes
2answers
459 views

How can I design a DVD tray template to for my DVD label printer with TikZ?

Question I am trying to design a template for my Canon iP7250 printer. I would like to draw it using TikZ. I'd like to compile both pdf files and svg files. The middle should be transparent just like ...
7
votes
6answers
2k views

clip in TikZ leaves a faint outline of clip region even after filling with white!

I have three circles A, B, C whose centers are collinear and equally spaced. I would like to clip the region which is inside the middle circle, but outside the other two. I do a poor man's version ...
1
vote
1answer
430 views

Clipping only the bottom of a graph in pgfplots/tikz?

Is it possible to clip only the bottom of a graph? I have a graph with a node above the area of it; when clipping over the entire thing is enabled, the node is cut away. However, no clipping means the ...
8
votes
1answer
406 views

Problems combining clip, layer and pic when multiple instances are included in the same tikzpicture

I'm having trouble figuring out how I am supposed to combine (or if I am supposed not to combine) pics, clipping and layering when more than one instance of a pic is included in a single tikzpicture ...
3
votes
1answer
169 views

Tikz: clipping path from external file

I would like to use the data of an external file as the clipping path with Tikz. Something in the line of: \documentclass[10pt,tikz]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \...
10
votes
1answer
376 views

problem with “crop circles” in tikz knot library

Using the knots library for tikz, I get very thin outlines of the circumferences of the clipping circles. How do I make them disappear? Here is a MWE: \documentclass{minimal} \usepackage{tikz} \...
10
votes
4answers
815 views

Semitransparent outside “clipped” region?

To highlight part of a graph for a presentation that I'm writing, I would like to "circle" an area and make semitransparent everything outside that area. Anything inside that area should remain ...
15
votes
2answers
689 views

Path clipping in 3D only works in two out of three planes?

In the following code, I'm trying to draw three clipped circles in three orthogonal planes. I'm using this approach to clip the appropriate sections of the circles. This works nicely in the xy and yz ...
5
votes
2answers
1k views

pgfplots and tikz: clipping a named plot

I would like to clip along a \addplot line made by pgfplots. I am not sure entirely how to do this since my tries have failed. What have done so far is below. \documentclass[tikz, convert = false]{...
4
votes
1answer
260 views

Correct clipping of 3D tikz for adjustbox?

Consider the following MWE: \documentclass[% 12pt, journal, onecolumn, twoside, draftcls, letterpaper, ]{IEEEtran} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{positioning} \...
2
votes
1answer
292 views

How to avoid the tiny white line between clipped areas and gobbed line width

The is a tiny unwanted white line between blue areas (it is a MWE ;-) ) and the black border line is cut by the clipping line. How to avoid this two problems ? It's not visible on a png image but ...
4
votes
1answer
318 views

Tikz: shading region bounded by several curves with previously named path

This two questions have been answered separatly it should be interesting to be able to shade a region using previously named pathes. Is there a possibility to combine this two macros ? \documentclass[...
6
votes
1answer
373 views

Number of intersection points

In this examle from pgfmanual p 132, how to use \t the number of intersections point outside \fill command. I tried \def\Nb{\t} but it dosen't work. \begin{tikzpicture} \clip (-2,-2) rectangle (2,2); ...
4
votes
1answer
390 views

Use a part of a path to make a cycle

I have two pathes the firt is to be fully drawed, but only a part of the second using intersection point with the first. Here an example: I want to draw only the upper part of the square (dashed) as ...
6
votes
1answer
332 views

Fore-edge painting package for books?

I would like to add fore-edge painting to the edge of each page, so that when the pages are fanned, it reveals text or an image. It seems it would be easy enough to slice up an image(Tikz/PGF), or ...
8
votes
1answer
186 views

How come only part of the interior of this path is used for clipping?

Here is an example document and the output I get from it. \documentclass[convert={size=480}]{standalone} \usepackage{tikz} \tikzset{ little circle/.style = { fill = black, ...
2
votes
2answers
1k views

How to fill a specified area using TikZ

I want to fill some regions which are only parts of a shape in a TikZ drawing (marked as "Here" in the following drawings): \documentclass{standalone} \usepackage[tikz]{bclogo} \usetikzlibrary{arrows,...
12
votes
2answers
2k views

With TikZ, is it possible to only clip horizontally or vertically?

With TikZ, is it possible to only clip horizontally or vertically? Normally, when clipping, e.g., \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikz} \clip (-1,-1) rectangle (1,...
7
votes
1answer
1k views

Crop ternary plot

I want to crop the top part of the ternary plot given below at x = 0.7 because I don't have any datapoints in that region and want to save space. How can I do this? \documentclass{standalone} \...