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
1answer
19 views

Aligning edge labels horizontally with tikz package

I have the following figure: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} ...
0
votes
0answers
17 views

Commutative Diagram Packages

I define of \usepackage{tikz} \usetikzlibrary{matrix,arrows,decorations.pathmorphing} but again error "Environment tickzcd undefined".
1
vote
2answers
52 views

Plotting Floating point number when changes are very small in data

I want to plot the following data, i am using the CSV file, and pgfplotstable package. (0,2.42130785530195E-02), (113.8,2.42130785530195E-02), (227.6,2.42130781357695E-02), ...
0
votes
0answers
28 views

Adding a rectangular overlay with tikz to table

Dear All, I would like to sequentially add rectangular boxes to my table to highlight some rows of my table. I'm trying to use tikz, however, I have troubles in the integration of tikzpicture ...
1
vote
1answer
24 views

Naming Externalized Images via MD5 Sum

I have a large presentation with over 200 figures (mainly created through stepping through each image). I'm using the external library to cache the results to great effect. Each figure is cached in ...
2
votes
3answers
201 views

Using loops with chains?

Is there a smarter way to achieve the same result as the one from the following MWE: 1) by using some kind of loop instead of hand typing every node, 2) by drawing the arrows with tikz instead of ...
2
votes
0answers
43 views

Tikz axis border on top, grids below

Is there an easy way to place the border box of a tikz graph on top, while keeping the grid lines behind data lines? \begin{axis}[axis on top] The above puts the border, x grid lines, and y grid ...
1
vote
2answers
35 views

Remove clk signal from wave environment

How do I remove the clk signal in the wave environment? I still want to keep alle the help lines (i.e. the t0, t1, etc.) Here's the code: \documentclass[11pt]{minimal} \usepackage{tikz} ...
3
votes
1answer
44 views

Centering group plot figure

Can anyone show me how to center this group plot? I've tried every trick in the tex.stackexchange book of similar posts (e.g., How to center large figures in LaTeX and how to fix short justified ...
1
vote
1answer
107 views

How to draw some targets like this?

I would like to show some stimators properties in statistics. I'm very beginner in LaTeX, so I need some help.
4
votes
3answers
138 views

Shading inside a triangle when the coordinates of one vertex are calculated by TikZ

The following code instructs TikZ to draw a right triangle and to put a grid on the Cartesian plane. I would like to make two modifications to it. I want the inside of the triangle to be "colored" ...
0
votes
0answers
60 views

Simple beam deflection tikz

I'm beginner user of Tikz, so can somebody help me to draw this? I would be very thankful.
0
votes
0answers
36 views

Error by creating normal distribution in tikz

Hello I wanna create a Normal distributed figure. with sigma = 10 and mu =185; I have the following code based on Bi-variate Normal distribution \usepackage{tikz} \usepackage{pgfplots} ...
0
votes
0answers
29 views

TikZ and other figures in documents meant for multiple paper sizes

Sometimes scientific papers are sent to multiple journals with very varying paper sizes. Usually, changing from one to another, I simply cross my fingers that TikZ figures still fit, and rescale PDF ...
1
vote
0answers
32 views

\pic: undefined control sequence

I am using Texmaker on Macbook but I have a problem with my code. When I run my code it always shows this message: "undefined control sequence \pic". \documentclass{article} \usepackage{tikz} ...
3
votes
2answers
54 views

Placing nodes which vary in length harmoniously

The code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[font=\footnotesize, very thick] \def\r{3} \foreach \a/\n in {-2/{p-2}, -1/{p-1}, 0/0, 1/1, 2/2, 3/3, 4/4} ...
3
votes
2answers
110 views

plotting a function with smooth curves

I am trying to plot the following function The issue is I do not know what is the best setting for the coordinates. I tried different coordinates with no success. Here is my code: ...
0
votes
0answers
24 views

tikz/pgf upgrade and decorations

Since a major upgrade in pgf, my code does not compile any more. I am trying to make "decorated" source listing, where the decorations can be like highlighting some lines (see the MWE), balls on some ...
1
vote
1answer
71 views

Simple TikZ Diagram - curved line with multiple controls

I am trying to draw the following diagram in TikZ: I have written the following code but I am not sure how to do the two curved lines for P1 and P3: \documentclass[11pt,a4paper]{report} ...
3
votes
1answer
61 views

Drawing Sinusoids with Phase difference

My first goal was to draw sinusoid plots similar whit these images: This is what I've done (similar to one code in this forum): What I'd like to know is (if possible) how to change integral ...
4
votes
3answers
62 views

TikZ: Get Position/Node of an Arrow Head

Following LaTeX code produces a small image with directions. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{quotes,angles} \begin{document} \begin{tikzpicture}[thick] % X',Y',Z' in ...
3
votes
1answer
70 views

Tikz functions and coordinate system: Adding points and labels

I managed to adjust some of the existing code a little bit to fit my needs. I can plot simple functions. (1) I want to add labels to the coordinate system, for example e (~ 2.71) to the x-axes and ...
1
vote
1answer
38 views

how do I create a border, non-rectangular, surrounding a nodes in tikz?

I have the following MWE. I would like to draw a border without including the $y_3$ (or s3 in the .tex file) -- so it would be a rectangle with its left upper corner changed so that it bypasses s3. ...
1
vote
0answers
21 views

Use pi in x labels with pgfplots [duplicate]

With \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[samples=10, domain=0:pi] \addplot {x-sin(x)}; \end{axis} \end{tikzpicture} \end{document} ...
3
votes
1answer
42 views

Making curved path appear parallel in relation to a TikZ node

I have a diagram which looks like this: I have horizontally aligned nodes b and c with regards to their centers, but this causes an issue with the curved path z due to the fact it is no longer ...
2
votes
0answers
24 views

Legend image arguments for the command `\addlegendimage`, 3d legend image

In the 3d plot I want to modify the third legend entry to only show the marks and not the line. From http://tex.stackexchange.com/a/113765/28093 I understood that I'm supposed to use something ...
10
votes
3answers
183 views

Accuracy of calculations in TikZ with fixed point arithmetic

I want to build a tree which satisfies the following: It grows to the right. The first child grows at 0 degrees (subsequent children growing clockwise). All children nodes are in the same ...
5
votes
1answer
107 views

TikZ/pgfplots: how can I generate a figure like this one?

What's the easiest way to produce a figure like this one? The curve is meant to look wiggly and random, and always non-increasing, except for the jumps up. I have tried using decorations with random ...
1
vote
0answers
127 views

Twilight Zelda Guardian Puzzle : TIKZ Graph

I've asked another question over at math.stackexchange.com (see here) and I feel that I will want to make a TIKZ node grid of the problem so I can display the answer connected with arrows. I'm using ...
0
votes
0answers
56 views

Animation using Tikz in Latex beamer

I need help to animate the following frame transformations using Tikz in a beamer presentation Initially there is a Cartesian frame S-{x_A y_A z_A} This frame should move backwards along negative ...
2
votes
0answers
28 views

Add a row and a column to tikz matrix with a different style [duplicate]

I should add a header row: 1 2 3 4 to a matrix and a column (as before: 1 2 3 4 ) on the left of the same matrix. But the style should be different like below: this is my MWE: ...
1
vote
1answer
32 views

tikz matrix alignment slightly off

I know there have been many posts with similar titles, but somehow I couldn't find anything that seemed related. Here is a MWE, where I would expect all rows to have an even distance. But obviously ...
3
votes
1answer
51 views

Putting text at bottom of ellipse in a tikz picture

I have the following code: \documentclass[journal]{IEEEtran} \usepackage{tikz} \usetikzlibrary{shapes,backgrounds} \begin{figure}[ht] \begin{tikzpicture} \node[rounded corners, draw, fill=gray!20 ...
3
votes
2answers
75 views

Adding arrows to rectangles in TikZ

Is it possible to decorate rectangles with arrows? I used: \node [draw,rectangle,minimum width=4cm,minimum height=4cm](r){}; But then it is really difficult to line up an edge so that it's level ...
3
votes
1answer
36 views

Minted caching in tikz externalize job

Enabled caching options for minted and tikz lead to unexpected and inefficient caching. For every tikz figure that is externalized, all minted code blocks of the main document are cached within the ...
3
votes
1answer
35 views

Why are my symbolic x coordinate labels printed twice in a tikz plot?

I'm trying to plot a bar graph, using symbolic x coordinates. For some reason, the name of some symbolic coordinates appears under the x axis more than once. If I increase the width (e.g. 12cm) ...
1
vote
1answer
48 views

Get node text inside filled region in tikz

I have made this figure from this code: \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[domain=-90:200, x=0.025cm, y=0.15cm] \draw[->,very ...
0
votes
1answer
50 views

Formatting node and edge labels in TikZ

In TikZ, how to format node and edge label (node and edge weight)? For example, how to make the edge weight in bold?
5
votes
1answer
57 views

How does the stripcommand in the pgfmanual file work?

I am trying to understand how commands are typeset for use in LaTeX documentation. To clarify, not using LaTeX to create documentation, rather to write documentation in LaTeX about using LaTeX (like ...
0
votes
0answers
31 views

Sierpinski triangle tikz [duplicate]

How would I draw Sierpinski triangle using tikz? Basically the first 3 stages as in this picture: All of the images on line the graphics aren't very smooth which I don't like.
2
votes
1answer
57 views

Tikz Polar Fill to Origin

I'm trying to shade under a polar graph. I'm using this code: \documentclass{exam} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \fill[fill=gray] ...
10
votes
4answers
479 views

How can I draw this circle with different colour?

I am trying to draw the following picture but I have some difficulties. I code the following: \documentclass{article} \usepackage{xcolor,pict2e}% to allow any radius \usepackage{tikz} ...
1
vote
1answer
37 views

Exporting stacked bars using matlab2tikz in MATLAB working strangely

I have created a stacked bars in matlab as shown in the figure. In matlab figure window it looks like this: I use the following command to get this plot. plotBarStackGroups(rand(5,3,3), [1:3]) ...
5
votes
2answers
69 views

Defining node inside curly braces

I am trying to define a node inside a curly braces {}: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \Tree [.CP \node(y){here}; [.C$'$ C ...
5
votes
4answers
132 views

Drawing a line segment of a specific length that is perpendicular to a given line

I have a typical geometric construction that I want to draw using TikZ. The following code gives a line segment PQ. How do I get TikZ to draw a point on the line perpendicular to PQ and through P ...
8
votes
1answer
96 views

TikZ decoration to draw a winding or twisting ribbon

I enjoy TikZ styles and decorations a lot, but I still dabble with them. I know how to draw ribbons with a style, if they aren't meant to twist. But I'd like to define a style that has a twist of the ...
0
votes
1answer
82 views

Draw picture of electric transformer

I would like to draw an electric transformer close to this image Ideally there would be more spires on one side than the other I had learned to do some tree decision with Tikz, so I can do two ...
6
votes
1answer
120 views

Draw between shapes in Tikz

I'm trying to draw lines from the center circle (General Assembly) to the Economic and Social Council and International Criminal Court circles such that the angle of incidence for the line on all ...
5
votes
1answer
36 views

Putting the endpoints of a line segment “over” the line segment

The display that TikZ gives for the following code is a line segment with endpoints. The line segment is drawn over the endpoints. How do I put the endpoints over the line segment? ...
6
votes
1answer
83 views

Labeling a point using TikZ

In the following code, I want to label the point (1,1) as "P." (It is not exciting, I know. It is part of a graph that I want to draw.) I have the code \node[above right, outer sep=2pt] (1,1) {P}; ...