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)

3
votes
2answers
976 views

How can I fill the ring like this picture?

I want to fill a ring like this picture With Geogebra, I tried it by plot 4<=x^2+y^2<=9and this is the code in Geogebra \documentclass[12pt]{standalone} \usepackage{pgf,tikz} \usetikzlibrary{...
18
votes
2answers
915 views

Insulation hatch

In civil engineering insulation hatch looks like this: I did all the math to re-create such hatch and I attach MWE below. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{...
4
votes
1answer
1k views

How can I get the TikZ calc library to calculate some point coordinates correctly?

I have used the code shown below to draw a static CMOS inverter. I have tried to use the TikZ library calc to calculate the point at which drains of the PMOS and the NMOS devices meet; and the mid-...
6
votes
1answer
248 views

How draw from an intersection down to x axes?

Based on How to draw in pgfplot until intersection with plot line? I have come up with this: \documentclass{memoir} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{intersections, calc} \...
5
votes
1answer
563 views

How to draw in pgfplot until intersection with plot line?

I am trying to draw an arrow from the left side of my diagram and until it intersects with the plot. However I get this error message: ! Package pgf Error: No shape named intersection-1 is known. ...
6
votes
1answer
115 views

TikZ - Compute the array being the min of 2 arrays

I define 2 arrays r and p and draw them. I would like now to compute the min of r and p in order to draw it in a similar way. The resulting array would be {0.2, 0.4, 0.8, 0.8, 0.4, 0.0, 0.1, 0.0, 0.1 ...
4
votes
1answer
191 views

Beamer uncover decoration bug

\documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{pgf,tikz} \usepackage{tikz} \begin{document} \frame{ \usetikzlibrary{decorations.pathmorphing} \tikzstyle{kringel}=[decoration={random ...
3
votes
3answers
2k views

Tikz Node with rounded corners

I refer to this question: LaTeX Photo With Rounded Corners I would like to round the corners of a Tikz node (which actually is a fitted node around two other nodes), but would like to have an ...
2
votes
1answer
226 views

Tikz pattern areas become black when printing

I'm afraid this question has been asked before, but I couldn't find it. When I have an element in a tikzpicture environment that has a hatched filling, the filling becomes black when printing. ...
2
votes
1answer
375 views

rotation problem text in arrow tikz

I'm trying to make a graphic that needs two arrows, I've already found how to rotate the arrow, but I don't want the text to be rotated 180 degrees. Bonusproblem, I want the red line ticker ... \...
1
vote
1answer
172 views

Drawing a single line of cache memory

I'm trying to draw what a single address line of cache memory would look like. I want to draw just one line of the diagram (one index): How would I generate this using TikZ?
4
votes
1answer
875 views

\draw not working inside axis environment

Judging from the pgfplots manual I expected the following code to work: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure} \begin{tikzpicture} \begin{axis}[ ...
2
votes
0answers
55 views

Verbatim and Bacground&TikZ compatibility problems

If to compile below MWE, you'll get next error: According the error message, the problem is tikz and calc library package, which looks like links with background package. Also, you will not find ...
3
votes
1answer
638 views

tikz arc with arrow

I am drawing the coordinate system using tikz and I intended to use arrow for the arcs \phi and \theta. But when I use -> in the arc options (resulting a proper arc), inside the graph remains an ...
-1
votes
1answer
95 views

I need help to build a tikzpicture of the covering of S^1

I want to make a picture the looks like the picture in this video, if you pause it at 42 seconds. https://www.youtube.com/watch?v=vP7NAeeKjrw If anyone could help, I would really appreciate it! ...
4
votes
2answers
148 views

xtick/ytick and \draw not agreeing on the scale used

I would like to draw an ellipsis with x radius 2 and y radius 1, inside a tikzpicture with a pgfplot. This is my attempt: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{...
12
votes
4answers
696 views

phases (stages) of economic cycle

I would like to make the following figure: My already code is: \documentclass{standalone} \usepackage[english, greek]{babel} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage[usenames,...
4
votes
0answers
201 views

tikz stops drawing into pdf after 20 line segments in plot generated through knitr tikzDevice

Problem If I try to draw a curve generated through knitr using tikzDevice into .pdf only 20 line segments of that curve are drawn and TeXstudio, through which I do it, just leaves message running ...
2
votes
1answer
173 views

Tikz node command changes (0,0) position?

I am trying to preapare a poster with a0poster. I wrote: \noindent\begin{tikzpicture} \fill[DarkOrange,rounded corners=20pt] (0,0.5) rectangle (\linewidth,5); % \node (myfirstpic) at (0,0) {\...
2
votes
1answer
356 views

beamer: How to get tikz spy overlay on top of the other content of a frame

The problem is as follows: On a slide, I have several figures. I would like to zoom into whole figures or parts of them susequently. I tried to do so using tikz spy library with the spy using overlays-...
3
votes
1answer
78 views

Expansion for Macro to pass to scaleBox

I am trying to calculate some width in a macro and use the macro for scalebox. However I get a flood of errors when I try to pass the macro to scalebox. MinimalExample: \documentclass{article} \...
4
votes
2answers
182 views

How to draw a single commutative diagram with double-ended arrow?

I would like to draw a very single commutative diagram, I look for some basic examples to modify but did not found one that uses an arrow towards the left and the right (<--->): , if I write \...
3
votes
1answer
313 views

Pyramid Commutative Diagram for Cones

In the second edition of Awodey's Category Theory he suggests visualizing a cone as a many sided pyramid. I'd much like to make the proper commutative diagrams, but I don't know how to make a many ...
3
votes
1answer
549 views

Tikz circuit - Coordinates of terminals of components

I am drawing a schematic and I would like to specify the particular coordinates of terminals of the components. For instance, in my drawing (source below), I would like the 'X' dot to be at the same ...
14
votes
3answers
2k views

How to bend a curve above text with TikZ?

I want to connect two "positions" of text with an upwards curved arrow. So far I have done this (trivially following the TikZ manual): \documentclass[a4paper,12pt]{book} \usepackage{tikz} \...
18
votes
2answers
690 views

How to make a longitudinal sine wave shading with pgfplots?

At the moment I use TikZ shadings to show up longitudinal waves in my document like this: The shading is white where the sine is –1 and blue where the sine equals 1. This looks ok, but ...
3
votes
1answer
329 views

Position tikzpictures side by side

I have the following tikzpictures, and I would like to present them in two columns. However, no matter what I try, whether it be multicol or minipage or subcaption, they stubbornly stay in one column. ...
3
votes
1answer
208 views

TikZ framebox (simple box + text inside)

I am beginning with TikZ. How to do the simplest square of defined position, width&height, eventually color with text inside please ? I used before the command framebox, but I don't have the same ...
5
votes
1answer
494 views

PGFplots: Can I do vector addition/substraction?

I'd like, in the following MWE, to draw a vector from P to P+v and to P-v for some given point P and directional vector v in the axis coordinate system of a pgfplot. Can it be done? \documentclass{...
6
votes
2answers
149 views

Incomplete path fading “gradient range” in short pathes

I would like to draw a (very thick) line that is faded on one end. My idea was to draw the line, extend it, and apply path fading only to the extended part. For short extensions the fading seems not ...
3
votes
1answer
244 views

TikZ and tikzorbital: problem with background

It looks like tikzorbital package is not compatible with background library of basic TikZ. As you see in the picture below, just p_y displayed (do not pay attention to notations in MWE). It displays ...
2
votes
1answer
193 views

Opinions: Circuit_macros or circuitikz ? what is better? [closed]

I'd gladly read your opinions on Circuit_macros pros and cons, as well as yours on circuitikz. Gives the macro more variables to play with? Is the circuitikz language easier? Macro use seems far more ...
4
votes
2answers
256 views

Is there an easy way to have node border anchors centered on the borders?

I would like to place nodes with given distances relative to each other. For consistence with other drawings these distances have to be very accurate. Node border anchors are placed at the outer ...
1
vote
1answer
289 views

auto adjust node position in a binary tree

I'm trying to draw a binary tree using tikz. I use shift option to define the relative position of child nodes. But as the tree grows, the nodes start to overlap if I use a fixed shift. I'm able to ...
7
votes
1answer
425 views

PGFPlots only have one 0 at the origin

When I create a figure using tikzpicture, tikz adds two 0's at the origin for a plot (one for the x-axis and another for the y-axis). I think it looks cleaner to only have one zero at the origin. I ...
4
votes
0answers
220 views

How to draw the vectors from point to point

I have the file "gradmethod.dat" that contains the values ​​of the 3D coordinates: "gradmethod.dat" is 0.4166337995 -0.0003214561 0.1735863062 0.0036860331 0.0076438475 0.0014742969 0....
7
votes
3answers
545 views

Single arrow node with fixed, text-independent dimensions

I would like to have several single arrow nodes all with the same dimensions (independent of the node text). I tried to achieve this by setting minimum width, minimum height, inner sep, and single ...
1
vote
1answer
139 views

Chapter Title in box at the margin with different rounded corners

The title combines two discussion threads on this board. Chapter Title in rotated vertical box at the margin TikZ rectangular node with different rounded corners I have adapted the first solution ...
4
votes
2answers
367 views

Tikz: Proper Alignment of Nodes and Text in this diagram

I want to refine the following diagram. I want to left allign the text showing on the left of this diagram and need straight paths. Any help will be highly appreciated. Thanks \documentclass[tikz]{...
0
votes
1answer
355 views

smooth curved arrow in flowchart

I am new to latex with a very little idea in tikzpicture or pgfplots, so you know what would happen... Please help me with the following flowchart-type diagram. Here the cartesian plot is a regular X ...
2
votes
1answer
83 views

Revert to scale=1

I often write procedures that I call from my main draw procedure. I would like my procedures be independent of the scale of the tikz picture from which it was called. In example below I would like ...
1
vote
1answer
177 views

How do I add a “less than” symbol in the flowchart?

This is the edge drawing command using the tikz package. I want to display, Blinks < 3 in the line. \path [line] (L) -- node {Blinks 3}(N); Thanks!
5
votes
2answers
232 views

Strange behaviour with pstricks/TikZ/center

I'm working on a long document (written by someone else). The author has used a lot of pstricks pictures, and I'd like to compile the document using pdflatex (without doing the detour over dvi). The ...
7
votes
1answer
598 views

Lualatex capacity exceeded with Gb's of free RAM

I'm trying to compile dense graphs generated my matlab2tikz (file size ~ 50Mb). I'm running lualatex and externalising with lualatex \tikzset{external/system call={lualatex \...
6
votes
1answer
417 views

TikZ zero-width line with dashed line

When drawing a dashed line, it seems that TikZ inserts a zero-width line that is visible on some (e.g., Acrobat, Sumatra) but not all (e.g., Evince, Chromium browser) PDF viewers. From the PDF 1.7 ...
1
vote
1answer
117 views

Background package - \NoBgThispage different output

This question related with my oter two questions: Replacing \fancyhdr with \titlesec in complicated design documents White fields in ltjsarticle class The design, which has been reached in these ...
2
votes
1answer
92 views

Label faceted surf in pgfplots

I have a series of X,Y,Z points and like to create a discrete surf plot and label each point. I am using \addplot3[surf...] to generate the plot but I can't figure out how to label the colors. I don' ...
2
votes
2answers
1k views

Tikz: connect two nodes

I have many nodes and want to connect two of them, but in such way that the path is not scratch off nodes, which are between these two like in the example below (I want to connect L_0 and R_0): To ...
2
votes
2answers
704 views

Shorten an edge between nodes to abolut length

How can I draw only a part of an edge/arrow (of a defined absolut length) between nodes; something like the following but shorten always has to be adapted to the distance between A and B what is ...
2
votes
1answer
192 views

Tikz how to draw a conditional iterative statement

I'd like to draw the figure below with Tikz. So far, my code looks like this : \begin{tikzpicture}[node distance=2cm] % styles \tikzstyle{startstop} = [rectangle, rounded corners, minimum ...