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)

5
votes
3answers
264 views

Help with size of an image for a book

\documentclass{article} \usepackage[papersize={11in,8.5in},margin=0in]{geometry} \usepackage{tikz} \usetikzlibrary{calc} \parindent=0pt \begin{document} \begin{tikzpicture}% \node[anchor=south ...
3
votes
1answer
64 views

page break issue with tcolorbox's height fixed for

When using the height fixed for=first and middle option on a tcolorbox, the page break behavior becomes awkward. Try uncommenting the identified line in the following MWE to see what happens. ...
2
votes
1answer
50 views

Tikz 2 part line to label item

I'm looking for a way to construct the line (image attached showing 2 different possibilities) in Tikz without using a node at the junction point of the two line segments (horizontal and diagonal). I ...
0
votes
1answer
53 views

Need code for Beamer presentation

For my presentation using beamer I need code for this image structure. can anyone help me??
1
vote
0answers
37 views

Adding dipole moments in chemfig

I haven't been able to find anything in chemfig for adding dipole moments to my molecules beyond creating custom arrows with tikz, which is more involved than I'd like at the moment. Is there some ...
5
votes
2answers
148 views

Plotting triangle on voronoi diagram, shading fractions of triangles with pgfplots/Tikz

Using this previously asked question I was able to plot Voronoi polygons from a set of generated data. I would like to annotate the plot further by doing the following: SOLVED BY MANIPULATING INPUT ...
2
votes
1answer
44 views

TiKz: how to set distance between two scope

I'm starting to use TikZ. I use it to draw flowchart. I met the \scope statement, and I will use it to group my flowchart. I.e.: I have one \scope, aligned at very left of the page. I wish that the ...
0
votes
0answers
24 views

Tikz, graphdrawing - common style for groups of nodes

I'm using tikz's graphdrawing library. I would like to define a common style for a group of nodes. What is the correct way of doing so ? Currently I specify the style per node, e.g. \graph[random ...
-1
votes
3answers
103 views

How to plot this type figure in latex?

please tell me, How to plot this type figure (see, attached file) in latex?
0
votes
0answers
28 views

Can Tikz's “double” style be applied to arrow heads? [duplicate]

In the TikZ manual, version 3.00, the "double" option for line styles is discussed on pages 170 and 171 immediately before the section "Adding Arrow Tips to a Path". We see an example of an arrow tip, ...
2
votes
1answer
40 views

To draw a dot for an element, named as $x$ in set $X$

I am trying to make a diagram of mapping like that: \begin{tikzpicture} \tikzset{ elps/.style 2 args={draw,ellipse,minimum width=#1,minimum height=#2}, node distance=3 cm, ...
5
votes
1answer
45 views

Appearance of tikz node on key press or mouse click

Considering the following TeX code: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{frame} \begin{figure} \begin{tikzpicture} \node (A) ...
4
votes
1answer
94 views

Two-photon processes diagrams in latex

Along my document, I have to display repeatedly, various figures containing diagrams as the included in the image: I am wondering which would be an effective approach to deal with this need within a ...
6
votes
1answer
83 views

Achieve a tikz picture

I want to do a figure like this one But I can't achieve it. I am a beginners in tikz. Thanks for your Help. I add the code and the result I get. \documentclass[french, tikz,border=5]{standalone} ...
6
votes
1answer
59 views

TikZ Angle Label - Help it “fit” better?

I have the following drawn with TikZ using the code \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture} \coordinate (O) at ...
5
votes
1answer
100 views

Add sloped labels in tikz

I have the following drawn in Tikz. using the following code \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \coordinate[label= above ...
1
vote
1answer
48 views

A mistake in typesetting a brace

TikZ is not compiling the code with the following command. \draw[decorate,decoration={brace,raise=5pt,amplitude=5pt,mirror}] (a_mark_for_start_of_brace_near_A_for_brace_AC) -- ...
2
votes
1answer
48 views

Arrow between two points

The tips of the red arrows are not visible, how can that they be ? \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} ...
0
votes
1answer
82 views

Adding 3D elements to a grid in Tikz

Based on my question here I created the the triangular mesh given below. Note that I am very new to Tikz so I don't know if this is the best approach. I would like to add 2 to 3 3D elements to the ...
1
vote
1answer
30 views

controlling subfloats [duplicate]

I have the following figures created using tikz. I want to center subfigure a so that it will be at the same vertical space as the middle of subfigure b. Here is my code: \documentclass{article} ...
2
votes
1answer
46 views

Controlling edge shape in tikz

I have written latex code for automata using tikz. I am using \path and \draw for my edges (cf figure1), and I want to have edges of the form (cf figure 2). Any thoughts on how to do it? Thanks in ...
4
votes
3answers
289 views

Drawing unstructured grids with Tikz

I am extremely new to Tikz, and know that it's easy to draw regular (Cartesian) grids, but haven't seen any examples using unstructured grids. Is this possible to do in Tikz, and if so, is there a ...
3
votes
1answer
58 views

Multiple Pics in \TikZset?

Is it possible to have multiple pictures within a single \tikzset command? In my MWEs I try to create an X and an O pic. E.g. This did not work. \tikzset { X/.pic={\draw (-5mm,5mm)--(5mm,-5mm) ...
3
votes
1answer
46 views

An arrow between two tikzpictures

How can I display an arrow between two tikzpictures (of the same size) so that the arrow is alligned with the centre of the pictures? \documentclass{article} \usepackage{tikz} \begin{document} ...
3
votes
1answer
55 views

Aligning nodes to center in \tikz

I'm trying to create the following diagram: |Welcome| |Low| |High| |Truth| |Lie| So far, this is what I've come up with: The idea is that the ...
3
votes
2answers
35 views

Labelling only one point on a coordinate axis (pgfplots)

I want a grid on the whole plane like I have, but I don't want labels on the coordinate axes (other than at x/y=1) or the blank spaces that are seen in the MWE. How do I accomplish this? ...
3
votes
2answers
73 views

Rotating rectangle node in tikz without getting the right angle [duplicate]

I'm new to tikz and I am trying to make a perpendicular angle mark on a triangle by \path[clip](C)--($(B)!(A)!(C)$)--(A); and \node[draw=black, rectangle,inner sep=0pt, outer sep=0pt, minimum ...
6
votes
2answers
90 views

TikZ Macro for Placing an “X” by Coordinate

I would like to make a TikZ macro that will: Have an optional argument of coordinates Place X centered at those coordinates. Is this possible? This is how I put two X's on a 10x10 grid manually. ...
2
votes
1answer
76 views

Two histograms with curve on top, using precomputed data (tikz)

How do I recreate something similar to the matlab figure (screenshot below)? My data is extremely numerous so I am unable to write a txt file for tikz to read in and make its own histogram. ...
5
votes
2answers
99 views

Centering standalone tikz picture

I'm wondering what is causing the following image to be so horribly off centred and how I might fix this issue (Note the massive space in the top left corner). Currently I am just post processing the ...
1
vote
0answers
40 views

Can tikz be directed to ignore all text and math?

Suppose that you have an existing large document with lots of tikzpictures in it. Is it possible to put some code in the preamble that effectively turn off all text and math within these figures? ...
4
votes
2answers
62 views

Labels at an angle: an unexpected gap

I am trying to put some labels at some angles: \documentclass[14pt]{extarticle} \usepackage{tikz} \begin{document} \begin{tikzpicture}[label distance=0.5cm] \node[draw,circle, minimum size=10cm, ...
2
votes
1answer
114 views

New Question: Serious problem by creating a figure

I have now trying to make this model: But I do not know how to add the nodes in top; "1 text", "2 text", "3 text" and "4 text". Furthermore, I do not know how to make a fourth box, as shown: "9 ...
5
votes
1answer
86 views

Increase contrast in a specific colormap range in pgfplots

I'm trying the replicate the following rendition of the Rosenbrock function in TikZ and pgfplots: https://commons.wikimedia.org/wiki/File:Rosenbrock_function.svg Here's my MWE: ...
5
votes
1answer
64 views

Depressed last plot in pgfplots

For some reason, the rightmost graph is slightly lower than the other graphs, but I don't know why. Code: \documentclass[12pt]{article} \usepackage{amsmath, amssymb} ...
2
votes
1answer
38 views

How can I align text between fitted and positioned nodes?

I'm trying to build a diagram of variable-sized lumps aligned to a regular underlying grid. Here's my MWE: \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{positioning,fit,chains} ...
6
votes
1answer
88 views

How to calculate geometric functions of tikz coordinates?

I have two points in tikz (m1 and m4) and would like to calculate the angle of the line defined by these two points and the horizontal line. The math would be atan( (x2-x1) / (y2-y2) ), and I tried ...
0
votes
0answers
31 views

TikZ: How to get different output for PDF View and PDF print from the same PDF?

How can I get different bahaviour for PDF View mode v.s. PDF Print mode from the same PDF? E.g. in case of the same PDF can the print version show something more or less than the screen version (in ...
1
vote
1answer
45 views

Can PGF Plots do a histogram with variable bar widths?

So, I need to create a histogram in PGFPlots/LaTeX where source data has grouped x values and frequency, the desired output is a histogram with continuous x scale, frequency density on the y and bars ...
1
vote
1answer
47 views

Caption tikzpicture

I am getting an out of float error, here is the code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{center} \begin{tikzpicture} ...
2
votes
1answer
70 views

LaTeX, TiKZ: how to start tikzpicture on top-left of page

I've starting using TiKZ, just from 2 days, and I foud it beautifull. I've already used \scope, \node etc. My prob, is: How can I start the picture from the left upper corner of the page? I can look ...
1
vote
0answers
24 views

How do I plot a fourth order system with bodegraph?

I wanted to plot a fourth order system with bodegraph: G(s) = s^2/((s+3)^4) But I dont get how to set the transfer function with bodegraph. \documentclass[border=5mm]{standalone} ...
3
votes
1answer
96 views

tikz foreach calculations

I am trying to do a simple calculation with the tikz foreach, but it does something very suprising: \documentclass{article} \usepackage{tikz} \usepackage[active,tightpage]{preview} ...
1
vote
1answer
32 views

Redefining an environment and summary box using grid and gridleno

This question is inspired by Gonzalo's great answer here concerning his creation of gridleno.sty to enhance the functionality of grid.sty. Ultimately I have two seemingly simple questions (please ...
3
votes
1answer
26 views

tikzpicture extends over page margin and surrounding text

I tried to compile my MWE with standalone specification, but it did not work, I got errors. So I had to switch to article. Problem here is that the tikzpicture goes over the page margin to the left, ...
3
votes
2answers
72 views

A line can be seen inside the circle when using \draw[o-]

When I put a circle using \draw[o-] on top of a line, then the line can be seen inside the circle. It would be nicer if the circle was empty. Here is an example. \begin{tikzpicture} \draw[->] ...
5
votes
3answers
85 views

A mistake using the arc syntax or the let-in syntax

In the display, I have three angles that have the same measure. (These are the only three angles that are marked. They are centered at points O, P, and Q.) I am using this code to get familiar with ...
2
votes
1answer
28 views

Size of the circles in \draw[*-o] in tikzpicture

Is it possible to change the size of the circles when using \draw[*-o] in tikzpicture? There are a little to big for my taste.
2
votes
2answers
52 views

Figure problems: Add a line + two extra numbers in a row

I have two problems with my figure. My figure look like this: Instead of one number, I would like to have three numbers in a row (see the red circle). I have also tried to add a arrows down from ...
1
vote
0answers
28 views

“'/tikz/mark'” requires a value after switching to newer tikz

I'm recompiling an old paper (which is long accepted) on my new computer. All of a sudden I get an error for tikz. Maybe something is wrong in the new version? Any ideas? Package pgfkeys Error: ...