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)

5
votes
1answer
101 views

TikZ node label is not being placed where I want it

Why is the following MWE not placing the label along the correct angle? \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[every path/.style={line ...
5
votes
2answers
6k views

drawing a line in polar coordinates

I have a point in polar coordinates (110:2cm), but from here I want to draw a line straight down. Doing (110:1cm) is a line towards the center along 110 degrees. Without taking 2*sin(110) and 2*cos(...
6
votes
1answer
601 views

circle items in an array

So I would like to circle two of the elements in my array at the same time. Even though they are in different rows and or columns. Here is what I have so far. \documentclass{article} \begin{...
6
votes
1answer
388 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 \usepackage{...
6
votes
2answers
410 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 plot[<ydomain=-1:...
7
votes
1answer
1k 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 ...
7
votes
1answer
2k 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. \begin{figure}[...
2
votes
0answers
68 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. ...
17
votes
3answers
460 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 ...
4
votes
1answer
111 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} [...
5
votes
1answer
3k views

How can I make tikzpicture flow smoothly around text?

I have a problem when I use tikzpicture and wrapfigure. The main issue is that when using the third parameter, the "distance" becomes arbitary. For example, I am using 9cm but what is the correct way ...
3
votes
1answer
548 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} \usepackage[utf8]{...
3
votes
1answer
131 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 \draw[...
5
votes
2answers
261 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} \...
8
votes
4answers
342 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 ...
8
votes
1answer
555 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 ...
6
votes
3answers
1k 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 \...
4
votes
1answer
488 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 ...
2
votes
1answer
325 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
516 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} \usetikzlibrary{arrows,shapes,calc,intersections,through,...
5
votes
2answers
221 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 ...
26
votes
1answer
1k 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 ...
5
votes
1answer
162 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. ...
19
votes
3answers
2k 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.
10
votes
3answers
536 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
0answers
70 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 ...
5
votes
1answer
345 views

Arrowheads every two points in Tikz

I have a file data.dat with the following lines: -1.200000 0.000000 -1.200000 -0.728000 -0.728000 -0.728000 -0.728000 0.614172 0.614172 0.614172 0.614172 1.231670 which ...
2
votes
1answer
278 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. ...
8
votes
1answer
253 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 ...
3
votes
1answer
572 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
118 views

Special design of 3 plots with LaTeX

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

Questions about my cv header and cover letter

I am working on my cv and my cover letter and I have different questions. My current code: \documentclass[11pt,a4paper]{moderncv} \moderncvtheme[green]{classic} \usepackage[utf8]...
1
vote
1answer
273 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. ...
3
votes
1answer
697 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} \tkzDrawLines[...
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.
6
votes
1answer
229 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} ...
16
votes
2answers
650 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 ...
3
votes
2answers
666 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
3k 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} \tikzstyle{male}=[circle,fill=blue!...
3
votes
1answer
537 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?
2
votes
1answer
554 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 ...
8
votes
1answer
2k views

Define error bar color in scatter class

I'm using scatter/classes to define color and markers for a plot, and I would like to specify the error bar color this way as well (to match the marker color). I have seen the error bar colors in ...
4
votes
1answer
1k 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} \usepackage{...
7
votes
3answers
872 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 ...
6
votes
2answers
4k 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
2k 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} \usepackage{...
0
votes
1answer
138 views

Alignment of graphs

\documentclass{article} \usepackage[demo]{graphicx} \usepackage{subfig} \usepackage{tabularx} \usepackage{tikz} \usetikzlibrary{arrows} \tikzstyle{male}=[circle,fill=blue!20,draw,font=\sffamily\...
2
votes
1answer
1k 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
1k 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 ...
5
votes
2answers
454 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$, ...