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)

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} }; ...
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 ...
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 ...
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} ...
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 ...
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} ...
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} ...
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
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 ...
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} ...
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 ...
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: ...
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 ...
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
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 ...
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 ...
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 ...
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} ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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} = ...
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 ...
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} ...
1
vote
0answers
33 views

TikZ: Unexpected decoration behaviour on duplicate image [on hold]

When I call the exact same tikz code, which uses decorations, I get an error for the second image only. Thoughts? Thanks. MWE: \documentclass{article} \usepackage{tikz} \begin{document} ...
0
votes
1answer
42 views

How do I export a TikZ-Feynman file as .eps?

I would like to draw a Feynman diagram with TikZ. My code is the following: \documentclass[tikz]{standalone} \usepackage{tikz-feynman} \usetikzlibrary{external} \tikzset{external/system call={latex ...
3
votes
1answer
99 views

How to reduce the width of the strip?

I wish to reduce the width of the following mobius strip of our Mathematical Society. The resulting image should be more like the following The codes below gives: \documentclass[tikz]{standalone} ...
4
votes
1answer
35 views

Parallel edges in Graph using \path

I'm trying to get Parallel edges between nodes. I recognize that very similar questions have been asked before, however; Those solutions don't seem to have worked on my problem, though my ...
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 ...
4
votes
2answers
172 views

Making arrows parallel in commutative diagram in Tikz

I would simply like to make all the arrows that should be parallel in my commutative square, actually parallel. Here is my diagram: The outer square displays functions from the displayed domains and ...
0
votes
3answers
71 views

How to draw line passing three points in xy-plane

My question is , In my MWE i would like to draw a line passing through three points (-100, 700) , (100, 600) and (300, 500). further how can i label that line i mean how can i write the mathematical ...
5
votes
1answer
126 views

Draw background of water in cone

According to this answer I want to draw a partial background in a cone like this but it seems hard to me take the background from the code in the previous answer. then tweak it until it looks like ...
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} ...
2
votes
0answers
33 views

problem when using scope and rotate with tikz

I wish to take this picture with tikz turning figure generally this type of scheme does not ask me problem and I wrote the following code \documentclass{article} \usepackage{tikz} ...
2
votes
0answers
49 views

How to draw (Cartesian, cylindrical, and spherical) coordinates and differential elements?

How to draw the following figures? I tried to do it myself, not an easy job, apparently! I did also find these relevant posts: For the 1st pic: 3D Cube within a cube? For the 2nd & 3rd pics: ...
2
votes
1answer
48 views

How to draw line from edge of rectangle to the opposite side

I want to define command which draw line from edge of a rectangle occupies page area to the opposite side. To draw the line I do some manual adjustments to connect both sides with rectangle Here a ...
2
votes
1answer
37 views

Scale a TikZ picture according to current font in math mode

I want to define a simple shape and use it as a binary math operator. This implies that it should scale when used as a subscript (e.g., the same behavior as \bigcirc). My attempts so far led me ...
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 ...
2
votes
1answer
50 views

I put \pgfresetboundingbox after \clip, what should the bounding box be?

Short question After a \clip and a \pgfresetboundingbox, the bounding box is permanently (0,0)rectangle(0,0). How can I turn on the bounding-box calculation and obtain a fairly small bounding box? ...
1
vote
0answers
82 views

Making a timeline in Tikz?

I am working on my thesis and I would like to make a simple "technology timeline", probably something like this (although I prefer horizontal timelines): Are there useful packages that I can use? ...