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
0answers
11 views

surface plot — end points get connect connected (tikzpicture) [duplicate]

It's the first time I'm asking a question here, but I've been using this side a lot on my way to get my head around Latex. I am currently working on something which I can't seem to figure out: I am ...
2
votes
1answer
57 views

Pgfplots for every group plot

Similar to this question I want to align my y labels of groupplots. The style ylabel absolute, y label/.append style={yshift=0em}, does the trick, and thus I want to apply this to every group ...
1
vote
1answer
54 views

pgfplot Memory Problem

I am plotting groupplots like this The data set is quite large (15000 data points for each plot and each group has 5 such plots). When Latex threw memory shortage error, I tried using ...
1
vote
1answer
48 views

tikzpicture in exsheets solution

I get problems with \datavisualization in an exsheets solution. I only get a small cross but not the parabola. Has someone similar experience and can help me? \begin{solution}[print] ...
0
votes
2answers
112 views

How is it possible to make a “magic quadrant”?

How is it possible to make a "magic quadrant"?
1
vote
1answer
83 views

Gephi Graphs in Latex

Is it possible to create Gephi Graphs with latex? See Graph1 Graph2 Asking this question just out of curiosity. I'd like to add that Gephi is not simply connecting dots.
1
vote
1answer
32 views

How can I adjust the bounding box of a (complicated) tikz-cd diagram?

This question is related to my previous post (the MWE can be reused from there), and the links provided there. I'm trying to draw a (complicated) diagram using tikz-cd, including big, curved arrows, ...
1
vote
0answers
51 views

TikZ: Smooth curve through three points without changing direction

In another question (see here) I was asking about how to put the control points of a curve on the tangent of a specific curve point. While the given answers where helpful for that particular ...
0
votes
0answers
34 views

Intersection of two extended lines in TikZ without having to draw them

This question is a follow up of TikZ: how to find the intersection of two extended lines? I have a moderately complicated TikZ graphic that shows the setup of an optical system. I need to calculate ...
2
votes
1answer
44 views

Make bands surrounding nodes with Tikz

MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \tikzstyle{block} = [rectangle, draw, text width=5em, text centered, rounded corners, minimum height=2em] ...
11
votes
1answer
92 views

Active ! Character Hangs within TikZ

The MWE below makes the ! active in math mode using the solution from Make Characters Active via Macro in Math Mode and uses the tikz \hcancel via Diagonal strikeout starting too low and ending too ...
3
votes
2answers
34 views

Center Subfigure Based on Included Graphics

I have a figure in my dissertation in which I am including a picture that has a bunch of labels identifying different aspects of the picture, some are long and some are short. The problem is that some ...
2
votes
1answer
32 views

tikz: nodes overlapping with edges on graph

I'm trying to reproduce a graph from a paper using Tikz, the graph that I'm trying to reproduce is the following: But without the horizontal curved line and brackets on the left subtree. So far, ...
2
votes
1answer
72 views

Two commands for the same line not drawn identically

I have a line with equation y = (3/5)x + 1 drawn, and I have grid lines drawn using TikZ. Each unit corresponds to 0.5cm. The commands \draw[<->] ({-7/2},{((3/5)*(-7) + 1)/2}) -- ...
6
votes
4answers
76 views

Tikz: Put control points on tangent of curve point

I want to achieve the following (this is a mockup drawing in Inkscape): I want to draw a smooth curve through three coordinates and I want the control points of the second coordinate (labeled "P" in ...
4
votes
1answer
92 views

How do I control the spacing between two tikzpictures?

If I have two tikzpictures next to each other, how do I control the spacing between them? \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1.5,>=latex, ...
0
votes
1answer
20 views

Position of a scheme (figure) at a specific point in the text

I have this scheme code \begin{figure} \begin{center} \begin{tikzpicture} \node[draw] (s1) at (0.4,0) {Market risk}; \node[draw] (s2) at (-5.3,-2) {Interest rate}; \node[draw] (s3) at ...
0
votes
0answers
22 views

A large (curved) arrow is causing my tikz-cd diagram to have too much space on one side. How can I fix this? [duplicate]

I use tikz-cd to draw commutative diagrams, and recently needed to draw a diagram of the following form (this is a MWE): \documentclass{standalone} \usepackage{tikz-cd} \begin{document} $$ ...
5
votes
1answer
77 views

Python colormaps in Tikz

I would like to reproduce in Tikz examples of colormaps in Python. The one which is of interest to me is YlOrRd. I can extract it from the provided pdf but a Tikz solution is better. I've tried three ...
3
votes
1answer
63 views

How to create two copies of the Sierpinski triangle beside each other?

I am trying to create two copies of the Sierpinski triangle like this: For this I borrowed some code I found online and tried to modify it a little bit to meet my needs. Here's my edited version of ...
4
votes
0answers
241 views

After MiKTeX update when using LuaLaTeX: Package pgf Error: Driver file ``pgfsys-luatex.def'' not found

I just updated my MiKTeX instance to the latest packages and am using the LuaLaTeX compiler. Whenever a document relies on pgf I get the following error: ! Package pgf Error: Driver file ...
2
votes
1answer
37 views

Undefined control sequence \pgfmath@ in \node with text height or text depth

The below file gives this error when compiled with pdflatex (from TeX Live 2015). How do I fix it, and what have I done wrong? Error \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ l.27 ...
2
votes
0answers
50 views

Shading part of a sector of a circle

In the following code, two concentric circles centered at the origin are drawn. How do I get the sector of the big circle between 225 degrees and 315 degrees and outside the smaller circle shaded? ...
4
votes
1answer
40 views

How to split a shape created by hobby along a curve?

I want to draw an arbitrary domain which I can split in two along an arbitrary curve so I can colour both subdomains using different colours. I tried drawing the domain using the hobby library, ...
4
votes
0answers
48 views

Nesting tikzpictures, style inheritance and save box

Throughout my document, I need a custom symbol, which I draw using TikZ. I have created a macro for it, so I do not need to copy the picture. I also need to use the symbol within other tikzpictures. ...
2
votes
0answers
49 views

Braids diagrams and quantum groups

I need to include some graphical proofs of quantum groups theorem, looking like the one below: It's very similar to the braids package, but I also need to include operators, like the S in the ...
1
vote
1answer
95 views

How could I add significant amount of latex on graph?

How can I generate the image below easily? I'm particulary interested in scaling brackets given graph nodes. Is this easy to do in graphviz and then somehow put latex over it, or is this image ...
4
votes
1answer
52 views

Choose color based on value for Kpi reporting

I trying to make a report containing colored spheres that should be wrapped in a command and updated dynamically. I have defined af colored sphere that receives a color, a value and a text. The color ...
3
votes
1answer
49 views

Dash pattern for TikZ line, adaptive to line length

I'm drawing a bended line with TikZ, say using \draw (0,0) to[out=-45, in=-135] (0,5); Is there a way to define a dash pattern such that the first third of this arc is fully present, the second ...
3
votes
1answer
62 views

How to draw a gradient spiral with tikz

I want to draw a gradient spiral with tikz and I am encountering problems. My current code: \draw[line width=0.24mm, rotate=120, color=red] (0,0) \foreach \i [evaluate={\r=(\i/1212)^2;}] in ...
1
vote
1answer
75 views

Graph with multiple Y axes

How do I create a graph multiple Y axes(more than 2) stacked one over the other with a common X axis? See attached figure. Each zero in y direction represents the beginning of new y axis.
3
votes
1answer
54 views

Problem in writing Arabic words and letters in TikZ figures

I'm facing a problem in writing Arabic words, letter, and numbers in TikZ figures. I'm using lualatex. Numbers are not typed in Arabic and words do not appear. Here is the code I'm using: ...
4
votes
1answer
37 views

Monetary Values on tikzpicture axis

How can I get the following; (a) The euro sign in front of each axis label. (b) Every number to two decimal places, so 145.50 appears as 145.50 rather than 14.5 \documentclass[12pt]{article} ...
4
votes
2answers
35 views

Break up block in several parts

I basically want to break up the ADC block on the right hand side of this figure: I want it to be broken into 4 parts. That means one part for each line that it is connected to. One I/O for each ...
3
votes
1answer
56 views

Constructing a Seismic Tripartite Graph with TikZ & pgfplots

I am attempting to use TiKZ and pgfplots to construct a seismic tripartite graph. These are used by structural engineers to determine seismic response for a structure. The example I am attempting to ...
3
votes
2answers
41 views

PGFPlot with data that is way too small

I'm trying to plot the Wien and Rayleigh-Jeans laws in a graph of $I \times \nu$. Wien Law: \[ I=\frac{2h\nu^3}{c^2}e^{-\textstyle\frac{h\nu}{kT}}\] Rayleigh-Jeans Law: \[I=\frac{2k\nu^2T}{c^2}\] ...
1
vote
1answer
63 views

Adjust my Tikz in final page

When I write a lot in my TikZ, the words leave the page. I want to fix it. This is my code: \documentclass[12pt,a4paper]{article} \usepackage[left=3cm,right=3cm,top=1cm,bottom=2cm]{geometry} ...
17
votes
3answers
547 views

Why does xcolor lighten a color when mixed

I'm trying to create a smooth gradient between cyan and blue connecting two shapes, one drawn in cyan and one in blue. For that I use a simple mix of the two colors in a \foreach loop. However, in ...
4
votes
2answers
97 views

Draw dotted background [duplicate]

I saw this diagram on an exam paper and noticed that it was too clean to have been made in the usual MS Word program. So I figured that it may have been made in either TikZ or PSTricks. What stood ...
0
votes
1answer
43 views

How can I add multiple cross line within a node of tikz?

Here is my question, I want to add a node on top of several lines of code, representing that these code are not used anymore. Right now it is something like this: Here is my code: ...
1
vote
0answers
90 views

HowTo: Fill a surface on both side

I am trying to draw a surface with a non rectangular domain, but the fill command only colors one side of the surface. How can I color the bottom side of my surface? The surface is defined as f(x,y) ...
1
vote
1answer
70 views

How can I make a 3D representation of a potential well

I want to do draw a 3D representation of a potential well in cartesain coordinates, like this: Since I never had to do 3D plots, I have no idea where to start.
2
votes
0answers
87 views

How to improve the 3D effect of this plot? (TikZ and pgfplots)

I have been experimenting with plots for a particular data series I have generated. The code below plots a surface around a polar axis reading in data from a file. The file can be downloaded here ...
0
votes
1answer
34 views

Externalized pgf pictures are not centered in figure environment

I try to use pgf/tikz with externalized images as described in section 107 of the manual. I am not using the "external" tikz-library because I have problems with the required shell-escape ...
5
votes
2answers
93 views

How to draw stretched 2D vectors in TikZ?

I am trying to reproduce a figure similar to this: This is what I have done so far. However, the tilting & stretching of the vectors is not realistic as in the figure above. ...
5
votes
2answers
94 views

tikz cannot find a node for use as a baseline

Minimal (non-)working example: \documentclass[tikz,border=2pt]{standalone} \usepackage{accsupp,xparse,hyperref} \usetikzlibrary{calc,fadings} ...
2
votes
1answer
78 views

Draw an arrow between nodes

I have 4 nodes, and I need to draw an arrow that turns 2 times from a node to another node. \documentclass[tikz,border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} ...
2
votes
1answer
20 views

How to delete some axis in pgfplots, and how to add labels inside figure

I want to delete the axis in the box of this program. I want to keep the x and y axis, and delete the ones that are in front of them. I tried with xtick=\empty and without, it does not seem to have an ...
2
votes
1answer
71 views

Mathematical calculation within \foreach loop in tikz

The minimal code below demonstrates the problem. The code as it is does not give the desired output. I assume the \x-\y is not being correctly handled. I have tried including braces, brackets, but to ...
1
vote
1answer
46 views

beamer - draw arrow between positions on different graphics

I am following the example here to draw an arrow from one position on a picture to another. I successfully reproduce the answer, but fail to adapt it to work with the nodes I draw over graphics. My ...