17 votes
Accepted

How to draw a diagram for "Rope Around the Earth" problem?

So I tried to reproduce the graphics you posted but removing the circle around the Earth and using it to make the equator. Yes, it's a shaded sphere but its position is accurate, trust me. If there is ...
Alenanno's user avatar
  • 37.2k
15 votes
Accepted

Tikz wrong calculation draw exponential function

This is caused by how the pgf math function exp is implemented. A simplified example: \documentclass{article} \usepackage{pgfmath, pgffor} \begin{document} \foreach \i in {8.9, 9.0, 9.1} { \...
muzimuzhi Z's user avatar
  • 26.1k
12 votes

Rotating Standard Graphs

Using rotate and transform shape you can rotate the graph any angle you choose. \documentclass[tikz,margin=0.5cm]{standalone} \usetikzlibrary{graphs} \usetikzlibrary{graphs.standard} \begin{...
Milo's user avatar
  • 9,420
12 votes

Tikz wrong calculation draw exponential function

No idea why this particular plot looks like this, but I would never plot a function by hand like this. I'd use pgfplots where it looks like this \documentclass[a4paper,11pt,border=10pt,]{standalone} \...
daleif's user avatar
  • 54k
11 votes

pgfextra vs. graph: a paradox!

\pgfextra does not surround it's contents with a pgfinterruptpath environment, so in: \path[fill=yellow] (-.5,0) circle [radius=1] \pgfextra{\fill [red] (.5,0) circle [radius=1];}; the "yellow" ...
Mark Wibrow's user avatar
  • 70.3k
11 votes

Rotating Standard Graphs

Just for testing, the graph generated by library Graphs actues as a node, when you use scope with the modificator rotate, only afects coordinates, to rotate each node you must declare the rotate value ...
J Leon V.'s user avatar
  • 11.1k
11 votes

How to draw a diagram for "Rope Around the Earth" problem?

A PSTricks solution only for either fun or comparison purposes. \documentclass[pstricks,dvipsnames]{standalone} \usepackage{pst-geo} \psset { Decran=9.6, path=C:/texlive/2020/texmf-dist/tex/...
Display Name's user avatar
  • 46.9k
11 votes
Accepted

Find midpoint of path

For TikZ, the midpoint M of a path can be get when going along the path and pick a coordinate at the position pos=.5 \draw (v1) to[bend left] coordinate[pos=.5] (M) (v2); TikZ code: \documentclass[...
Black Mild's user avatar
  • 17.4k
8 votes

How to horizontally align child nodes with the graphdrawing library of TikZ 3.0?

Instead every node={align=left} in tikzpicture parameters you should say: every node/.style={anchor=west} Result: Upgrade: To my taste, regarding to edited questions, the following solution looks ...
Zarko's user avatar
  • 296k
8 votes
Accepted

Creating a Fermat Spiral

My answer to spiral spring in tikz provides a way to that with a command: \newcommand\spiral{} % just for safety \def\spiral[#1](#2)(#3:#4)(#5:#6)[#7]{% %\spiral[options](center)(start angle:end angle)...
Guilherme Zanotelli's user avatar
8 votes

Tikz - drawing edges between subgraphs systematically

Moving your \foreach outside the \graph works as I suppose you would like. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{graphs} \usetikzlibrary{graphs.standard} \begin{document} \begin{...
Axel Krypton's user avatar
  • 1,083
8 votes
Accepted

Filling with color between functions

You are not far. You need some clipping with respect to the x values via the fill between[soft clip={domain=\xa:\xb}]; command for the green area. For the red and blue areas, you also have to use the ...
pluton's user avatar
  • 16.4k
7 votes

Broken line on Tikz Graph

Less concise than nice cfr answer ... instead graph use of the chain and define bigger minimum size of nodes. \documentclass[tikz, border=3mm ]{standalone} \...
Zarko's user avatar
  • 296k
7 votes

Broken line on Tikz Graph

You could simply increase the minimum size. You could also set a uniform text height and text depth, while aligning the letters to the base line, like this. I didn't understand what you meant about ...
cfr's user avatar
  • 196k
7 votes
Accepted

Based on what does TikZ decide which graph nodes to connect with an edge?

Section 19.7 ("Graph Operators, Color Classes, and Graph Expressions"), specifically Section 19.7.3: ("Graph Operators for Joining Groups") in the PGF Manual for Version 3.0.1a describes the approach ...
7 votes
Accepted

Nesting tikz nodes

Nesting tikzpictures isn't something you can always count on working, and you're nesting three levels deep. \feynmandiagram starts a tikzpicture, \tikz is a shortform of \begin{tikzpicture} .. \end{...
Torbjørn T.'s user avatar
7 votes

How to skip levels in a TikZ graph

The TikZ manual has become overwhelming and sometimes you have to read a chapter the third time to eventually find the option you have been looking for... In my case they are even two of them, ...
Daniel's user avatar
  • 37.5k
6 votes
Accepted

Automatically draw a graph with a cycle in Tikz?

Maybe you intend a tikz-cd: \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[every arrow/.append style={dash}, row sep = 10pt] &&d\ar[dddd]\\ &b\ar[ur]\\ a\...
CarLaTeX's user avatar
  • 62.1k
6 votes
Accepted

TikZ: Circle node split vertically mixes up representation

When you rotate a node, the anchors are also rotated, so the east anchor ends up on the top of the node when you have rotate=90. When you do right=of left in the options to empty, the positioning ...
Torbjørn T.'s user avatar
6 votes

Tkz-graph and foreach

Solution with vanilla tikz \documentclass[border = 5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[ node style/.style = {fill = black, minimum ...
caverac's user avatar
  • 7,921
6 votes
Accepted

pgfplots: How to draw exponential graph with 60° start angle?

One way is via this (note this uses a differnt function than yours). Your MWE is not wrong IMO. However, due to varying domains, your final axis is getting mixed-up. Nevertheless, you can obtain your ...
Raaja_is_at_topanswers.xyz's user avatar
5 votes

Drawing of a set with TikZ

I'm only answering this question because heather asked my advise and I cannot do this easily in a comment. I would use a clipping for the fill. The idea is to clip to a wider rectangle with a ...
cfr's user avatar
  • 196k

Only top scored, non community-wiki answers of a minimum length are eligible