TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

6
votes
2answers
241 views

How to limit the values to plot from an external file (Domain limiting)

I want to generate many plots automatically from data files. Some of them have excessing values which cannot/shouldn't be plotted. How to limit/cut the plot in a case like: \draw ...
6
votes
1answer
649 views

Skipping or changing one grid line

I'm trying to plot normalized data in a bar chart. To better show that the data is normalized, I want the horizontal grid line at 1 to look differently, eg. dashed instead of dotted. I guess this can ...
6
votes
1answer
1k views

Creating crow's foot style E-R diagrams, rather than Chen-style ones

I need to draw some Entity-Relationship diagrams for my computing coursework, which so far I have written in LaTeX. I could draw them manually using tikz, but that sounds somewhat unpleasant, so I ...
2
votes
0answers
64 views

Tikz: how to make a node within a text? [duplicate]

I would like to add a tikz node within a text in such a way that it doesn't add space between the lines. In particular, I'd like to animate (in beamer) a frame around the text without it taking space. ...
6
votes
1answer
318 views

Commutative Diagrams with internal mappings

I'd like to produce a commutative diagram with mappings specified inside it, as follows: My rankly amateur efforts so far have centered on tikzcd with extra columns and rows, as in ...
4
votes
1answer
104 views

make nodes different sizes in the same image

I want to make all the nodes the same size. But the problem is that some of them have more text in them so they automatically get bigger. Any help would be nice thanks. Code \begin{tikzpicture} ...
6
votes
1answer
818 views

How to create symbolic x coords without losing last bar

I've created a bar chart with labels for the x coordinates. But if I don't put a xmin/xmax in, only half of the first and last bar appear. If I add a xmax it shows up on the axis. ...
3
votes
1answer
351 views

Increasing space between text in tikz

I am making a picture in tikz, and I have some labels that don't look nice. Here's the code \documentclass{article} \usepackage{tikz} \usetikzlibrary{snakes} \usepackage{mathrsfs} ...
16
votes
3answers
395 views

How to draw a picture by using tikz as backgroud of a character?

I am writing some Chinese character and hope to draw simple pictures by tikz and use it as background of this chinese characters. In a short I'd like to get some results as this picture (ignore the ...
5
votes
2answers
203 views

draw and fill options ignored in column style

The draw and fill options are ignored when supplied to column 1/.style in a tikz matrix, but text color and other options aren't: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} ...
7
votes
1answer
340 views

Newpage between tikzpictures

I'm trying to draw in tikz. The aim is to create a document with a first page with the title and other infos. Each of the other page is a wiremap a of type of cable. I use python to generate the tex ...
5
votes
2answers
235 views

How to draw this curve when the coordinates of the points too large?

I want to draw the graph of the function $y = \dfrac{21 x + 9}{x+9}$ and $A(-13, 66)$, $B(1, 3)$, $C(-69, 24)$, and $G(-27, 31)$. I used Geogebra to draw. This is my code ...
8
votes
4answers
277 views

Why doesn't this code combining \foreach with \newtheorem work?

Here is an example document. \documentclass[a4paper]{amsart} \usepackage{tikz} \theoremstyle{definition} \newtheorem{baseTheorem}{Base Theorem}[section] \foreach \x in ...
4
votes
1answer
380 views

Have gnuplot inherit the domain from pgfplots

I'm using domain=min:max within pgfplots, but unless I provide the same limits to gnuplot explicitly, they are ignored and gnuplot proceeds with plotting in the range [-10,10] (I assume that is the ...
3
votes
1answer
121 views

Circle with more than one “marking”

I was experimenting with \draw[ decoration={markings, mark=at position 0.75 with {\arrow[scale=2]{<}}}, postaction={decorate} ] (0,0) circle (2); and replaced it with ...
2
votes
1answer
246 views

Softsign derivative 1/(1+abs(x))^2 not drawn correctly at the 2009 latexlive version tikz, pgfplots

I want to draw 1/(1+abs(x))^2 in tikz. At home I have the new latexlive version installed and everything looks fine. At work I do not have the new latex version because Ubuntu 12.04 still includes the ...
6
votes
1answer
352 views

How to use a counter inside node<> in TikZ?

I'm trying to draw nodes one by one on a list of predefined coordinates. \documentclass{beamer} \usepackage{caption} \usepackage{pgf,tikz} ...
6
votes
3answers
743 views

Plot function with 2 variables in tikz / pgfplots

Using Tikz / pgfplots, how can you plot a function with two variables, such as: |x| + |y| <= 1 / sqrt(2)? If the function only had one input,X, it is easy to plot: \begin{figure}[!hb] \centering ...
5
votes
2answers
190 views

TikZ - use non-Tikz command to layout part of picture

I'm using a package (semantic.sty) that draws something semi-complicated using LaTeX (not TikZ). I would like to draw part of a TikZ picture using the same command, with parts of the TikZ picture ...
4
votes
1answer
137 views

Range chart by category and value

Basically I've been writing my work with XeLaTeX enthusiastically now for about a year and love it, but today for the first time I tried to draw a graph and realised I still have a lot to learn. ...
3
votes
0answers
68 views

Real Zoom in a plot [duplicate]

I was wondering if there are a mean to zoom in the plot, I know about spy library (PGFPlots) but this later tries only to scale the windowed area and get the raster bitmap after a stretch. Here, I am ...
9
votes
3answers
446 views

How do I create unadorned color bars without a plot?

I want to create color bars of the type used by Kenneth Moreland in his excellent paper, "Diverging Color Maps for Scientific Visualization". They are unadorned and look like this: Any idea how he ...
3
votes
1answer
459 views

Shifting nested tikz scopes with a command

I try to automate some things with tikz, and I am running into a problem that I do not understand. Nesting scopes with shifts defined as commands does not work as I was expecting. For example, this ...
2
votes
1answer
113 views

Special design of 3 plots with LaTeX

I wish design 3 plots (A, B and C) in the form of: ------------------------+---------------+ | | A | | ...
2
votes
1answer
461 views

Undefined control sequence \tkzDrawArc

I'm trying to follow an example of arc drawing from one tex.stackexchange question: \begin{tikzpicture} \tkzDefPoint(0,0){O} \tkzDefPoint(2,-2){A} \tkzDefPoint(60:2){B} ...
1
vote
1answer
178 views

How to write a tree with no (visible) root with TikZ?

I’m trying to write a tree structure in TikZ. The trees in question are labelled on the leaf only; there is no label on inner nodes. Because I don’t use node on inner nodes, the tree structure joins. ...
8
votes
1answer
230 views

Can TikZ emulate PSTricks' inline \Rnodes, scattered along a complex equation?

PSTricks' \Rnode makes it easy to add annotations to a complex equation typeset by (La)TeX: Simply add \Rnodes around existing elements of the equation, and the mathematical typesetting is ...
25
votes
1answer
739 views

Can TikZ dashed lines emulate PSTricks dashed lines?

Dashed lines differ between TikZ and PSTricks: PSTricks provides symmetry about the midpoint, and full dashes are guaranteed at each end. Can TikZ be configured to achieve this? (By default TikZ does ...
14
votes
3answers
3k views

How to align text in TikZ nodes by baseline?

I need to draw a graph where some nodes have the same y-coordinate. I want the text within the nodes on the same y-coordinate to be baseline-aligned. However, the text seems to be aligned by the ...
5
votes
1answer
166 views

Set a tikz node's contents from a style

In tikz, how can I set a node's contents from a style ? For example, instead of writing this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} ...
18
votes
3answers
1k views

Draw Spiral Cone Tikz

Im trying to do a spiral cone in Tikz. I dont know what is the best way to do this.
2
votes
1answer
797 views

How can I change the color only of the links pointing to node 3?

\documentclass{article} \usepackage{graphicx} % \usepackage{amsfonts} % \usepackage{amsmath} % \usepackage{verbatim} \usepackage{tikz} \usetikzlibrary{arrows} ...
16
votes
2answers
478 views

Drawing rays in tikz

Is there a way to draw rays using TikZ? By ray I mean a line that has a defined starting point but no defined end. So I would like to draw a straight line, that starts at point A, crosses point B and ...
2
votes
1answer
368 views

line spacing in tikzposter

The line spacing in blocks of the tikzposter seem to depend on the number of paragraphs or the presence of images included by the use \includegraphics. For example in the poster example distributed ...
3
votes
2answers
545 views

I need pointers on how to draw my neural-network diagram

Please help me draw this diagram. I'm practicing on TikZ, but it's so difficult. I don't know which library I should use, matrix/chain or another something ? I also don't know how to draw a circle ...
2
votes
1answer
425 views

tikzposter text justification in blocks

I have started to use the tikzposter class and I wonder why the text inside blocks is flushed left by default instead of justified. How can I change the text alignment in blocks to be fully justified? ...
21
votes
5answers
1k views

Visualizing functions on the integers

I want to give a good visualization of two functions on the integers. Is there a way to write something that looks like this: I thought of using tikz, but I am not sure how.
2
votes
1answer
226 views

Repairing old tkz-2d TIKZ Example

I want use the following TikZ example: TikZ Example Intersecting arcs However, the package tkz-2d has been superseeded by tkz-euclide. It produces numerous errors and the ouput is a little dot. ...
13
votes
3answers
460 views

How to invert even-odd filling?

Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even ...
1
vote
1answer
935 views

pgfplots: multiple legends or one legend and a heading

In my plot, I want my standard legend that says what value of c corresponds to what color. However, I would also look to put the function in plot. \documentclass[tikz]{standalone} ...
0
votes
1answer
127 views

Alignment of graphs

\documentclass{article} \usepackage[demo]{graphicx} \usepackage{subfig} \usepackage{tabularx} \usepackage{tikz} \usetikzlibrary{arrows} ...
1
vote
1answer
633 views

Labelling tikz nodes AND edges

The following is a snippet of the original. It works.., \documentclass[12pt]{article} \usepackage{tikz} % drawing support \usetikzlibrary{trees,arrows,decorations.markings} ...
7
votes
3answers
600 views

Numbering nodes in a for loop

I've just started using TikZ to make basic graphs, and I'm trying to reproduce the Petersen graph. I've managed to make it without using for loops, but this obviously isn't a great method for bigger ...
4
votes
1answer
511 views

How to make add tick to node in tikz

I'm trying to draw a simple timeline in tikz. Here's what I have: \documentclass[12pt,a4paper,bibtotoc]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} ...
2
votes
1answer
671 views

Using current path position in coordinate calculation

I often find myself writing code like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node (aNodeWithALongName) at (1,1) {a}; \node ...
4
votes
1answer
877 views

TikZ picture in header with opacity

I have a very similar problem mentioned here. But I like to put a tikz logo with transparency in the heading of the document using fancyhdr. If I compile the example below by enabling any of the two ...
4
votes
2answers
3k views

How to Make This Block Diagram with LaTeX

I understand that there are some questions here regarding the block diagrams. However, I am strongly interested in one particular style shown as below: This is a picture from a paper. As can be ...
6
votes
1answer
1k views

Graph of sin(1/x) in pgfplots and TikZ

I try to draw the graph of sin(1/x) on domain (0,1]; using pgfplots, it seems to work, but with TikZ plot-function, it doesn't. What am I doing wrong? My code: \documentclass{standalone} ...
6
votes
1answer
278 views

Why overprint-environment not fix position?

I use overprint environment in beamer with two columns, when overlay it move down and the last slide has some space. How can I solve this problem. \documentclass{beamer} \usepackage{tikz} ...
5
votes
2answers
371 views

Shading a Region Between Two Dashed Lines

I have drawn an axis with two dashed vertical lines: \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=middle, ymin=-6, ymax=6, ytick={1,3,5,-1,-3,-5}, ylabel=$y$, ...