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)

2
votes
2answers
1k views

Increase space between two tables in minipage and TikZ overlay

Sorry but this is the MWE I could post. I also attached the image. The top image is what I am getting and the bottom one is what I desire. I manage to create nodes but do not know how to connect them. ...
3
votes
1answer
559 views

problem making a commutative diagram in tikz using positioning library

I am using the positioning TikZ library to make a commutative diagram. I am having trouble getting the bottom arrow to be horizontal. Here is the output with my problem: the positioning library is ...
5
votes
1answer
756 views

Can we define a multiedge command using tikz?

I usually need to draw graphs with multiple edges. I would really appreciate if someone can tell me how to write a multiple edge command which will allow me to write one line instead of repeatedly ...
12
votes
1answer
709 views

Distressed text: photoshop like effects in LaTeX tikz?

Is it possible to create a "distressed" look using TikZ? For example: Note that it is akin to a filter over the text/image, as each letter looks different.
28
votes
3answers
17k views

How to set exact radius for a node?

I have a bunch of nodes and would like to size them so that their areas represent some numbers I have (so that if I have two nodes with corresponding values 1 and 2, then the second node's area should ...
6
votes
1answer
691 views

tikz example from manual fails

I have copied an example from the tikz manual, but it fails to compile \documentclass[]{scrbook} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{circuits} \usetikzlibrary{circuits.logic.IEC} ...
7
votes
2answers
322 views

how to test if tikz library is loaded

I want to write some demo code showing code with examples for tikz. However I want the resulting pdf to be automatically depended on the tikz libraries and therefore I must test which are loaded. Is ...
4
votes
1answer
2k views

Adding space between subfigures of tikzpicture (for caption)

I'm trying to draw two figures next to each others using tikzpicture. It's working fine, but the caption of the sub-figures is looking weird. I tried adding the \qquad's, but I'm still having the ...
5
votes
2answers
664 views

Draw reversed path in TikZ

Is there a way to draw a TikZ path reversed? I am trying to create some code that generates tessellating figures (to be used in How do we Draw a Bird in LaTeX). Here is what I got: ...
5
votes
2answers
3k views

Tikz right-angle edges between nodes

In the example below I'd like to have angled edges which just go vertically and horizontally. My aim is to get the edges like in this image (the rounded edges are not a must) : Here is my minimal ...
7
votes
3answers
3k views

Line through two points with offset in TikZ

I could not find a native command in TikZ allowing to draw a line going through two specified points where an offset can be controlled. So far, I'm using the calc extension to perform what I need but ...
2
votes
1answer
392 views

How can I add size of Tikz drawing into size of equation? (PART 2)

Related to: - How can I add size of Tikz drawing into size of equation? Code presented below is the result of combining code from solutions to: - How can I add clips above matrix? - How can I add some ...
8
votes
1answer
2k views

How to generate stem plots with TikZ like stem() in Matlab?

Given a set of (x,y) coordinates stored in a file, how could I generate a stem plot from those coordinates? I would like to achieve something similar as the matlab's stem function: ...
4
votes
2answers
452 views

How can I add size of Tikz drawing into size of equation?

This is slightly modified code from Frédéric's answer to How can I add clips above matrix? \documentclass{mwrep} \usepackage{amsmath} \usepackage{tikz} ...
6
votes
3answers
3k views

How to draw labeled parallel arrows in commutative diagram with TikZ?

I want to draw labeled parallel arrow in commutative diagram with TikZ, I searched on google and Tex Stackexchange, however, I found only the method to draw parallel arrow by transform canvas only, I ...
2
votes
2answers
1k views

Spacing circuit element labels from their elements with CircuiTikz

I want to draw a resistor with a resistance value showing and a voltage label showing as well. This is content-wise an MWE of everything I want: \documentclass{article} ...
10
votes
3answers
4k views

Line tangent to a a curve (using plot or controls), starting at a point

I need to draw lines that are parallel to a curve starting at a point. The curve could be a curve drawn using 3 point as my example below did, but alternatively could be a curve drawn using the ...
10
votes
1answer
1k views

Creating playing cards using TikZ, part 2

This is a follow up from this other post.. Thanks to the aid of some people I'm almost done, this is what I have now: \documentclass[parskip]{scrartcl} \usepackage[margin=15mm]{geometry} ...
10
votes
1answer
1k views

matlab2tikz externalize graphics only

I recently discovered the part of pgfplots that allows you to add external graphics with the \addplot graphics command. I have a matlab plot converted to tikz with matlab2tikz. Problem is that the ...
7
votes
1answer
734 views

Repeat scaled version of slide, \savebox and \usebox in multi-slide frame?

I have a frame where I uncover a tikz-diagram in 12 slides. In the next frame, I want to repeat a scaled-down version of the full diagram (slide 12). I've tried to use a combination of \savebox, ...
7
votes
1answer
5k views

pgfplots stacked bar plot: distance to axis, padding between bars

I have the following chart: \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usepackage{pgfplots} \definecolor{transfertoserver}{HTML}{D7191C} \definecolor{database}{HTML}{FDAE61} ...
3
votes
1answer
429 views

Unsetting a PGF/TikZ key

Is there any possibility of “unsetting” a PGF/TikZ key? By “unsetting” I mean to remove the key from the list of keys and make PGF/TikZ behave as if it was never specified. To clarify, consider this ...
7
votes
1answer
2k views

Setting fill color for TikZ arrow tips only (and not the path itself)

For many TikZ diagrams, I’d like to draw colored (often gray) arrows. I prefer the latex-style arrow tips (from the arrows library). These are filled by using the default background fill color. My ...
18
votes
2answers
9k views

Confused about TikZ \draw[rotate=angle] [duplicate]

I was trying in vain to use a rotated ellipse today and finally got it to work in an extremely hackish way. Trying to follow up, I turned to the manual (pg. 26): You can also append an ellipse to ...
33
votes
4answers
3k views

Creating playing cards using TikZ

I'm creating a card game, specifically a computer science Fluxx variant, and want to generate the cards through *TeX. They should look like this: In some of them I want to put some graphics or ...
4
votes
1answer
610 views

Creating definition of new shapes in PGF/TikZ

Can somebody help me out with declaring these shapes for nodes? : Need them as model for creation another shapes for symbols. Picked up those what I'm not able to define.Sorry there will be no MWE, ...
7
votes
1answer
3k views

How to globally tikzset styles

I would like to set a tikzstyle from within a tabular environment, and use it after the table. Adding the usual \global seems to have no effect. The MWE below produces: but I want the last line ...
12
votes
1answer
2k views

Calligraphic logo in tikz

Yep, it's that time again. I want to design a calligraphic logo and my obvious choice as LaTeX enthousiast is TikZ as implementation. Only, I lack the proper skills to do so and need some inspiration. ...
6
votes
1answer
706 views

position background image with \SetBgAnchor

I want to print an A4 page on B4 stock, with crop marks and bleeding square grid. I use memoir for crop marks, and background with TikZ for the grid. I would like the (0,0) in TikZ be placed at the ...
5
votes
1answer
3k views

How to fix the space between each x ticks in a pgfplot?

I want to plot some data using pgfplot. Here is what I got for now: \begin{tikzpicture} \begin{axis}[ xlabel=X, xmin = 0, xtick = {1,2,3,4,8}, ylabel=Y, enlargelimits=false ] \addplot ...
4
votes
1answer
874 views

TikZ semi transparent contiguous shapes with no gaps

Short Question: The short question can be stated as follows: Is there a way to perfectly align filled (but possibly not drawn) shapes that completely cover contiguous areas? Consider the MWE: ...
5
votes
3answers
451 views

Add a node above matrix column

I am trying to put symbols above and the columns of a matrix and also to the left of its rows. The following working example is basically, what I want, except, that the symbols are within the ...
5
votes
2answers
2k views

LaTeX, qtree: Color and Animation for branches of a graph tree

I'm trying to do a beamer animation of a parse of a simple binary branching tree. I'd like to either use different colored branches and node labels to code the different steps of the parser and/or ...
13
votes
2answers
4k views

How to select a finite number of samples from the file when plotting using pgfplot

I have a datafile containing thousands of points of which I need to plot only the first 100 points. How to do this using pgfplots? I tried the following with no effect. \begin{axis}[
xlabel=k,
...
3
votes
1answer
2k views

how to plot a sequence of numbers (not co-ordinates as such) using pgfplots

I have a data file containing a sequence of numbers, to be plotted against integers starting from 1. So the x co-ordinate is the row number of the data in the file. How to plot this data using ...
4
votes
2answers
2k views

Options to change a path on a elegant way in TikZ

I'm building a figure of a finite state automate. However the edge of F to C seems to make the image less readable. Using bend options doesn't solve the problem. is there a way to solve this problem? ...
5
votes
1answer
528 views

A looping edge with “shorten >=…” that is symmetrical and points toward the node

The "shorten >=" option in TikZ causes a change in the shape of the Bezier curve. With a looping edge for example, it makes the loop asymmetrical (node A in the picture). I could make it symmetrical ...
6
votes
1answer
1k views

Horizontal bar-charts in PGFPlots: “point meta” messes with alignment

I'm drawing a rather unusual bar-chart to display the results of a small survey. The axis of the chart extends in both the negative and the positive domain. However, there is no zero and all values ...
6
votes
3answers
5k views

Configuring node placement and width with TikZ, overlapping nodes

I've created a simple feedback structure but cannot cause the utmost right block not to overlap with the circle. I've tried altering this block's width with minimum width and text width, but it ...
11
votes
1answer
491 views

Branching lines in TikZ without antialiasing/subpixel artifact?

Is there a way to properly branch a line into several lines in TikZ? Simply adding paths creates a darkening artifact where the paths overlap: \begin{tikzpicture}[very thin,-stealth] \draw (-1, 0) ...
20
votes
6answers
17k views

How to establish node-anchor-like points on a (tikz) rectangle path (is there a better method than the one described)?

Background and desired functionality Rectangles can be drawn with tikz in a number of ways, one way of doing so is to define a rectangle node as follows: \node (rectangle) [draw, rectangle] {A ...
13
votes
2answers
7k views

How to display labels on points of a tikz plot

I'm creating a \begin{tikzpicture} - unclear if I'm working with tike or pgf or whatever honestly, but I have my data displaying perfectly using \addplot[my options] coordinates { .. my data here }. ...
3
votes
1answer
251 views

How to align macros to correct order in TikZ matrix?

How to fix the broken placement of macros in matrix? \documentclass{article} \usepackage{tikz} \begin{document} \newcommand{\macroA}{ \begin{tikzpicture} \node[minimum height=1.5cm,minimum ...
21
votes
4answers
2k views

How to draw arrows from cell to cell at the borders of a table

How can I draw arrows from cell to cell at the borders of a table? More precisely I'd like to get something like this: It would be nice to have a solution using TikZ. Edit: Since I have other ...
8
votes
2answers
908 views

Nested foreach inside a TikZ matrix for both rows and columns

I'm trying to create a matrix using nested \foreach loops. I tried following the example I found in a previous question, but I keep getting errors. Here is the code I tried to run: ...
8
votes
2answers
2k views

Is it possible to have a Bézier curve with 3 control points in TikZ?

In TikZ, it is possible to draw a Bézier curve of degree 3 with 2 control points p0, p1, p2, and p3 as follows: \draw(p0)..controls (p1) and (p2)..(p3); I am wondering whether there is a way to ...
8
votes
1answer
655 views

Access mdframed node coordinates with TikZ?

Is it possible to get a (breakable) frame like this with mdframed? Or as a more general question. Can one access the coordinates of the frame that is drawn with TikZ? With a pagebreak in it: I ...
23
votes
5answers
2k views

Lower and upper Riemann sums

I am trying to create a few images for educational purposes. Therefore I need to be able to illustrate the area under various functions, using lower and upper riemann sums (rectangles) Reason for not ...
13
votes
2answers
1k views

Draft mode in Tikz externalize hides graphics, but not without externalize

Maybe this is expected behaviour, but it's not documented in the manual, and it certainly surprised me. When you use the draft class option and use the tikz external library, all Tikz pictures are ...
11
votes
1answer
936 views

How to use \pgftransformcm and \inheritsavedanchors in a new shape (batman) from an ellipse

I try to make this shape but I have several problem. First to place the logo inside the ellipse, I used \pgftransformcm{1}{0}{0}{1}{\centerpoint} perhaps there is a better solution. I need to use ...