Linked Questions

202
votes
17answers
39k views

How can we draw a Christmas tree with decorations, using TikZ?

I would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree: \documentclass{article} \usepackage{tikz} \usetikzlibrary{...
7
votes
3answers
523 views

How to partially make a segment of a path dashed?

I have two stocks, A and B. These two "meet" each other at rates q(x), and f(x), by going through a joint-state process called X. Then, A becomes a, and B becomes b. I thought about visualizing the ...
18
votes
1answer
654 views

Eraser tool for TikZ

I am asking for a style (or something similar), let us call it ERASE. The imaginary tool works as a convenient inverse clip or eraser within a scope. The specific way is asked within the comment in ...
16
votes
1answer
705 views

How can I draw dashed lines of this picture?

I am trying to draw this picture I tried \documentclass[border=2mm,tikz]{standalone} \usepackage{tikz-3dplot} \usetikzlibrary{3dtools} \tikzset{intersection of line trough/.code args={#1 and #2 ...
10
votes
3answers
853 views

How to fill a split node with two different colors?

I have that issue when try to fill a split node with two different colors. After using rectangle split part fill={red,blue} as an node argument the drop shadow overlap the node because I don't use the ...
11
votes
1answer
2k views

Morphing only a part of a full path in tikz

This might be a tikz newbie question but I have some trouble solving this. I want to draw and fill a rectangular path where path morphing should be applied only to the upper side of the shape, more ...
6
votes
2answers
211 views

Test whether a circle fully lies within a polygon in TikZ

Given the following TikZ picture with an irregularly shaped polygon: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[draw=blue] (0,3) -- (5,4) -- (3,2) -- (4,0) -...
5
votes
3answers
400 views

Intersection of a sphere and a plane knowing equations

I am trying draw a circle is intersection of a plane has equation 2 x − 2 y + z − 15 = 0 and the equation of the sphere is ( x − 1)^2 + ( y + 1)^ 2 + ( z − 2)^ 2 − 25 = 0. The plane cut the sphere is ...
8
votes
2answers
352 views

Filling a box excluding circles inside it

I was trying to create an image in TIKZ. My code is as below: \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, shadows, fit, arrows, ...
8
votes
1answer
521 views

Filling an area between two curves

I would like to draw the following figure: To do this I have used the following codes : \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{...
5
votes
1answer
461 views

Shade part of a Venn diagram

Can someone show me how to shade the yellow region by modifying my code? Thank you in advance guys :) \documentclass[]{article} \usepackage[margin=0.5in]{geometry} \usepackage{pgfplots} \renewcommand{...
4
votes
3answers
154 views

Tikz equivalent for pst-rputover

For pstricks the package pst-rputover (new on ctan since 2017-03-28) has been created to solve following problem In brief, I'm looking for a version of \rput* that blocks out lines but not fill ...
6
votes
1answer
262 views

Draw death star

How to add the typical grid cells (image modified from https://en.wikipedia.org/wiki/Death_Star) to the following sketch of the death star? This is what I have so far \documentclass{standalone} \...
2
votes
2answers
200 views

How to improve this stereographic projection

I am trying to draw the stereographic projection in the following way: \documentclass{article} \usepackage{mathtools} \usepackage{wrapfig} \usepackage{pgf,tikz,pgfplots} \usetikzlibrary{decorations....
6
votes
1answer
313 views

How to draw the diameter of a domain in Tikz?

I am writing a short document on basic Set Theory and would like to include a few images. The first definition which I have been unable to draw for myself is the diameter. The diameter of a non-...
4
votes
2answers
335 views

How to make text masking background shape lines

I want to draw a picture with some text masking the background shape lines. I tried with opacity but the fill is not very nature. \documentclass[border=5mm, convert, usenames, dvipsnames]{standalone} ...
2
votes
1answer
204 views

Tikz; decoration with rounded corners

I don't know why, but I can't use decoration with rounded corners. The following MWE fails with ERROR: Dimension too large.: \documentclass[beamer,tikz,preview]{standalone} \usetikzlibrary{...
2
votes
1answer
108 views

TikZ: create break in arc behind diameter?

In the picture below, where the back portion of the great semicircle "ducks behind" the arrow-headed diameter, I manually stopped and restarted the arc drawing on the two sides of the diameter. The ...
2
votes
2answers
70 views

Intersection between sets in a Venn diagram with TikZ

I would like the intersection of sets P and Q to be white as in the attached figure. My command is as follows: \documentclass[10pt, a4paper, serif, xcolor = {divpsnames, svgnames}]{beamer} \...
1
vote
1answer
78 views

Sphere shell using tikz

How can I draw a Stereographic Projection using tikz? I tried graph using manual TikZ, but I did not succeed. Any help?
4
votes
1answer
47 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 \...
3
votes
1answer
70 views

Create cutout of rectangle, where cutout is also node

I'm trying to overlay a picture with a semiopaque rectangle, then cut out some shapes (rectangles and circles) so the image is clear in those, then point to the cutouts with something like tikz \pin ...
3
votes
1answer
133 views

Mapping with Tikz and Gnuplot in defined area

i´m trying to plot some x,y and z values from a .txt-file with gnuplot in Latex. The plotting itself works fine. The Problem is, that there should be a defined Outline surrounding my plot. Everything ...
2
votes
1answer
103 views

Unable to apply multiple decorations

I'm trying to decorate a path with vectors. I've created two different styles: one which creates tangent vectors, and one which creates random ones. I want in each selected point of the path two ...
3
votes
1answer
77 views

How to get both transparency and rounded corners in tikz picture without using additional packages?

I am trying to create a tikz image that has rounded corners and transparency at the same time. The problem I face with the MWE given below is I can have either transparency or rounded corners, but not ...
1
vote
1answer
81 views

Matrix image with shattered glass effect

I have a matrix whose primary dimension is infinite and want a way to reflect this in the matrix diagram itself. The following image is not what I want, but it illustrates the jist. I would prefer to ...
2
votes
1answer
66 views

TiKZ copy shadow with watermark issue

In the MWE we can see shadowed nodes with texts. If we don't add a watermark, the result is as desired on the first TiKZ node, but with a watermark, the fill=write option required by the copy shadow ...
2
votes
1answer
40 views

Lines going through ellipse instead of stopping at boundary

I am trying to draw something like this on LaTeX: Here is my code: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{shapes} \usepackage[american,siunitx]{circuitikz} \usepackage[...
0
votes
1answer
21 views

TikZ: clipping inside the box

I can clip everything that is outside of a box \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[] \clip (-1, 0) rectangle (1, 1); \draw (0, 0) circle (2 and .5); \end{...
0
votes
0answers
26 views

Tikz Document Margin and Orientation

Here is my code: \documentclass[tikz,border=3.14mm]{standalone} \usepackage{amssymb, graphicx} \usepackage{amsmath} \usepackage{amsthm} \usepackage{float} \usepackage{enumitem} \usepackage{amsfonts,...