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
14 views

Drawing a series of graphs receding into the page; TikZ

I want to draw a panel of graphs of citation networks receding into the page, as the below sketch demonstrates. In the below sketch, each blue rectangle represents a citation network at a different ...
0
votes
0answers
13 views

TikZ \tkzFctPar are blank under Ubuntu

But under sharelatex they just worked fine (I might have modified some thinghs though). The code: \begin{tikzpicture}[x=2.5cm,y=2.5cm] \tkzInit[xmin=-1.5,xmax=1.5,ymax=1.5,ymin=-1.5] \tkzGrid ...
3
votes
1answer
227 views

TikZ: Arrowhead color defined by an option for another command

I was studying the PGF manual when I faced the following behaviour. Referring to the code below, I specified a latex arrowhead after the \filldraw element and the arrowhead is drawn of the same ...
3
votes
2answers
51 views

Coloring a node after its creation

I want to fill a node with a specific color, but not with the usual [fill=blue] way. The reason is, that I am creating many many nodes and I want to fill some random nodes with a different color from ...
5
votes
4answers
309 views

How to draw infinite earring with TikZ?

I want to draw an infinite earring, i.e., each circle centerd at $(\frac{1}{n},0)$ with radius $\frac{1}{n}$ for each $n\in \mathbf{N}$. The figure will be the following: I have used the ...
53
votes
8answers
2k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
5
votes
1answer
187 views

How to color vertices in a TikZ graph?

Consider the following code to draw a graph using TikZ: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs,graphs.standard} \begin{document} \begin{tikzpicture} \graph ...
6
votes
3answers
284 views

Draw octagon with color node at middle edges

I would like to draw three pictures in TikZ but I don't know how to do it.
4
votes
1answer
40 views

how to add labels to arrows avoiding conflicts with existing node shapes

Ok, I've made the following diagram: I want to add text labels to the various arrows (at the red points) and I want to ensure that the labels do not overlap the dotted lines, the arrow lines etc. ...
1
vote
1answer
39 views

Making Curly Braces with Tikz

How can I make the curly braces on TikZ to label the x and y as in this picture?
0
votes
0answers
32 views

Tikz scientific notation vs. decimal number on x and y axis

I found an interesting potential glitch in tikzpicture in that the arbitrary placement of scaled ticks = false, tick label style ={/pgf/number format/fixed} within the \begin{axis}[] makes a real ...
1
vote
0answers
28 views

Posters with TiKZ and LaTeX: is scaling the right tool?

I have a small (11'' * 17'') poster that I made using textblock and tikz. I want to enlarge it to 18'' * 24''---i.e., enlarge the print and graphics accordingly, not just change the paper size. Is ...
3
votes
1answer
66 views

Is it possible to add node labels to some matrix column or row when building it?

I want this: which is done with \documentclass[border=2mm,tikz]{standalone} \usetikzlibrary{matrix} \begin{tikzpicture}[ mygridmatrix/.style={matrix of nodes, row sep=-\pgflinewidth, ...
4
votes
1answer
60 views

Problem with `in` (to path) angle when negative scale factor are applied

Trying to convert a coment into a complete answer for How do determine the arrow form in Tikz I think that my solution there worked by chance and that MWijnand found a wrong behavior in to path ...
4
votes
1answer
51 views

Flowchart Tikzpicture - Draw arrow from path

I am creating a flowchart using the tikzpicture package. Because I am short on space, I would like to draw an arrow from a path to a box. Using this code below, I would like to have an arrow that ...
3
votes
1answer
29 views

TikZ won't support HSB color model hsb in article document class

I'm trying to use the wave color model in a tikz picture using the document class article. When I do, I get the error message "Unsupported color model 'hsb'". Consider the code below. ...
5
votes
4answers
592 views

Creating a rainbow color macro

I'm trying to draw a picture in tikz whose code is generated by another computer program. The program outputs hundreds of numbers in between 0 and 100, and I'd like to color objects in the picture on ...
4
votes
1answer
49 views

Margins and positioning with tikz-dependency

I am using gb4e and tikz-dependency simultaneously to demonstrate dependency examples with my glossed sentences. But if my example sentence is too long, it doesn't get split across lines and just goes ...
4
votes
1answer
64 views

TikZ wrong node placement on curve

I use TikZ to draw a Bézier curve and place 4 circles (nodes) on that curve using pos=0.25 etc. (see MWE below). The curve has an arrow at the end. I would like to use >=latex to get LaTeX-style ...
1
vote
0answers
26 views

How to install TikZ and PGF on OzTex 6?

I am trying to install the TikZ and PGF Packages on OzTex 6. so to be able do draw complex trees. Once downloaded I put them respectively in OzTex-6/Tex/Inputs/LaTex/tikz-qtree and ...
6
votes
2answers
175 views

How do I fix this error with my arrows

I am using tikz to generate sine and cosine graphs with arrows at the ends of each curve. The arrows appear fine for the sine curve, but not so for the cosine curve. Why does this occur and how do I ...
4
votes
2answers
119 views

High degree polynomial plotting with Tikz/pgfplot

I am new to tikz/pgfplots...so sorry if my question has been asked... I am trying to plot the tanh function using pgplots, then add a set of N points and plot the (n-1) degree polynomial passing ...
0
votes
3answers
73 views

Plot y=x^(-0.5)

How can I plot y=x^(-0.5)? \documentclass[border=2pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[->] (0,0) -- (6.2,0) node[right] {$Q$}; ...
0
votes
1answer
67 views

Problem when drawing curly braces

I have to draw two similar graphs, both including curly braces. I am using the decorations.pathreplacing library. When I only graph any of them separately, it works. When I want to graph both graphs ...
4
votes
1answer
58 views

tikz matrix as legend does not work with trim axis

I am using the tikz-library matrix to create a legend for a plot with two y-axes. When I add "trim axis right" to the code the legend is stretched to the right. How can I prevent this? ...
4
votes
2answers
50 views

Help with non-conventional electrical circuits

I am trying to draw two different circuits for several days and just can't get all the parts together. I tried different packages like TikZ and circuitikz but not sure which one is the best for these ...
3
votes
2answers
571 views

Wrong TikZ filepaths when included used input

I'm using TikZ for my thesis but have run into a small problem. In order to maintain some overview of the main tex file I have split all images into separate TikZ files (This also allows me to edit ...
4
votes
1answer
60 views

Clean code in drawing with boxes and circles and lines not connected

I want to optimize the following code: \documentclass{article} %\pagestyle{empty} % Figure dimensions \newcommand{\defLength}[2]{\newlength{#1}\setlength{#1}{#2}} ...
0
votes
0answers
41 views

TikZ adding captions to tree diagrams

I am adding several tree diagrams to my latex document, nad I want to add captions to the trees to explain what they are. Is there an easy way to do this with tikZ, or do I have to use something else ...
5
votes
1answer
49 views

Consistency in the appearances of loops from rectangular nodes

I would like to have a left-positioned loop "look the same" as a below-positioned loop emanating from a rectangular node. \documentclass{article} \usepackage{tikz} \tikzstyle{rect} = [rectangle, ...
24
votes
1answer
10k views

Comprehensive list of TikZ style options?

I'm aware that one can use \tikzstyle{every label}=[...] to apply styles to every label within a tikzpicture; or \tikzset{mystyle/.style={...}} to apply style specs to a specific type of node mystyle ...
7
votes
1answer
68 views

Zooming on one of multiple images in a slide using Tikzpicture

I would like to zoom in on one of the 12 images that I have organized in 3 columns. There are 4 images per column, all the same height and width. There is one image that I would like to zoom in on ...
9
votes
0answers
75 views

Truncated cube with numerated faces

I am having difficulties to project texts in inclined planes. To be more precise, i would like do latex the following question. Exercise: In the following figure, we see two different views of a ...
2
votes
0answers
48 views

Comparison of the plots of the same line on the Cartesian plane using pgfplots and TikZ

I have the plot of a line using pgfplots and the plot of the same line using TikZ. I would like them to be identical. I need to correct a mistake in the plot of a line using pgfplots. The point ...
4
votes
1answer
63 views

Doing something like psframebox in tikz

I used the following code to typeset the figure below with pstricks. Is there something like this that works with tikz? I tried to do this and discovered \nodes that can be filled with text, but I ...
7
votes
1answer
63 views

Creating a smooth gradient between two colors on an edge in TikZ

I'd like to have a two-colored edge between two nodes of different colors. I'm hoping to make the edge fade from one color into the other in an even way. The solution I've found so far is a bit ...
39
votes
6answers
15k views

Draw arc in tikz when center of circle is specified

It would be convenient sometimes to be able to draw an arc in tikz by specifying the center of the corresponding circle its radius the initial/final angle i.e., the "natural" way an arc is ...
14
votes
5answers
858 views

Drawing circles with TikZ

I am using the TikZ package to show a set of complex numbers where those I want are in the outer part of a circle with a radius 2, and where the circle with radius 1 is not in the set: I want to let ...
3
votes
0answers
33 views

Modify font for all text in tikzpicture

I created a newcommand like this: \newcommand{\txtDBC}[1]{\contour{white}{#1}} and I want to apply it on all text and math formula in a tikzpicture. The first was to declare a specific font using ...
4
votes
1answer
67 views

How to change the paper color(background color) in tikz class

How to change the paper color(background color) in tikz class kindly help me to change color \documentclass{scrartcl} \usepackage[usenames,x11names,dvipsnames,svgnames]{xcolor} ...
2
votes
1answer
45 views

Conditionally change node background color inside foreach

I generate 8 rectangle nodes using a \foreach loop but I would like one of them (the one at the position index) to have a gray background. How can I do that ? I would like to avoid repeating the ...
1
vote
1answer
32 views

Text alignment and form of connectors (edges) in tikz tree

I'm completely new to tikz and try to draw a tree structure. I have tried different options, but could not modify it as I wanted it to look like. It currently looks like that: Tikz code ...
2
votes
0answers
36 views

How can I readjust TikZ's dimension variables to fit mid-document dimension change?

Question How can I readjust TikZ's dimension variables to fit a mid-document dimension change as in this example and using the TikZ drawing from here. Problem TikZ coordinates are not where they ...
9
votes
1answer
65 views

Inserting a orgin tangential to a sphere

I am trying to draw a picture like the one attached. I have not used much of the tikz package. My code so far is a follows. I what to include a set of angles in the image. Any help would be great and ...
2
votes
1answer
54 views

Tikz 3d trimetric view coordinate calculation bug

I'm trying to draw a line in the x-y-plane and circles in the y-z-plane at constant x position. Problem is, that the circle is far out of position (x-coordinate of center point of the circle is ...
7
votes
2answers
116 views

How to perform not rectangular fit with tikz?

In the following tikz MWE I am using the fit library to draw a red box: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture} \node ...
4
votes
2answers
83 views

Problems to set ytick within colorbar using TikZ/PGFPlots, no axis

I want to do an colorbar in TikZ without any axis beside. This is what I got so far by using the help provided by this excellent forum. My problem: I want to have the y-tick as follows: -2e-3, ...
1
vote
1answer
88 views

Gradient to transparent (horizontal) for beamer frametitle

I would like my frametitle bg to fade horizontally to a background image. I have attempted to modify the solution for vertical gradients found here: Beamer theme with fading (=gradient to ...
1
vote
2answers
59 views

How to set opacity/transparency to vector image?

Hold your horses!. If you are hurrying to flag this as a duplicate of this question or this question none of those have an answer to what is asked here. Thanks for the attention though. I ...
6
votes
1answer
43 views

Problem with Tikz arrowhead definitions

When you specify double, Tikz first draws a line whose width is twice the line width plus the double distance, then draws a white line down the center whose width is the double distance. But the ...