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

fit tikzpicture to page width or height (using macros)

I have a new environment defined that fits tikzpicture to the page width, but when tikzpicture is long in height the bottom part of the tikzpicture is cut and extra blank page appears because of the ...
4
votes
1answer
222 views

Draw graph with ovals tikz

Im trying to draw this graph with ovals (tikz). Can you help me?
5
votes
1answer
215 views

As the best way to draw this diagram?

As the best way to draw this diagram? See a MWE: \documentclass[border=2cm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[x=2.5cm] \draw[black,->,thick,>=latex] ...
3
votes
1answer
295 views

The easiest way to draw a diagram within a text

If one were to write a large piece of text and wanted to include a diagram like the two shown below, what is the easiest and simplest way to do so with LaTeX? By "simple" and "easy" I mean - if ...
2
votes
1answer
142 views

\widthof text in a def'd subroutine inside a tikzpicture? [duplicate]

I have already seen \widthof within tikzpicture, but this is slightly different. I have a rather complex Tikz image, which I'd like to eventually include in a Latex document; as such, I'd like this ...
3
votes
2answers
259 views

pgfplots - Zero lines draw over anything else, especially node/pins

For adding zero lines to every plot produced by pgfplots, I used the code provided by percusse here. (A quick note after 2 replies were provided: this is a "global" solution. If one likes to add the ...
4
votes
2answers
436 views

Using tikzpicture or pgfplots to draw a uniform grid

I want to use pgfplots or tikzpicture to draw a uniform grid as illustrated in below. The grid size in the figure is 8×8. I want to be able to define a parameter that gives me the ability to draw ...
6
votes
3answers
2k views

Why is this Tikz scope coordinate system skewed?

I'm trying to create a simple figure in which the tick labels will not line up properly, because the coordinate system is skewed. Here is the MWE code: \documentclass[a4paper,twocolumn]{article} ...
0
votes
1answer
186 views

Change words in a Tikz picture every page

I'd like to create a template, as below. But I'd like to make it so that I can have multiple pages of the same layout and be able to easily replace "Header 1" and "Header 2" with different words each ...
3
votes
1answer
315 views

Need text to overlay tikz header

I'm trying to create a title page for a document but I'm having some trouble with the background imaging overlaying the text. This is what it's looking like: As you can see the words fall under ...
2
votes
1answer
423 views

Piecewise styling and decoration of a tikz path?

I have this path, which I would like to style "piecewise" from a single specification, shown on the image below: As the image says, I'd like to decorate segments 2-3 and 5-6, and colorize only 3-4. ...
1
vote
1answer
327 views

Is it possible to create a TikZ calendar with very few dates (which are very apart)?

Is it possible to produce a TikZ Calendar without the range option? Would it be possible to enter very few dates manually as in a LaTeX list environment? More exactly: Is it possible to to display ...
6
votes
1answer
942 views

Usage of /pgf/number format/cd

I'm trying to fix the amount of digits the colorbar has, because the plot is shrinking in size and I wish to animate this plot, so a fixed height and width is mandatory. I still want LaTeX to do the ...
4
votes
1answer
601 views

inconsistent behavior of tikz [fit] and [transform shape]

I want to frame a set of nodes with the option [fit] ​​and change the overall size of the drawing with [scale = xx, transform shape] but I have unexpected behavior. the frame is no longer valid the ...
7
votes
0answers
142 views

TikZ library creation [closed]

I'm wondering about the best (ie faster) way to create a new Tikz library. Let's assume I have the components in a PDF/SVG/whatever vector graphic program. There is a possibility to directly convert ...
4
votes
1answer
112 views

TikZ: How to center the text in a node with the scrartcl class

I want to draw a probability tree. In Beamer it looks good. But in scrartcl the texts in the node are aligned right. I want the text to be centered. How can I solve this? ...
3
votes
1answer
4k views

Axis Environment Tick Labels as Text (Including a $)

I am attempting to use the axis environment to build a simple plot line. Is it possible for tick labels to be renamed as text? Instead of numbers I would like the month on the x-axis, and in ...
3
votes
3answers
357 views

Wrong placement (and/or size) of picture / plot with groupplot of table (… and discontinuity)?

Consider this MWE: \documentclass{article} % \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5.1} \usetikzlibrary{pgfplots.groupplots} \usepackage{pgfplotstable} ...
5
votes
1answer
572 views

Using tikz diagrams in beamer with minor differences between slides

I'd like to highlight different parts of a tikz diagram in beamer slides using something like the \only command. I was able to do this at the level of nodes, which is probably fine, but as I have some ...
7
votes
1answer
694 views

How to indicate graphically that two sides are of equal length?

I'm using tikz to draw two triangles, e.g. \begin{tikzpicture}[thick] \coordinate (A) at (0,0); \coordinate (B) at ($(A)+(330:3)$); \coordinate (C) at ($(A)+(230:4)$); \draw (A) ...
7
votes
3answers
542 views

Tikz and pgfplot problem with plotting

I'm using pgfplots. The graph is clipped where it shouldn't, how can I fix it? \documentclass{article} \usepackage{tikz} \usepackage{siunitx} \usepackage{pgfplots} \begin{document} ...
5
votes
1answer
200 views

setting tikz styles

How do I set labeling styles associated with each style type? For example: (source below) I have an "input" style (medium circle) and a "junction" style (small dot) which I would like to have the ...
3
votes
1answer
1k views

PGF Math Error: Could not parse input

Trying to plot a BER vs SNR function using erf function. However I get an error saying " Package PGF Math Error: Could not parse input '' as a floating point number, sorry. The unreadable part was ...
6
votes
1answer
480 views

Talking Balloon in TikZ

I have the following code \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{calc,shapes.callouts,shapes.arrows} \newcommand{\bubblethis}[2]{ \tikz[remember ...
6
votes
1answer
222 views

Is it possible to change the edges for some tree level using forest package?

Is it possible to change this MWE which is using forest package to produce a tree, similar to that produced by the next MWE that is not using forest? The very last level of child nodes would have to ...
4
votes
4answers
503 views

tikzmark and position issue

Can you help me to place the arrow right on the top of "a" ? \documentclass[12pt,oneside]{book} \usepackage{tikz} \usetikzlibrary{arrows,positioning} ...
3
votes
1answer
158 views

Align bar charts from different sources with one xlabel each

I have a pgfplot that reads from two files. I want a bar chart where the values (bars) of one file appear over one xlabel and the values from another file over another (A and B in this example). My ...
2
votes
1answer
625 views

Engineering notation (scientific) as tick labels with pgfplots (maybe via siunitx)?

I would like to have numbers on the ticks labels formatted in engineering notation -- but unlike in How to control pgfplots axis scaling for engineering notation (multiple of 3 exponent)?, I would ...
12
votes
3answers
876 views

Challenge! Create aTikZ style to mimic mirror reflection (with option for curvature distortion)

When we see images that are reflected at a mirror, or at the eyes of someone, or at the water, there is some light effect that tells our brains the image we are seeing is a reflection. Some of Escher ...
6
votes
2answers
724 views

Animating a plot with pgfplots

I'm creating a beamer presentation and I want to animate a plot with pgfplots. This is a MWE of the graphics: \documentclass{beamer} \usepackage{tikz,pgfplots} \begin{document} \begin{frame} ...
3
votes
1answer
954 views

Export eps figures from TikZ II

This question is a very similar to Export eps figures from TikZ however the solution that has been accepted there does NOT appear to be working for me. I have also tried the example from the ...
4
votes
4answers
347 views

How can I align text across two nodes in a Tikzpicture?

Consider the following code: \begin{tikzpicture} \node[align=left,font={\small\bfseries}] at (-30 pt, 30pt) {99.99\% $500 \mu s$}; \node[align=left,font={\small\bfseries}] at (-30 pt, 10pt) ...
1
vote
0answers
172 views

pgfplots: Explicitly Setting 'Line and Mark Intersection' In Plot

Is there a way to specify where a line intersects a 'mark' on a pgfplot? MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}\begin{tikzpicture} ...
8
votes
2answers
412 views

How to conceive a macro for drawing a pie-chart circle of fifths?

I would like to re-write parts of the book mentioned below on historic tuning temperaments, and therefore I need to draw a circle of fifths, represented in the book by hand-drawn schemata like this: ...
1
vote
1answer
284 views

TikZ scalebox without translation

Below are two TikZ pictures. In the second one, I've added a \scalebox to scale the nodes ABC and the distance between them. I want the A to remain in the same position, but unfortunately the ...
4
votes
1answer
225 views

How to position a node in the corner of the (current) TikZ picture?

I'm drawing a flowchart as a standalone TikZ picture and want to position the legend in the lower right corner of the picture. How can I reference this position or find its coordinates?
7
votes
1answer
4k views

Upside-down triangle as node shape

How to give a node the shape of an upside-down triangle (base at top)? I tried the following: triangle/.style = { regular polygon, regular polygon sides=3, rotate=180} But I don't want the text ...
3
votes
1answer
76 views

Disable the stretching effect of axes in tikz for data smaller than ymax or xmax

Consider the example below: \documentclass{article} \usepackage{tikz,pgfplots} \pgfplotsset{compat=newest} \usepackage{animate} \pgfmathdeclarefunction{normal}{2}{% ...
16
votes
1answer
655 views

TikZ code for drawing an icosahedron and labeling

I found TikZ code for drawing an icosahedron here: \NeedsTeXFormat{LaTeX2e}[1995/06/01] \documentclass[a4paper]{amsart} \usepackage{graphics, tikz, tkz-berge, tkz-graph} \begin{document} ...
17
votes
2answers
854 views

Blend/transparency styles in pstricks and TikZ

As depicted below, Illustrator offers various transparency styles: It is my understanding that, at this point, pstricks and TikZ are both limited to the normal style listed above. Could the other ...
10
votes
2answers
348 views

tikz, conditional setting of shape parameters

In my illustration I use simplified sketches of stopwatches (timers), which appear in three different "modes": (1) start of interval (coloured green), (2) time in progress (yellow), and time is ...
2
votes
1answer
67 views

Font changes in `tikz`

I have this code: \documentclass[tikz,border=10pt]{standalone} \begin{document} \newcommand{\pythagwidth}{3cm} \newcommand{\pythagheight}{2cm} \begin{tikzpicture} \coordinate [label={below ...
5
votes
1answer
438 views

Sentence diagramming

I want to make up some handouts on sentence diagramming. For those who didn't have to diagram sentences at school, I'm talking about something like this. It's basically an exploded view of the ...
4
votes
1answer
372 views

very bad underfull hbox

I would like to include a progress bar in my presentation and, when in draft mode, a page number below the progress bar. I have the code to do this, and it looks great, but I get one instance of this ...
5
votes
0answers
618 views

Combining beamer, tikz, externalize and standalone

I've read a bunch of questions and answers on these topics as well as the documentation of the external library for tikz. I suspect I fundamentally misunderstand what I'm doing. I have a mindmap ...
1
vote
1answer
103 views

Changing fonts for a section of the document

I'm looking for an example of changing the font for just one TikZ node (in a picture). I tried [font=\augie] but a big part of problem is that I can not find how to to load the font in the document. ...
5
votes
1answer
3k views

Creating “cylinder with bottom” node shape in TikZ/PGF

How to create custom TikZ node "cylinder with bottom", where hidden line in cylinder bottom is shown using dashed line. Something like the following creation, except node center should be in the ...
6
votes
3answers
531 views

Prevent TikZ tree text overlapping with later lines

I'm trying to create a family tree with TikZ growing right. I have the tree working, but the text at each node is too long, it overlaps with later lines (e.g. My Family Tree, Paternal GMother and ...
6
votes
1answer
271 views

Graphing an astroid - parametric curves in pgfplots

So I am trying to create a plot of an astroid in pgfplots which has the parameterization x = cos(t)^3 y= sin(t)^3 and tikz is giving me an error that it is giving up on a path and wondering if I ...
4
votes
1answer
179 views

draw a smooth dendrite

I want to draw a dendrite and here is what I have done till now, \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{3d,calc} \newcommand*{\hd}{1.0}% ...