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
1answer
27 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 ...
2
votes
1answer
18 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. ...
1
vote
0answers
20 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 ...
4
votes
1answer
44 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 ...
3
votes
2answers
109 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
68 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
0answers
37 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 ...
3
votes
1answer
41 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
41 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, ...
9
votes
0answers
56 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
45 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
61 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 ...
4
votes
1answer
53 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}} ...
7
votes
1answer
66 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
32 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
43 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
33 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
60 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
29 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 ...
4
votes
4answers
575 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
65 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} ...
1
vote
2answers
58 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
63 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
85 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
85 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} ...
4
votes
1answer
56 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
31 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
113 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
25 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
80 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
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 ...
1
vote
0answers
74 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
34 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
175 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
83 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
66 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
86 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
73 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
54 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
57 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
32 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
97 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 {% ...