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)

1
vote
2answers
375 views

how do I make tikz circular arrowheads concentric to the point they connect?

I have a box-and-pointer diagram but it looks wrong, because the circular arrowheads are tangential to the point it connects, rather than concentric to that point. How can I fix this? \...
2
votes
1answer
246 views

Modifying some features on the graphs of a function and its inverse

The following code is compiled by pgfplots to graph an exponential function and its inverse. I have some questions about the code, and I would like to modify some of the features of the graphs. How ...
2
votes
3answers
495 views

Drawing an ellipse with TikZ

How can I draw only part of an ellipse using TikZ? I was only the top left quarter of it. I tried to use a white square box to hide the rest, but that is a tedious and ineffective method.
1
vote
0answers
155 views

Unequal bin widths in pgfplots density histogram

In the pgfplots manual, it talks about density histograms with equal bin widths/ranges. Is it possible to make a density histogram with specified unequal bin widths/ranges? For example, if I set xmin=...
1
vote
1answer
83 views

How can i get the next tables using Tikz? I can´t obtain my text at the top of the figure using tikz

\documentclass[11pt]{book} \usepackage[utf8]{inputenc} \usepackage[spanish,mexico]{babel} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage{array} \usepackage{tikz} \begin{document} \...
5
votes
2answers
2k views

How to plot smoothly an implicit function using gnuplot and tikz-pgf?

I would like to plot implicit functions in Latex with tikz and gnuplot. A minimal example of my code is given by: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[...
5
votes
4answers
4k views

Tikz: define label font size under the node

I create a picture of array which consists of nodes. I wonder how I can set the font size for the label which is below every cell (for example make it as scriptsize). This are my definitions: \def\...
9
votes
3answers
624 views

I need help with a banner in LaTeX

I just wanted to make this banner in LaTeX. But I am not so good to LaTeX yet. So I have tried my best. Here is what I have managed yet: \documentclass[11pt]{memoir} \usepackage{tikz} \pagestyle{...
6
votes
1answer
314 views

Plotting one x- vs multiple y- using custom color map

I am trying to plot data that comes in the form of one x-axis vs multiple y-axis on the same plot. I would like the color of each line to spread itself out through my desired color map (spectrum ...
3
votes
2answers
196 views

problems with ellipse TikZ

I'm working on a mac, I use the package TikZ and it works. But I have problems when I want use ellipse or diamond ex : \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} ...
3
votes
1answer
402 views

trapezium, how to calculate angles?

I like to draw the following picture: It is generated with following code: \documentclass[12pt,tikz,border=3mm]{standalone} % \usepackage{zfc-book-standalone} \usetikzlibrary{arrows....
12
votes
5answers
1k views

TikZ - How can I draw a line through a point on a line, with the new line perpendicular to the old line?

I have a line A-B between the two points A and B and a point X on A-B. Now I'd like to draw a line through X which then is perpendicular to the line A-B. How can I do this? Also: No other (directly ...
1
vote
1answer
90 views

Rounded corners don't work properly in custom decoration

I want to create some chemical Lewis structures with TikZ - I can't use chemfig for this since I need to draw the atoms according to their coordinates - and need to define some custom bond types, for ...
2
votes
1answer
308 views

Scatter plot with a grid and axis lines going through the origin

I want to make a scatter plot with error bars (using pgfplots or tikz) with two characteristics; I need the two axes to meet at (0,0), and a grid in the background. I tried to google this a number of ...
4
votes
1answer
154 views

Expanding arguments to pgf/tikz styles

In an answer on this site is proposed a method to draw arrows on paths. For example, using the style [arrow inside={pos=0.2}] will put an arrow at position 0.2 on the path : \begin{tikzpicture} \...
0
votes
1answer
170 views

Chart or diagram for this figure

How could I create this table or diagram, I appreciate the help.
3
votes
1answer
198 views

Fancy Footnote Rule

I am trying to use tikz to create a more visually interesting vertical rule to separate the footnotes in my document. Here is my re-definition (code from the soulpos package documentation). \...
3
votes
1answer
1k views

tikz node position

I have a diamond split in four triangles and I would like to write inside each triangle at it center and having difficulties with position. Please help me fix that problem.Thanks \documentclass[12pt]...
7
votes
2answers
555 views

Vertically align nodes in tikz graph

I have taken to drawing automata in TikZ, as it will position the nodes for me, and generally requires very little post-processing in terms of options. I know I can force nodes to be in the same ...
3
votes
2answers
621 views

Aligning flowchart with tikz

I'm working on some flowcharts for a programming course and have an alignment issue with one of them. Usually lines in a flowchart are directed from one symbol to another. However, I want the line to ...
3
votes
1answer
1k views

Is it possible to assign to two extra x-tick labels different colors?

I think the question says it all. I'd like to have two extra x tick labels with different colors. I thought of using a cycle command, but I couldn't figure out how it should work. I changed the color ...
5
votes
1answer
1k views

Convert PSTricks to TikZ

I use pstricks for all my graphics. Now I am submitting a paper to a conference which, unfortunately, does not allow to use PostScript. I have to send them tex source, which they compile with pdflatex....
3
votes
2answers
517 views

adding a coloured-box in flowchart

I am trying to make a flowchart in Latex, I want to put some of steps in a coloured box with a label, e.g. Deterministic Annealing, I added scope part but it doesn't compile with the new change. \...
6
votes
1answer
436 views

Latex code for patch simulation

I am trying to code the above picture. This is my current code, but it does not look like the intended figure: \begin{tikzpicture} \draw[thick,->] (0,0) -- (8.5,0); \draw[thick,->] (0,0) -- (0,...
2
votes
1answer
114 views

Positioning of a (newly defined) symbol *relative* to a textbox

I defined a set of chevrons with tikz (see below) and would like to be able to put them at the boundary of a rectangle (text box). As you can see, the code below does this, but with absolute ...
3
votes
1answer
218 views

Multipart graph with linear and circular node patterns

I'm trying to draw a graph (PDF output of code below attached) that's a linear process, with a potentially circular element in it. As you may see in the upper picture, the the B,C,D elements aren't ...
1
vote
3answers
289 views

Drawing tools regarding

I am using TikZ to draw pictures... Here i will give one of my drawing. I thing i used here is so lengthy. So is there any simple way of drawing this? \begin{document}\begin{center} \begin{...
3
votes
0answers
80 views

Horizontal extent of tikz picture: Why is it being truncated? [closed]

Here's my code: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \begin{document} \[ \begin{tikzpicture} [scale=1] \begin{axis}[ axis x line = center, axis y ...
1
vote
1answer
77 views

Inline alignment of tikz graphic

How it should look like I want to achieve the following result using TikZ. The graphic should be aligned to the right of the text body and to the top of the line's text it is placed in. Besides, ...
25
votes
3answers
1k views

Tracing a border formed by circles

Suppose I have some code that draws a few circles. These circles overlap each other in such a way that they form one "group" -- there are no groups of circles completely separated from the rest. For ...
2
votes
0answers
30 views

Missaligned tikz matrix [duplicate]

I'm trying to create a matrix of nodes that I will then use as a grid for overlaying my real nodes on top of it, but for some reason the grid appears misaligned once I overlay something on top of it, ...
2
votes
2answers
458 views

tikz package for drawing thermodynamic cycles

Is there a extension of tikz library that allows one to draw thermodynamic cycles easily? For example the picture you see in the link: http://en.wikipedia.org/wiki/Carnot_heat_engine#mediaviewer/File:...
2
votes
1answer
178 views

TikZ and compatibility of PGF

Reading several posts I understand that TikZ does not support the newer PGF library. How do I downgrade PGF to the last supported version? Are packages other than TikZ become non-compatible by this ...
1
vote
1answer
181 views

Alternating layout for every odd and even page (tikz frame with text in a flowframe)

\documentclass{article} \usepackage{geometry} \usepackage{fontspec} \usepackage{flowfram} \usepackage{tikz} \usepackage{ifthen} \usepackage{changepage} \usepackage{ifoddpage} \usepackage{lipsum} \...
3
votes
1answer
113 views

How to incorporate tikz elements into latex labels without (xe)latex apparently hanging

I am very new to TeX, and having seen the fantastic wine label examples I thought I would see what I could come up with for some homebrew which is ready to bottle. I've got some Avery labels (MD4001, ...
3
votes
3answers
264 views

Tikz-Create a Picture Legend

I am trying to create a legend inside a tikzpicture. The picture shows an accelerator and I would like to make a legend that will explain each part. My code is \documentclass{standalone} \...
1
vote
1answer
162 views

Drawing a gameboard

I desperately need help drawing a board for a board game which looks like the one in the picture or an even better one. The corners could be made to look more appealing visually.
3
votes
4answers
1k views

Plotting several functions with TikZ/pgf

How do I plot several functions in Latex with tikz? I want it to look something like this: With the this code: \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} % GNUPLOT ...
6
votes
2answers
6k views

Graphing an exponential function and its inverse on the same Cartesian plane

I would like to graph an exponential function and its inverse on the same Cartesian plane using TikZ (or pgfplots). I have code using TikZ. Apparently, there is an error in the \addplot command. I ...
1
vote
0answers
345 views

This small TikZ example does not work because of “x axis={include value=0}” [closed]

Here is a small example of TikZ plotting: \documentclass[10pt,a4paper]{article} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{datavisualization} \begin{document} \begin{figure}[h!] \...
3
votes
1answer
163 views

Add tikz styled Summary heading

As per MWE, I currently use two kinds of section header bars: a rounded grey bar for ordinary unnumbered sections ('osections' in MWE) and a 'Topic N', for numbered sections (where N=section number) ...
6
votes
3answers
1k views

How can I draw pulse-like decorations?

I have an old image with ppt style and I would like to customise it a bit. Main problem is I'm a beginner in Tikz/PGF and i really don't know where to start and which environments I should use. If ...
3
votes
0answers
53 views

Reduce number of input files for group plot in pgfplots [duplicate]

In the pgfplots groupplot below, I have three sets of data represented by data1, data2 and data3. Each of the data have three subtypes. And I need to plot a graph for each of the subtype. The file ...
3
votes
1answer
306 views

How to define a special tikz node?

I want to define a special tikz node, that I'll use that way: \specialNode[name=mynode, label=mylabel, otherTikzOptions...] (node_name) at (some_coordinate); And gets coverted to: \node[circle, ...
1
vote
3answers
366 views

How to create a 32 by 32 grid?

I want to create a 32 by 32 grid as shown below. And I also want to add two labeling in x and y directions. 1) 0 - 31 (grid number) 2) 0- 1 (box unit) I a next slide I have to draw a new box ...
5
votes
1answer
142 views

Adding node to last coordinate

I have a loglog plot and would like to highlight the last coordinate. For example \begin{tikzpicture} \begin{loglogaxis}[] \addplot+[] coordinates{(0,0) (2,20) (3,100) (4,4000)}; \end{loglogaxis} \...
3
votes
1answer
1k views

How to Place 2 TikZ Plots Side by Side

I'm working on something that involves placing plot sketches side by side. The trouble is, even though I begin the next picture on the same line as the previous one ends, it doesn't look nice: \begin{...
1
vote
1answer
362 views

TikZ bounding box too big

I'm fairly new to LaTeX and I'm trying to make a homework template that uses figures generated in LaTeX but when I use TikZ I get a bounding box that is way too large. What is the easiest way to ...
1
vote
1answer
251 views

TikZ Issue With Function Plotting

I am trying to create this simple TikZ plot of a quadratic function. But the code does not compile, and the error is detected at the part where I introduce the function. What is wrong with it? \begin{...
3
votes
0answers
52 views

Tikz, Tangent Line to a Circle [duplicate]

Why is the tangent not really horizontal? \documentclass{article} \usepackage{tikz} \usepackage{circuitikz} \usepackage{pst-solides3d} \usetikzlibrary{shapes,decorations} ...