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)

10
votes
1answer
1k views

TikZ: how to draw chained tabular material

I am new to TikZ, and this is probably regarded as do-my-homework-for-me question. I'd like to draw a diagram like this: First I need the very basic help on the segments themselves. I have tried ...
1
vote
1answer
1k views

Why does \includegraphics fail when using TikZ's externalization?

I'm trying to use \includegraphics and the auto-pst-pdf package to convert and import an EPS file, but when I enable TikZ's external library, \includegraphics fails with an error message: Package ...
2
votes
2answers
2k views

How to set TikZ figure size and font size to match my doc?

After some configuration nightmare i've managed to print out GNU Octave plots (via gnuplot) to tikz-pgf and display it in my LyX document.. %& -shell-escape -enable-write18 ...
7
votes
2answers
1k views

Center a Node Vertically TikZ

I'm using TikZ to create the following drawing: So far so good, but now I'd like to center the node with the gray background vertically. Here's its code: \setlength{\arraycolsep}{2pt} ...
15
votes
1answer
2k views

Drawing a Markov chain using Tikz

I want to draw the following Markov chain using tikz, but I have a few problems that I do not know how to handle: I want the transition grid to look exactly like the picture. All outgoing edges are ...
5
votes
1answer
618 views

Counting points from csv file pgfplots

I am importing data from a .csv file to obtain a scatter plot, here's the MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ jitter/.style={ x ...
7
votes
1answer
610 views

How to make correct shading with hsb color model?

I want to use hsb color model to shading. First rectangle shows a shading using rgb color model. Second rectangle shows a shading using hsb color model. But I don't understand why I don't obtain the ...
6
votes
1answer
328 views

Problem with gnuplot

[fr] La 1ere figure ci-dessous permet de représenter la conversion analogique numérique avec \NN le nombre de niveaux, réalisée avec le code suivant (il faut autoriser gnuplot). Comme vous pouvez le ...
10
votes
1answer
1k views

Drawing a tree where many nodes have the same child in TikZ

I'm trying the draw a tree using the TikZ package, but I don't know how to draw a child node that has many parents. An example for that, is given by this picture My problem is how to draw the level ...
5
votes
1answer
678 views

TikZ tree whose children are located at specified positions?

Is there a way to construct a tree whose children are located at specified positions, so that TikZ computes the locations of the other nodes in the tree based on the level distance and sibling ...
5
votes
2answers
2k views

Set total width of TikZ node / Resize lrbox

I am currently preparing a poster for a conference and decided to use 'beamerposter' for that purpose. As I don't really like the standard templates I decided to go after a design similar to this ...
5
votes
1answer
409 views

Using \foreach of the forarray package to draw a path in TikZ

I want to create a graph of values I defined in an array using \drawwith TikZ. I am having troubles including the part of the draw-command generated by an \ForEach -loop (forarray-package), which ...
5
votes
1answer
280 views

Fill Nodes according to table/data file

I have a lattice of nodes generated by two \foreach commands. So each node has two numbers which define its location (essentially x and y coordinates). Is there any way to fill a circle at that node ...
8
votes
2answers
326 views

TikZ:How to consider a curve as an axis in a chart?

In the shown image bottom and left lines are considered as axis...:How to consider left curve as an axis in the chart? Psychrometric charts: ...
16
votes
2answers
811 views

Using tikzlibrary spy without magnifying line width and/or mark size

I am having two set of data and am trying to create an inset to show, where they differ. Therefore, it does not help me to simply magnify the area in a "canvas style" thus magnifying also mark sizes ...
8
votes
3answers
218 views

Applying TikZ options stored in a file

I need to set some TikZ options that have been written to a file by a script. I thought I could use a helper macro defined with \edef and the expandable version of \input as described in Why is ...
13
votes
1answer
2k views

How to use “fit” to frame the nodes and labels

I'm using the fit TikZ library to fit a rectangle around two nodes which include labels. However, the rectangle is only fit around the actual nodes, not about their labels: \documentclass{article} ...
5
votes
2answers
385 views

TikZ:How to connect nodes in another way

I have this... \documentclass{standalone} \usepackage{tikz} ...
3
votes
3answers
3k views

How to make pgfgantt scale to specific widths in the page? (ex. textwidth)

I'm trying to use pgfgantt to create a gantt chart for a project spanning many weeks, thus the following code would overflow through the right margin. I can't find a way to alter the size of the grid ...
10
votes
4answers
911 views

How create circle node in Tikz with T from lines inside? T made split node to 3 sectors

I woud like create 3 sector circle node. See the following figure sectors are bounded by lines
7
votes
1answer
1k views

How to make the plot mark size independent of the scale?

the next code \documentclass{article} \usepackage{tikz} \usetikzlibrary{plotmarks} \begin{document} \begin{tikzpicture} [yscale=2] \draw [very thin, lightgray] (0,0) grid (4,4); \draw [cyan] plot ...
15
votes
2answers
3k views

Making a square centered at a point in TikZ

Im a newbie to TikZ, so this question may seem stupid. Im a looking at a facility location problem in the plane where I have generated some data points consisting of (x,y)-coordinates for each ...
8
votes
3answers
823 views

TikZ: edge should not interfere with other elements in the graph and label positioning

I'm quite new to TikZ and I created the following graph: \begin{tikzpicture} \node[draw,circle] (n4) at (2, -3) {4}; \node[draw,circle] (n5) at (2, -4) {5}; \node[draw,circle] (n6) at (1, -5) {6}; ...
4
votes
3answers
1k views

How to draw star in TikZ background

I draw shapes on background via pgfonlayer \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture} \begin{pgfonlayer}{background} ...
3
votes
1answer
151 views

How to automatize the creation of arrows in TikZ?

I'm creating yet another graph and I don't have particular problems. I can easily create the nodes, assign IDs and create arrows/paths using these IDs. But when there is a lot of content and there is ...
37
votes
5answers
32k views

TikZ set node label position more precisely

This seems like it should be really easy but I can't seem to find it anywhere... I'd like to be able to fine-tune the positioning of a node label. I'm aware of the ...
10
votes
1answer
1k views

pgfplots how to nicely place nodes

The picture produced by code blow, there are two problems I have. (1) the number above point overlapped (2) the precision of number is not right, eg. I want 0.913, not 0.91 For the first problem ...
18
votes
5answers
902 views

Convert font letters to vector format and fill with a pattern

I have worked with Illustrator and CorelDraw and I usually take fonts and convert them to curves after which I would fill in the curves with patterns, merge them with other vectors or the sort. Is it ...
2
votes
2answers
297 views

TikZ - circle split ignore empty parts

This has already been asked at TikZ: Removing the inner line of circle split, rectangle split, etc., but not answered for circles: How can I remove the split line in a picture where every ...
15
votes
3answers
537 views

How to use plot in a foreach loop into a single path?

To answer Creating gears in TikZ, I would use plot in a foreach loop used into a single path. But it seems that it is impossible... Here, an example to show my problem: \documentclass{standalone} ...
1
vote
0answers
981 views

Memory limit reached - Precompile .tikz plots - How to output pdf with papersize near to image [closed]

Okay, well I have a problem my .tex file has reached the memory limit. Now I tried to change the memory limit /usr/share/texmf/web2c/texmf.cnf however that does not work. It keeps saying pdflatex> ...
7
votes
1answer
630 views

TikZ - Circle Split, distinct stlye for nodeparts

I need to draw the lower part of a split circle node differently: I want it to have a double-style border, whereas the upper nodepart stays the same. I've read this but cannot tell how to modify it ...
4
votes
1answer
410 views

Vertical alignment in TikZ matrix

I am using a TikZ matrix to make a diagram where the entries in a row vary considerably in size: \documentclass{article} \usepackage{tikz,amsmath} \usetikzlibrary{matrix} \begin{document} ...
9
votes
2answers
735 views

Tikz : how to control length in 3D pictures?

I tried to draw a sphere with tikz with isometric projection or oblique projection (perpective cavalière in french). For oblique projection you have to put a scaling factor (scal < 1) for distance ...
6
votes
1answer
289 views

TikZ Intersection missing the true intersection slightly

I'm having issues with the intersection feature. It works, but it seems to "miss" the true intersection a bit. The code below produces the error for me. See this image (can't post it directly because ...
5
votes
1answer
2k views

Semi-transparent background for image

I would like to add a semi-transparent background to an eps figure in beamer. The picture itself has transparent background. I want to add the semi-transparant background as I use the tikz package to ...
12
votes
5answers
1k views

tikz loops, creating triangle with jagged hypotenuse

I am in dire need of constructing the image below. In short I am trying to create an exact replica of the image, and an alternative image, with a much more jagged hypotenuse. I thought about using ...
36
votes
6answers
2k views

Creating gears in TikZ

I am trying to create a gear in TikZ in which the number of spikes can be determined and the size as well. I was looking through the pgfmanual and stumbled upon the decorations section and I tried a ...
10
votes
3answers
408 views

parametric naming of nodes in Tikz

I would like to generate a graph with nodes and edges names by their coordinates in the graph, something like: \foreach \x in {0,1,...,6} \foreach \y in {1,...,4} \draw (1.5*\x,2.5*\y) circle ...
7
votes
2answers
551 views

Best way to draw a chevron diagram using Tikz

I want to visualize the transition from a state A to B by doing different operations x,y,z. I want to achieve something similar like this: ________ ________ | | ____ ...
17
votes
5answers
728 views

How to black out a figure for confidential reasons?

I have a document, that contains critical parts. Now two documents should be generated. One version that is "balcked out" and one version that is all readable. For pure text I found some hints using ...
4
votes
1answer
304 views

PGFPlots - shift marks

I'm plotting two lines, more or less on top of each other. This is fine when you can see the colors, but not on a black and white print. I have added marks, but due to the data points being take ...
15
votes
1answer
1k views

How to create a ball shading and to customize 3D lighting manually?

TikZ shading=ball will create a perfect 3D ball perspective, but it has no option to change the lighting angle, the contract, radius of light, etc (or I am not aware of). I tried to create a 3D ball ...
4
votes
4answers
827 views

TikZ:How to draw the pump schematic drawing

Here My first Tikz picture: help on positioning and suggestions we have a nice drawing similar to this image. How to draw the pump element in the above image? How to draw the anticlock arrow? ...
6
votes
2answers
3k views

Simple directed graph with some dashed edges

My code here does what I would like, except some node outlines are dashed where they should be solid. I realise I am probably putting the dashed in the wrong place, but I just tried my way to this. ...
9
votes
3answers
704 views

TikZ: How to extend the curve beyond the points

This example shows to draw some extra curve after the points by trial and error method. Is there a specific tikz command to do it? \documentclass{standalone} \usepackage{tikz} \begin{document} % ...
5
votes
1answer
521 views

Combine tikz paths

I have two paths I use for clipping. Is there a way to combine the two paths? I want the second clip path to clip the first path so I can create more complex shapes. e.g., (Note this is just a simple ...
1
vote
2answers
476 views

Tikz externalization figure not aligned/caption missing

I am putting a presentation together using beamer. I have a few tikz/pgf pictures that I externalize. Yet the figures are not put back into the document correctly. They are not in the right spot on ...
7
votes
1answer
2k views

How to control text margin in TikZ shapes

When using different shapes from TikZ library, they have different inner padding for text. Thus, for similar text, we will have nodes (shapes) with different sizes. Then, the child nodes will not be ...
5
votes
1answer
567 views

multipart nodes anchors for dividers

How can a node be positioned at the center/edge of a part in a multipart node using relative positioning? \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.multipart} ...