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)

4
votes
2answers
618 views

Pgfplots: How to fill area under a curve in a 3d plot similar to \closedcycle in 2d

How can I fill the area under a curve in a 3d plot, similar to the \closedcycle command in ordinary 2d plots? Applying this command does a filling which is not rotated. Minimal working example: ...
1
vote
1answer
34 views

Filling a node with white space to put labels in the foreground

I have grid lines drawn on the Cartesian plane. I mark distances 2, 4, 6, and 8 along the x-axis and 2 along the y-axis. To avoid the grid lines being drawn over these labels, I use fill=white and ...
2
votes
2answers
28 views

TikZ graphs: Specify edge target anchor

I have the following code: \documentclass[tikz]{standalone} \usetikzlibrary{graphs} \begin{document} \tikz \graph[grow right sep=20,nodes={draw,rectangle}] { a -> {b, long node name} }; ...
3
votes
3answers
43 views

How to add additional border on the left and add additional boxes in the right corner with a label

Trying to draw diagrams from Problem Frames paper. How can I create this borders on the left and add additional boxes in the right corner with a label. Is it also possible to add an additional line ...
5
votes
1answer
51 views

Hatching a rectangle with TikZ leaves margin

Hej everybody! :) I'm currently taking my first steps with TikZ, and when trying to plot some simple rectangle shapes I noticed a rather weird effect that occurs when I try to fill the rectangles ...
2
votes
1answer
42 views

Position of a text in TikZ matrix

I want to put a text inside a TikZ matrix, but it always begins from the bottom !. So, my qusetion is how I can force it to begin from the top? My MWE: \documentclass{article} ...
0
votes
0answers
15 views

Combining Tikz concepts/librarys to draw a complex picture with relative alignment/distances [duplicate]

I think all of the problems has been asked by me or others in the past. But my over all problem is that I am not able to combine all this solutions to the real picture I want to draw. Normally it is ...
3
votes
1answer
40 views

Three errors when using tikz package

I am using MacTex 2015 and Texpad as LaTeX editor. When I try to import the tzik package \usepackage{tikz} the following 3 errors appear Weird thing though is that everything looks fine in my ...
6
votes
2answers
413 views

Wrapping a Feynman diagram in an ellipse or a circle?

I used a variation of the following code in order to create Feynman like diagram in latex using the answer in Drawing a scattering Feynman diagram with TikZ However, I want to wrap the diagram inside ...
5
votes
1answer
74 views

How to draw this figure in a better way (mapping between domains)?

I am trying to draw something similar to this: This is what I have done so far: \documentclass{article} \usepackage{tikz} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} ...
1
vote
1answer
26 views

How can I choose a column of dat file to plot in pgfplot?

I have dat file (output from Matlab) and it has four columns. How can I choose my desire column to plot in pgfplots. \documentclass{article} \usepackage[active,tightpage]{preview} ...
0
votes
0answers
24 views

Error: pgfplots colorbrewer

I am trying to use the new colorbrewer library and get the following error: Error: I do not know the key '/pgfplots/colormap/YlOrBr' and I am going to ignore it. \documentclass{standalone} ...
0
votes
2answers
51 views

Use tikz to plot sine wave with text and lines

I wanted to get a tikz plot to look like: I am getting two cycles in my code. The original code was masterfully written by moospit found here. Here is the code to start with: ...
2
votes
1answer
21 views

Trouble with label in TIKZ-cd

I cannot seem to figure out why the following won't work when I add a label. I will show the working example first, I want a simple commutative diagram with a label on each arrow. The working example ...
0
votes
0answers
48 views

How to graph a unit circle using TikZ?

I know some basic graphing like functions on a Cartesian plane or drawing polygons, but how do you graph something like the one above? I also want to put this graph within the unit circle.
2
votes
1answer
47 views

draw graphs in tikz

\documentclass{book} \usepackage{graphs} \usetikzlibrary{graphs} \begin{doument} \begin{tikzpicture}[new set=import nodes] \begin{scope}[nodes={set=import nodes}] % make all nodes part of this set ...
1
vote
1answer
23 views

TikZ/PGF error when using forest

I am trying to make a linguistics tree using the forest package, as in the second example in this thread. I was able to generate the tree for the most part, but I cannot draw the triangle for some ...
11
votes
3answers
805 views

Tikz, decorations

I use tikz as a general purpose drawing package because of its flexibility etc... I need to draw some Feynman diagrams like these: I tried to draw arc like \begin{tikzpicture} \draw [decorate, ...
1
vote
1answer
51 views

Add “sections” to a staked area chart

In This question I have exposed the original problem, inspired in the answer given by Carina I started to work in some solution, but it is still not 100% right. Based on this meta I have decided to ...
12
votes
2answers
5k views

Curved waved lines with TikZ

I'm trying to write a code for Feynman diagrams with TikZ (I know it is a common subject in the forum). I found very useful posts. However, I would like to draw a curved waved line ...
3
votes
0answers
62 views

Plotting the sum of a function in TikZ

I am trying to plot a function that is the sum of another function based on the parameter. A famous example of this is the "sum of squares", however the functions I really want to do this do not have ...
5
votes
1answer
58 views

How can I use a tl variable in TikZ options

Im setting up a command with some options via l3keys. One of the options is tikz-options and it should take a list of TikZ options and pass them to a {tikzpicture}. \documentclass{article} ...
3
votes
1answer
77 views

Decorating a page with pgfornaments

I want to decorate pages in my document by using the package pgfornaments. To make things easier, I created the command \pageornament: \newcommand{\pageornament}[2]{% \begin{tikzpicture}[remember ...
1
vote
1answer
41 views

Chart using tcolorbox

Hi I'm making a chart using tcolorbox. I'll show you my code: \begin{center} \begin{tcolorbox}[halign= flush center, halign title= flush center, fonttitle=\sffamily\bfseries\large, title={Lecteur DVD ...
2
votes
2answers
84 views

How to do a chart with stacked bars, lines and “sections”

The problem I need a chart like this (this was made in Libreoffice + some gimp): Its caracteristics are bassically: Some stacked bars (if it is a stacked area, better) with its Y axis at the ...
12
votes
1answer
110 views

How to draw fully packed loops on medial lattice?

I want to draw a variant of the following figure, [Figure 22 of Freedman et al, Annals of Physics,310(2):428–492, April 2004.] The lattice and dashed lines are easy. Using two for loops ...
4
votes
0answers
94 views

Drawing a plane inside a sphere in TikZ

I have the following code, which is basically a modified version of the sphere example from TeXample.net. \documentclass[crop,tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,fadings} ...
2
votes
1answer
53 views

Generating catalan path diagrams using ballot sequences in latex

here is a pictures of a catalan path: It is a lattice path in Z^2 starting a some point (a,b) and using the steps (1,1) and (1,-1). It can be decoded (knowing the starting point) as a ballot ...
5
votes
1answer
54 views

Using tikz inside multirow

I'm trying to recreate the following figure in latex: Now, I dont have a lot of a problem with one of them: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,backgrounds} ...
0
votes
0answers
33 views

\usetikzlibrary{graphs} is not working

\usetikzlibrary{graphs} \tikz \graph { a -> {b, c} -> d }; I learn Tikz through { Tikz pgf}. I write above code and compile errors occur. i mention what errors comes. i write this code ...
1
vote
1answer
32 views

Problem with horizontal alignment in minipage environment

This may be a very stupid question, but it is driving me crazy. I have three tcolorbox linked by arrows. The second line of boxes are in a minipage environment, and I want one flushleft and one in ...
2
votes
1answer
53 views

Drawing arrows using tikz

I am trying to make a small chart and drawing arrows between tcolorbox, using tikz and the 'remember as' tool. My code is this \begin{center} \begin{tcolorbox}[enhanced, overlay, width=1.5in, ...
0
votes
1answer
39 views

scale bar figure - showing scale with citations

I am attempting to make figures similar to this: with latex. I would like for the citations to work in order to match the observed data from where it came. Does anyone know of a good package ...
3
votes
1answer
90 views

Circuit on weighted multigraph

I am solving the Chinese Postman Problem on a tennis court, and I would like to plot the circuit in Tikz if possible. I know how to plot the circuit if I simply have a graph, but the modified graph I ...
2
votes
1answer
46 views

Help with Plotting Logscale?

I'm trying to plot the time complexity of some sorting algorithms using a log scale. I'm fetching the data from a text file insertion.dat which contains the following information: x y 0 0 10 0.002 ...
2
votes
2answers
67 views

How to scale the colorbar to data in pgfplots

Good morning, I have some .txt files that contain 3 columns of data: the first one corresponds to the x-axis value of each point, the second one corresponds to the y-axis value of each point, and the ...
8
votes
1answer
116 views

Error when implementing TikZ-Feynman package

Today I downloaded and installed the new TikZ-Feynman package to draw Feynman diagrams. I included the packages \usepackage{tikz} \usepackage{tikz-feynman} \tikzfeynmanset{compat=1.0.0} ...
5
votes
1answer
500 views

How to draw 'Open Oyster' Feynman diagram with FeynMF or other package?

I am curious to learn about Feynman diagrams, so I have started to read Richard Mattuck's book "A guide to Feynman Diagrams in the Many-Body problem". One of the first diagrams that appears in this ...
2
votes
3answers
119 views

How can I align TikZ nodes of a commutativity diagram?

I have a TikZ picture: \begin{tikzpicture} \matrix (m) [matrix of math nodes,row sep=0em,column sep=3em,minimum width=2em] { E_1 & H^+ \\ E_1^\perp & H^- \\ ...
1
vote
1answer
59 views

Draw stroke inside/outside of path for arbitrary shapes and nodes

This is a followup question of Is there a way to draw TikZ lines on the “inside” or “outside” of a path? Since the other question is quite old I want to ask, if TikZ in the meantime is able to draw a ...
4
votes
2answers
358 views

drawing diagram from the circle

I am trying to wrap the following diagram in a circle and I am facing some problems. I am using the some codes from, Wrapping a Feynman diagram in an ellipse or a circle? , but I cannot make the lower ...
15
votes
4answers
5k views

Drawing a scattering Feynman diagram with TikZ

I am trying to produce a scattering diagram with TikZ but I have become stuck. The Desired Structure I am trying to achieve this layout of lines, including their arrow directions. In my diagram. ...
2
votes
0answers
65 views

How to make 3D ribbon plots in PGF/TikZ

I'd like to make a bunch of 3D ribbon plots in TikZ or PGF, I've taken a look around and I've found no hints on how this might be accomplished, is there a simple way to do this? I'd settle for a 3D ...
3
votes
1answer
110 views

How to draw a Curvilinear system in Tikz/PStricks?

Can someone help me draw this coordinate system? Source: https://en.wikipedia.org/wiki/File:General_curvilinear_coordinates_1.svg What I Have Done So Far: \documentclass{article} ...
6
votes
1answer
157 views

How to draw the following diagram using tikz-cd?

How to draw this diagram using tikz-cd? Here is my code \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes,arrows,shapes} \begin{document} \tikzstyle{block} = ...
34
votes
2answers
7k views

Package for typesetting Feynman diagrams (efficiency of `feynmp` and `tikz`)

This question led to a new package: TikZ-Feynman Is there any good package for typesetting lots of Feynman diagrams? My question arise because Feynmp: Circle with three vertices lead me take a ...
2
votes
1answer
83 views

edge invisibility in tikz

I would like to know how can we make edge invisble in tikz ( similar to visible). Here is my code. I am able to add edges (1,4) and (4,5) using visible command, at the same time I want to remove the ...
2
votes
0answers
67 views

Turn a six sides into a 3 sides logo

How to change the codes below so that we have a triangular logo shape? \documentclass[tikz]{standalone} \usetikzlibrary{shapes.geometric} \tikzset{my polygon/.style={regular polygon,regular ...
4
votes
1answer
101 views

Drawing specific Feynman diagram with TikZ

I would like to draw the Feynman diagram shown in the picture below with TikZ. Edit: The code I have so far is \tikzfeynmanset{ every vertex/.style={red, dot}, every ...
8
votes
1answer
1k views

Tikz: Avoiding line segments in snake path

I am using tikz to draw Feynman diagrams, and I learned how to draw a curved snake path. The problem is that in general line segments are present (I'd like to avoid them). I found a couple of post ...