Linked Questions

16
votes
1answer
956 views

Checking whether or not a node has been previously defined [duplicate]

I use the following code to draw a line to connect two nodes in my graphic: \draw ( p-\prow-\col) -- (p-\row-\col); At the edge of the figure, however, not every node will have a predecessor from ...
114
votes
8answers
11k views

Sieve of Eratosthenes in tikz

I am writing notes for my students under the topic of prime factorization and I needed to illustrate the Sieve of Eratosthenes and this is what I came up with in tikz: \documentclass{article} \...
94
votes
7answers
49k views

How can you create a vertical timeline?

So far I have this, which half gets the job done, but I really wanted a slightly better looking and more descriptive timeline. Really I wanted to be able to write more than one line for each new ...
16
votes
4answers
7k views

High level macros and environments based on Tikz

I was browsing the tikz examples that I found this wonderful example. The example uses tikz to create a tex environment to produce a framed text. The result looks like this: The underlying process ...
15
votes
4answers
2k views

Why are node names inside \begin{scope} still visible outside?

The following example draws three rectangles, each divided in two parts (they're Lisp cons cells). It works fine, but something doesn't seem right: I have used \begin{scope} inside the \cons macro, ...
8
votes
2answers
9k views

pgfplots scale legend position when below xlabel

When using matlab2tikz to generate a .tikz from Matlab where the legend location is set to 'SouthOutside' (below the ylabel of figure), the position of the legend will cover the ylabel unless the ...
6
votes
3answers
1k views

Tikz fit variable number of nodes

I would like to draw a rectangle or ellipse over some nodes I am drawing with tikz. I know how to do that if the number of nodes is fixed: I just enumerate them. I was wondering if there is a way to ...
6
votes
2answers
2k views

Passing parameters to tikz picture?

I wrote a tikz diagram, which resides in its own dedicated file. I would like to include this file several times in my document, each time highlighting a different node in it. I tried defining a macro ...
5
votes
2answers
207 views

How to modify this code to add more vertical space in timeline that uses Tikz

I am using code by @szantaii from How can you create a vertical timeline? I know there other timeline code in Latex, but I like to use the above solution, since the vertical timeline has the actual ...
3
votes
2answers
310 views

Tikz: Randomly drop connections in neural network

I used Tikz to draw a full connected neural network. Now I would like to drop randomly a certain proportion of arrows. How can I do that and is it possible to use my code for that? Here is my code and ...
1
vote
1answer
376 views

How to include a date in Timeline?

When I compile the following piece of code, I obtain a nice timeline in a short document. But, when I try to compile the same piece of code into a longer document (a 440 pages thesis), a specific date ...
3
votes
1answer
113 views

vertical timeline tikz clash with beamer poster

This vertical timeline using tikz looks great in an article but in a beamer poster the line spacing is miscalculated. The tikz code is from szantaii's answer to the question High level macros and ...
2
votes
1answer
160 views

Do until there is no intersection point

I want to do a loop until there is intersection points between two paths edit I oblic lines until they don't intersect the circle. When there is zero intersection points I have an error. Is there a ...
2
votes
0answers
168 views

The scope of tikz picture~~(in an animation)

I've try to modify the animate of Sieve of Eratosthenes from the code (author: Peter Grill): http://www.texample.net/tikz/examples/eratosthenes-sieve/ All I've done is I removed the title and the ...
1
vote
0answers
90 views

Is it possible to erase a TiKz node from the memory? [duplicate]

Given Martin Scharrer's nice answer to this question, I am wondering if one can "undefine" nodes. That is, I'd like to know of there is a command, say, \undefine{mynode} after which Martin Scharrer's ...

15 30 50 per page