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

How can I set the position of text along path in tikz more precisely?

Explanation It seems that nodes can be carefully placed on paths using pos=.25 (i.e. 25% from node BEGIN to node END) when using -- syntax (see Example A). Problem I cannot have the same precision ...
1
vote
2answers
44 views

How to use tikzpicture with tabular

I'm trying to place my graphs into the same figure vertically. However, I couldn't use tabular with tikzpicture to do it. \begin{figure}[] \begin{center} \begin{tikzpicture}[scale=0.9] ...
0
votes
0answers
56 views

Plotting piecewise functions with TikZ

I would like to use TikZ package in LaTeX to draw the following piecewise functions and their graphs: f:[0, \infty)\rightarrow \mathbb{R} such that f(0)=1, f(x)=0 if x>0; g:[0, 1]\times[0, ...
2
votes
1answer
65 views

Can anyone help in drawing this kind of graph?

Can anyone help in drawing the graph of the kind shown in figure with edge intersections? I struggled with pstricks and started to learn tikz but not able to do it. Kindly help as am not getting how ...
3
votes
3answers
86 views

Dealing with overlapping vectors tikz

The following produces undesirable output because the "tails" of the vectors are overlapping and hard to see. Is there a way to automate something better by having all vectors draw only 95% of their ...
1
vote
0answers
69 views

Recreating diffraction image with TikZ

I'd like to recreate the image below of an electron beam passing through -- and being diffracted by -- a carbon target onto a curved screen using TikZ. Unfortunately it looks a bit beyond my skill ...
6
votes
1answer
62 views

Custom Shape with tcolorbox/tikz

I'm trying to make a custom rectangle to surround my section headers. It's a regular rectangle with the upper-left and lower-right corners "cut" so they're diagonal. I want it to look like this: I ...
6
votes
2answers
73 views

How does the angle key from arrows.meta TikZ library work?

The title says it all. How does angle=<angle>:<first dimen> <second dimen> works. More exactly, what do the first length and the second length mean? \usetikzlibrary{arrows.meta} ...
3
votes
2answers
64 views

Draw Tikz Tree where level distance between multi-line nodes is constant

I am drawing a tree with tikz, namely, using tikz-qtree-compat for simpler syntax. On the tree there can be nodes of different height but then branches become messy. I want to add an instruction where ...
0
votes
0answers
29 views

Tikz help with chart. Trying to get a UML chart?

Can someone help me? I am trying to apply the following diagram in latex, and have tried to work with existing examples. The bubble map is one I created in Bubl.us. The problem is that I'm trying to ...
0
votes
1answer
49 views

Table and Tikz figure not displaying using this article template

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Journal Article % LaTeX Template % Version 1.3 (9/9/13) % % This template has been downloaded from: % http://www.LaTeXTemplates.com % % Original author: % ...
2
votes
1answer
54 views

Plots and chapterspecific colors

I have a color switching function that looks like this \definecolor{chap1}{RGB}{68, 114, 148} \definecolor{chap2}{RGB}{10,130,124} \definecolor{chap3}{RGB}{250,72,46} ...
7
votes
1answer
90 views

Why does \pgfuseplotmark put so much space to the left of the mark?

Using the suggestions from this answer, I decided to use \pgfuseplotmark to make marks in my diagram. However, there is some strange white space inserted to the left of the pgfmarks. What should I ...
5
votes
1answer
72 views

Problem with axis when drawing a function plot using PGFplots

Dear TeX StackExchange, I am trying to plot two functions in the same grid. The code I currently have is below: \begin{center} \begin{tikzpicture}[scale=1, transform shape] \begin{axis}[grid=both, ...
5
votes
2answers
85 views

Fixing the Font Issue in Venn Diagrams with Tikz Latex

I am novice when it comes to Tikz. I have three Venn Diagrams. Fore some reason the text inside the Venn diagrams start at the lower half of the node. Is there a way to automatically align/fit it to ...
1
vote
0answers
26 views

Minimize size of a figure (tikz - pgf) in LaTeX [duplicate]

I'm using MikTeX and WinEdt for writing an IEEE conference paper. To create a neural network structure I used this code : \begin{figure} \begin{tikzpicture}[ init/.style={ draw, circle, inner ...
1
vote
0answers
48 views

Alternating colors for stacked bar charts

I'm trying to make a stacked bar chart with two bars next to each other with different colors. I've based my code on discarding \addplot commands similar to this question, but even though I'm ...
1
vote
1answer
69 views

Table and Tikzpicture not displaying using this document class and paper style

How to modify the Latex code for the following table and tikzpicture so that the output will display properly using this document class. \documentclass[twoside]{article} \usepackage[sc]{mathpazo} % ...
3
votes
1answer
39 views

TikZ text not nicely vertically aligned

I use lines and text to clarify a TikZ figure. However if I use the same y-coordinate (in tthe example below 3) and offset (in this case 'above'), the text looks messy. How can I get the alignment ...
2
votes
0answers
59 views

please help me to draw this diagram bpmn

**please help me construction diagrams bpmn ** please help me construction diagrams bpmn %%% tikz-bpmn.sty %%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{tikz-bpmn}[2015/01/1 BPMN diagrams ...
5
votes
1answer
116 views

Drawing a circle and two of its tangent lines

I am trying to add some features to the plots of a circle between two of its tangent lines. The picture is a little "tight." I think that it would be appropriate to magnify it by a factor of 2. ...
2
votes
0answers
49 views

Draw a hemisphere (or just a segment of a sphere)?

Drawing a sphere is easy enough using the ball shading, or some more refined form as in How to draw a shaded sphere, but I would like a way to shade only one half (or even just slices). I currently ...
1
vote
0answers
35 views

How to construct block matrix with shadowed entries? [duplicate]

Is there a simple way of drawing matrices with shadowed blocks like the ones in the picture? I've tried something like Gonzalo Medina's proposal: %% with these packages loaded %% ...
0
votes
0answers
43 views

Is there a way to systematically ignore specific error messages?

When I compile my documents with a lot of trees, I often get the following error code: ! Dimension too large. <recently read> \pgf@xa l.1042 }} This error is due to some temporary ...
6
votes
1answer
116 views

Declaring sinc in tikz

I am trying to declare the sinc-function for usage in tikz. I tried two different ways: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{math} \begin{document} \begin{tikzpicture} ...
1
vote
2answers
78 views

Drawing an activation stack in LaTeX

I am trying to draw an activation stack. I am really bat at TikZ, so I hope you can help me out. As you can see, there are four boxes stacked one on top of the other. Each box has a name, put on ...
2
votes
1answer
23 views

Node syntax in matrix not working - possibly due to new version of Beamer/pgf

I am recycling some material from an old beamer presentation, and I find that code which used to compile just fine, no longer seems to work. I have replicated the problem in the code below, which ...
-1
votes
0answers
36 views

Draw 3D mobius band [duplicate]

How can I draw the following Diagram using tikz or any other way.
7
votes
3answers
100 views

Tikz: Placing a node relative to the (rectangular) coordinates of another

How do I place one node relative to the coordinates of another? In theory: \begin{tikzpicture} \node (source) {X}; \node (destn) {Y} at source.coordinates +(2,1); \end{tikzpicture} would ...
1
vote
0answers
48 views

TIKZ drawing 3-D gradient field

I know how to draw a gradient field in 2-D Here is the code \begin{tikzpicture} \begin{axis}[ title={$x \exp(-x^2-y^2)$ and its gradient}, domain=-2:2, view={0}{90}, axis ...
5
votes
2answers
72 views

Tikz: Latex macros in draw to [in=,out=] and point coordinates

I want to use latex macros in the calculation of the coordinates in a \draw command but that seems not to be possible if both the target point coordinates and [in=...,out=...] instructions involve ...
1
vote
1answer
51 views

The code below is not showing any output when run in Latex and the Latex file is not showing any error

\documentclass{amsart} %\documentclass[11pt]{article} \usepackage[dvips]{graphicx} \usepackage{amsmath} \usepackage{mathtools} \usepackage{caption} ...
0
votes
1answer
50 views

Redefine object inside a loop

In the following working example you can see a square consisting of 4 squared objects. I like to know how to define the compound square as a new command which I can use at next iteration inside the ...
5
votes
1answer
51 views

Build text path using “pic” from library “angles”

I am trying to do a polygon as bellow. But I am put the angle title manually as you can see in my code. Do you have any idea to do this in a smart manner? Here is my code: \documentclass{article} ...
4
votes
1answer
68 views

Why does “fill opacity” affect nodes in the same path?

With the following code \documentclass[border=3mm,tikz]{standalone} \begin{document} \begin{tikzpicture} \draw[fill=brown] (0,0) rectangle ++(1,1) node[above right]{B}; \draw[fill=brown, fill ...
0
votes
2answers
39 views

Axes in tikz, figure shows but there is a compiling error

I have the following code to draw four axes: \begin{tikzpicture} \draw (-3,0) -- (3,0) node[below]; \draw[shift={(0,0)}] (0pt,2pt) -- (0pt,-2pt) node[below]; \draw (0,-3) -- (0,3) node[left]; ...
6
votes
1answer
71 views

Getting PGFplot to align \draw commands between plots

I am trying to use pgfplots to add slope triangles to several plots on the same axis which look like the following: I thought I was in luck to see parts of this process explained specifically in ...
4
votes
1answer
43 views

Having trouble with Tikz and Beamer

So I am trying to insert a functioning tikz image into a beamer project and it keeps giving me an error. \documentclass{beamer} \usetheme{Warsaw} \usepackage{tikz} ...
1
vote
0answers
44 views

Macro passing problem with pgfmath

As a continuation of thread 2010/2014 versions difference: I am trying to decorate program listings with highlighted lines, numbered balls, etc. In 2010, I used a macro which does not work any more ...
3
votes
1answer
124 views

Stylized earnings curve and fill in between them

It's been so many days that I'm trying to create by the same way the curves of the figure below. My code so far: \documentclass[a4paper]{article} \usepackage[english,greek]{babel} \usepackage{ucs} ...
4
votes
1answer
105 views

Generating modular diagrams with TikZ

I am looking for a better way to create images like the following: I want to make diagram with blocks and ports (the things with Greek letters) so that I can do the following: Not have to space ...
3
votes
1answer
34 views

Setting end-points of arced arrow

I am trying to create a curved arrow that starts at one node, and ends at another. I tried to do this using the arc command, but the arc that gets drawn overlaps with the nodes it is supposed to ...
4
votes
3answers
209 views

How to draw an arc in Tikz that has gaps specifically placed in it

I was wondering how I could draw an arc in Tikz that has small gaps in it in a simple way, like this: Here is working example: \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
1answer
48 views

How to rotate a text line in Tikz

\begin{figure}[htp] \centering \begin{tikzpicture}[] \begin{axis}[xtick=\empty,ytick=\empty, ztick=\empty, legend style={at={(0.95,0.50)},anchor=north east}] \addplot3[no marks,red] ...
2
votes
1answer
67 views

Tikz variant of cancel to

I found this helpful to quelling my issue with the cancel packages arrows but displaymath seems to break it. The only part of the linked code I am using is \usepackage{tikz} \usepackage{relsize} ...
2
votes
1answer
83 views

Almost complete oriented graph in TikZ

I would like to illustrate properties of binary relation on a graph G(V,E), where V={a,b,c,d,e} and E={aa,ab,ac,bb,bc,bd…} Going through documentation and examples I tried several different ...
2
votes
0answers
34 views

Problem with monotony table [closed]

I'm writing in LaTeX a document on maths and I'm using tikz to produce a monotony table. So far so good , except for a slight problem. The code I'm using is the following: ...
5
votes
1answer
75 views

How to draw inside a TikZ node using node style with arguments?

The question is an extension to this question, and is also related to this one. I want to draw a Simulink-style sum block which is basically a circle node with a port in each direction (north, west, ...
2
votes
0answers
26 views

Using 3dplot package in lyx

I'm trying to get the following tikz code to run with LyX: http://www.texample.net/tikz/examples/the-3dplot-package/ My preamble contains: \usepackage{tikz} \usepackage{3dplot} \usepackage{pgfplots} ...
1
vote
1answer
29 views

Getting an error Package pgf Error

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{graphicx} \usetikzlibrary{shapes, arrows} \tikzstyle{startstop} = [rectangle, rounded corners, minimum width =3cm, ...