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)

6
votes
0answers
25 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
30 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
48 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 ...
3
votes
0answers
30 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}} ...
5
votes
1answer
45 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 ...
3
votes
0answers
28 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 ...
2
votes
1answer
39 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 ...
2
votes
0answers
30 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 ...
7
votes
1answer
48 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 ...
1
vote
1answer
24 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 ...
3
votes
3answers
359 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
58 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} ...
0
votes
2answers
49 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 ...
9
votes
1answer
56 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 ...
6
votes
1answer
80 views

drawing automota states using tikzpicture

I really new to latex (~3 days of use) and I am trying to draw an automota for a problem that I am working... For some reason I am getting an error and my states all appears to be messed up. Please ...
6
votes
1answer
40 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 ...
6
votes
1answer
84 views

How can I draw -X in the forest package?

I want to draw a dead-end in forest. edge={-X} doesn't work. Example: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{amsmath} ...
3
votes
0answers
39 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? ...
1
vote
0answers
28 views

How to label an arrow in a commutative diagram

I'm writing my thesis using LaTeX. I need to add a commutative diagram with labels on arrows. Let me say that I'm writing my text in Italian using the babel package. Here a minimal example to ...
7
votes
2answers
109 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 ...
0
votes
0answers
23 views

Invert axis using pgfplots and TiKz

I am trying to do a stacked histogram, and I am trying to start from the code provided in this question : Tikz Stacked Bar Chart with Text Yet, I would like to invert the axis, so that the A,B,C... ...
2
votes
3answers
76 views

Idea-lamp box in beamer

I was think of making a new block (or not necessarily a beamer block) that will have the shape of a lamp, just to illustrate a new idea. Inside this lamp, there will problably be text, that will ...
2
votes
1answer
52 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 ...
1
vote
0answers
71 views

tikz - 3D letter

I just have to repost or renew an old question. I'm still searching for a good solution for a 3D representation of a letter with changeable content. It will be used for many final products an so the ...
4
votes
1answer
77 views

'above right=1pt and 2pt' not running

The following M(N)WE should - at least according to the fine manual - be valid code. But instead it delivers Package PGF Math Error: Unknow operator 'a' or 'an' (in '1pt and 2pt'). ...
1
vote
1answer
32 views

Multiple labels on edge in TikZ

The following MWE produces an edge between two nodes with label x above and label y below the edge: I draw the edge twice to achieve this. Is there a more elegant way? \documentclass{article} ...
0
votes
0answers
22 views

Suggestions for scaling problems with beamerposter and Tikz, and importing?

I need to make poster for a conference and I've really been struggling with how to organize it. After playing around with a few approaches I've decided that I'd like to try to just use Tikz in ...
3
votes
1answer
40 views

anchor tikz at the left margin

I would like to place a tikz picture at the left margin location of the current line. Here is a MWE: \documentclass{amsart} \usepackage{tikz} \begin{document} ...
8
votes
1answer
172 views

Background notebook template with spiral

I would like to print a document with math text to look like the picture below: However, I would like to be able to edit : color of background the position of spiral grid on/off i tired this ...
3
votes
2answers
46 views

row index of first non-zero element in pgfplotstable

I am using the "functions" \findmin and findmax from here quite much to dynamical format and set plots from CSV data I read in. In the same vein, I want a function \findFirstNonZeroIndex, which ...
5
votes
1answer
42 views

Histogram from single column in datafile

How can read in the following data and display a histogram of the frequency? I also want to add the labels 'WIN' and 'LOSS' (i.e. 0 and 1) and display the count above each bar. ...
1
vote
0answers
80 views

Drawing a TiKz Diagram within a Table [on hold]

Any ideas on how to draw a TiKz diagram within a table? I made this example of what I need to typeset in Word: I'd love to hear any suggestions, even if it requires reformatting.
1
vote
2answers
62 views

Using x and y values of a coordinate as stand alone variables

Is it possible to use the X and Y values of a coordinate as stand alone variables? I did put together a MWE, but it does not work... I've seen similar questions, but none really had a clear answer for ...
3
votes
2answers
85 views

Referencing parts of equations within a tikz picture

I have an equation in a tikz environment and I would like to be able to highlight part of it. For example the following: \documentclass[12pt]{article} \usepackage{amsmath,amssymb,latexsym} ...
5
votes
2answers
94 views

How to calculate coordinates in radians

I want to draw a line from (1,0) to (cos (pi/4), sin (pi/4)). I would like LaTeX to make the calculations using radians if possible.
8
votes
1answer
71 views

Plotting several 2d curves (with different colors) in a 3d graph

I'm trying to reproduce 3D plots with several 2d curves, like in Plotting several 2D functions in a 3D graph. The end result looks like this: The questions are: I would like to change X labels ...
4
votes
1answer
52 views

Tikz: Missing number, treated as zero

After reading many related questions here about "Missing number, treated as zero", I still do not understand why the following example results in such an error message: \documentclass[11pt]{article} ...
2
votes
1answer
56 views

Overlaying TikZ nodes on an image using TikzEdt and onimage.sty

Trying to overlay some TikZ onto an image, I have found two very helpful Q&As: Drawing on an image with TikZ Simplest way to overlay a text + rectangle label an image? I especially like the ...
3
votes
1answer
31 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. ...
2
votes
1answer
95 views

Electromagnetic Wave Propagation with TikZ [on hold]

I'm looking for a code drawing the below picture with TikZ if it is possible: I just need the graph in the middle, i.e. there is no need to also include the text and/or equations. Simply the plot ...
1
vote
0answers
29 views

itemize inside a node breaks when no text width is given [duplicate]

The following code breaks with ! LaTeX Error: Something's wrong--perhaps a missing \item. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {% ...
2
votes
1answer
31 views

Why does pgfplots's “current plot style” throw an error even when it works?

I managed to produce the following diagram with pgfplots and TikZ: This is exactly how I want it to look. The following M(-ish)WE reproduces the diagram: \documentclass{article} ...
1
vote
1answer
83 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
1answer
92 views

Draw infinite graph

I want to use the tikz passage to draw an infinite graph like the following figure But I cannot find anything like it.
3
votes
1answer
54 views

\usetikzlibrary should be used only in preamble in case of french babel

The compilation of the following MWE (Edit: The babel library is now loaded in the preamble, as needed (thanks to an @egreg's comment), and another one, no matter which one, is loaded after the ...
5
votes
1answer
60 views

Analogue in TikZ for the command \psshadowbox of PSTricks

In PSTricks, the following code: \documentclass{article} \usepackage[usenames]{pstcol} \usepackage{pst-plot} \usepackage{pst-grad} \begin{document} \noindent ...
2
votes
1answer
60 views

Adding legends to a tikz picture made of graphic components?

I have drawn the below image in latex. I have used 4 different *.png files to construct 4 different shapes (mobiles, tv's, base stations, relays) in the image. I need to add a legend of this 4 shapes ...
5
votes
1answer
214 views

Draw (very basic) network topology using tikz

I'm trying to draw some very basic Network topologies and thought that I'd try using Tikz for it. So I thought that I'd make a start and then ask for help, as I've got to do 5 of these and there's ...
2
votes
1answer
68 views

How to color these circles in TikZ? [duplicate]

How can I color the output of this MWE like the screenshot? \documentclass{book} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \draw [thick] (3.25,-2) circle (1.5cm) ...
-1
votes
0answers
122 views

House of Medici symbol [on hold]

Dear Members of Stackexchange. I would like to use tikz to create the original coat of arms of the Medici, Or, six balls in orle gules. Is it possible? Could you please tell me how you would do it? ...