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)

0
votes
0answers
21 views

Encoding issue when writing Greek in fancy ToC using TikZ

I am creating a fancy ToC using TikZ. My code is \documentclass{book} \usepackage{kerkis} \usepackage{pifont} \usepackage[explicit]{titlesec} \usepackage{tikz} \usepackage{epigraph} ...
2
votes
2answers
58 views

Drawing function in tikz

I need to make a graphs as you can see in the picture, but I try many ways and I cannot get what I want. Any of you could help me?
2
votes
1answer
79 views

Labeling sides and angles of a right triangle for an argument of the Pythagorean Theorem

I would like to draw a right triangle so that its sides are not vertical or horizontal. (No coordinate axes.) I would like the legs to be labeled a and b and the hypotenuse to be labeled c. I would ...
4
votes
0answers
33 views

Did one manage to get the new dvisvgm driver from PGF 3.0 to work?

Background: PGF 3.0 added a new, direct way to create SVG. It now has a dvisvgm driver (pgfsys-dvisvgm.def) which has fewer (claimed) limitations than the pgfsys-tex4ht.def driver. Except it doesn't ...
0
votes
2answers
91 views

How to plot following graph

I want to draw the attached graph in LATEX. But i could not. Please help me.
6
votes
1answer
113 views

How can I make a slide rule in TikZ?

I have recently found out about slide rules from a Scientific American article and I like them very much. However, I have never got access to a real slide rule. So I made my own slide rule using my ...
27
votes
2answers
5k views

Unknown error using tikz matrix of nodes in beamer

I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I ...
9
votes
3answers
240 views

How to tell TikZ to first compute and then display a variable?

I want TikZ to first compute and then display the value of a variable. The question is, for sake of simplicity, based on this concrete example from TeXample.net: \documentclass{article} ...
13
votes
1answer
63 views

How to decorate a \pic path?

Consider the following example using the angles library and a pic path to mark an angle: \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{angles,decorations.markings} \begin{document} ...
-1
votes
0answers
41 views

A custom flow diagram

Do you know how can I draw this diagram in latex ? Do you have any suggestion with Tikz package ? I want to draw a part of it. Thank you so much.
9
votes
3answers
228 views

Tikz: how to plot arcsec and arccos?

It is easy to plot arctan and arccot, but got inverse sec and csc functions, It seems difficult. Can anyone do it?
4
votes
1answer
46 views

Help understanding the coordinate system used in tikz

I'm trying to understand how the coordinate system work for drawing pictures with tikz. I'm a little lost... Here is a MWE that shows of some example code: \documentstyle{article} \begin{document} ...
5
votes
1answer
37 views

Texample “map projections” not working

I can compile the "Example: Stereographic and cylindrical map projections" but it doesn't look like the one given there. (Neither the dashed meridians, nor the cylinder) The file: ...
12
votes
4answers
534 views

Foreach loop between two lists

\documentclass{article} \usepackage{tikz} \def\firstlist{0,1,2} \def\secondlist{0,1,2} \newcommand{\testa}{ \foreach \x/\y in {\firstlist/\secondlist} { \draw(0,\x)--(1,\y); } } ...
5
votes
0answers
53 views

How to draw revolved disk shape using TikZ?

Is there an elegant way to rotate this shape about the axis and draw in 3D? Ideally I would like to be able to draw a revolved view of this as 180 deg, 270 deg and the full revolution at 360 deg. ...
2
votes
0answers
82 views

Solid of revolution about arbitrary axis

I'd like to rotate the region between y=cos(x) and y=x^2 - 0.25*pi^2 about the line x=pi. How to do this? So far I have only managed to rotate around the x-axis: \documentclass[letterpaper]{article} ...
2
votes
0answers
26 views

Externalised pgfplots figure.eps gets rotated 180 degrees

I am externalizing some plots by pgfplots in .eps format by using these two sizes case1: width=0.55\textwidth height=0.40\textwidth case2: width=0.6\textwidth height=0.45\textwidth which give a ...
26
votes
6answers
1k views

Design of an asteroid belt in TikZ

How can I construct an asteroid belt in TikZ? That is my question: I get everything right, but I do not know how to make the asteroid belt. I have no code to add besides the preamble with TikZ ...
2
votes
0answers
58 views

How do I get a straight line in \begin{tikzpicture}[decoration=Koch snowflake]?

The following code \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.fractals} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=3,decoration=Koch snowflake] ...
4
votes
3answers
124 views

sketching simple arrows with different direction

I want to sketch this figure.. if you guide me to draw one of this arrows with direction i would be grateful..
9
votes
3answers
183 views

Citing TikZ and other packages

In some areas of maths, it is advised to cite mathematical and drawing software you use to make your computations and drawings. Since I draw in TikZ, I would like to know how officially cite the ...
5
votes
1answer
102 views

Looking for a special paper style for letters

I am looking for a special paper style. It should be a paper with a good looking background, so that I can write letters on it. Ideally, it should be something like the attached image. Some key ...
7
votes
2answers
2k views

CircuitTikZ - Combine Tripoles with resistors

I'm just learning how to use CircuitTikZ to draw circuits, and I am trying to draw a good looking BJT biasing circuit. But I am having making the resistors across from each other look even, and since ...
10
votes
2answers
147 views

Plot 3D stacked squares with shadow

This is an image I draw with tools. But I need to draw it with Tikz. And The 3 squares in the middle, I need to make them looks like 3D stacked with shadow. And the fonts on it, like 'a1', 'a2', ... ...
34
votes
6answers
996 views

Drawing Hex Boards

I need to draw a Hex board. I would like to be able to mark each hexagon and mark the size. Being able to control the thickness of the lines would be nice, but it is not something I need to have. ...
3
votes
2answers
215 views

Curved cylinders in Tikz

I would like to draw this figure here using tikz. However I do not know how to draw curved cylinders in Tikz. Can someone give a hint with it? Thanks
1
vote
2answers
55 views

Making a probability tree using tikzpicture / forest

I want to create a probability tree using either tikzpicture or forest. I have experimented a little bit with both, but I'm running into some trouble with both of the programs. First, I have my code ...
5
votes
3answers
116 views

Marking a grid with x and other symbols in tikz

I am new to using tikz. I have the following grid: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{patterns} \usetikzlibrary{shapes} ...
3
votes
0answers
51 views

Is there an easy way to generate weighted vertices in graphs?

There are several ways to include edge weights in graphs, but what about node/vertex weights? I need each vertex to be labelled with a letter and weighted with a number; I cannot find code that does ...
5
votes
1answer
46 views

How label position and color can be modified in tikzpicture in posters?

I am working on a poster with fancytikzposter package, I cutted out the problematic part, it can be downloaded from here. I created a tikzpicture inside the poster and some problems occured: ...
9
votes
1answer
187 views

Is it possible to cut a tikzpicture in half if the picture is too long and display it on two pages?

I'm using tikz (tikzpicture to be precise) to make some "drawings" (trees). The problem is that my "drawing" is too long to fit on one single page (it's too long). I was wondering what was the best ...
1
vote
3answers
106 views

Fill and draw option

Is there a single option to set both the draw and the fill color of a TikZ node? Something like: \node[rectangle,drawandfill=red]{test}; The actual problem is the following: I have many adiacent ...
21
votes
4answers
646 views

Crop jpeg into circular tikz node

\documentclass[demo]{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw,inner sep=2cm]{\includegraphics{myimage.jpg}}; \end{tikzpicture} ...
7
votes
2answers
235 views

Why is beamer+pstricks+preview no longer compatible now?

The following code is taken from Gonzalo Medina' answer here (click). At the time he posted the answer the code was compilable. \documentclass{beamer} \usepackage{pstricks-add} ...
3
votes
1answer
95 views

tikz ovelapping bars

The following code \documentclass[12pt,a4paper,onecolumn, openright]{report} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture} ...
7
votes
2answers
223 views

Trees with only leaves in TikZ

Following Roel's answer to How to write a tree with no (visible) root with TikZ? I attempted to visualise my Huffman-Code for "Tennessee", but it didn't turn out as I expected: My MWE: ...
2
votes
1answer
51 views

Drawing Graph of Markov Chain with “Patches” using Tikz

First time using Tikz. Haven't found any documentation on drawing graphs like these, so I have been reading other examples and trying to modify their code to fit my example. I am trying to reproduce ...
1
vote
2answers
127 views

sketching semicirles and horizontal lines

I want to sketch this parallel lines and semicircles between them sth like the attached figure... would you plz help me?
11
votes
3answers
199 views

How to improve on this “twolines” decoration?

I'm typesetting an article on graphical calculus in tensor categories in TikZ and I wanted to define a decoration that draws two parallel lines at the same time. Here is my first try: ...
5
votes
1answer
67 views

How to fix this problem with tikz knots and decorations?

Using the knots package, which is part of Andrew Stacey's spath3, one can draw beautiful paths that cross each other. However, there are problems when combining it with decorations: ...
8
votes
2answers
176 views

Tikz, decorations

I use tikz as a general purpose drawing package because of its flexibility etc... I need to draw some Feynman diagrams like these: I tried to draw arc like \begin{tikzpicture} \draw [decorate, ...
4
votes
1answer
783 views

Linebreak in ticks-labels

I'm using \symbolic y coords in a xbar-plot. Some of these coords are very long. There is a solution using nodes which is very ... hardcoded. And it would be nice to have it automated. How do I ...
11
votes
1answer
905 views

Automatic background coloring in listings using tikzmark

I am authoring Beamer presentations that feature numerous code listings, and I am required to highlight portions of code with semi-transparent balloons. Yet I've come up with a solution that uses a ...
3
votes
0answers
59 views

Node at tip/pinch of brace in Tikz

I'm trying to add some explanatory braces in my graphic, and find myself running into some minor difficulties/inconveniences. [Edit]: After being made aware that the main thrust of the question ...
1
vote
1answer
61 views

Drawing a brush stroke like outline

I'm trying to reproduce the following picture with TikZ: Which is basically a circle with a variable width outline (the red line in the pic) that looks like a brush stroke. Can someone kindly give ...
2
votes
1answer
97 views

Draw graphical model with many nodes

So I tried to follow the answer in http://stats.stackexchange.com/questions/16750/software-for-drawing-bayesian-networks-graphical-models with limited success. My problem is How do I incorporate ...
8
votes
1answer
183 views

Pascal's triangle in Tikz with symbols

I have a follow-up question to Pascal's triangle in tikz with row headers. Is it possible to produce Mark's solution with symbols in Pascal's triangle? So, I could create the same figure, but ...
2
votes
0answers
45 views

beamer: make a picture stay in the foreground

I am trying to write some style file for a poster framework, we can use. The header is almost ready: \setbeamertemplate{headline} { \begin{beamercolorbox}[ht=15cm]{headline} ...
6
votes
1answer
71 views

Arrow from brace to node

I would like to draw an arrow from the tip of a curly bracket to a node, but if I do the following, an extra arrow point is drawn just above the tip of the brace. \documentclass{article} ...
12
votes
1answer
2k views

Stacked barplots/groupplots with text labels in x-coordinate

I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: The ybar stacked option works quite nice here. But when I try to adapt it to a ...