Tagged Questions

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)

10
votes
1answer
128 views

Draw closed section of sphere using pgfplots

I want to draw a section of a sphere to represent its volume. I have currently got the following: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} ...
4
votes
1answer
122 views

How is TikZ meant to be pronounced? “tiks”, “tikz” or “tik-zee”?

Disclaimer: I'm not sure this question is on topic on either the main site or the meta site, but the question itself is definitely "meta". Knuth writes about the canonical pronunciation of TeX at the ...
2
votes
1answer
37 views

TikZ and tikzorbital: bacground and caption fill width correspondence

Current question related with my other question, TikZ and tikzorbital: problem with background. In prevous question, the problem with layers has been decided: All I need is just fill rectangle ...
5
votes
2answers
174 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
5
votes
1answer
128 views

Macromize a tikzfigure

I have this figure (/ 2 figures) \documentclass{article} \usepackage{pgfplots} \usepackage{subcaption} \newcommand{\xfigscale}{.5} \newcommand{\yaxscale}{.75} \begin{document} \begin{figure} ...
4
votes
2answers
66 views

In tikz, is it possible to define a node and set its position later?

I'm trying to draw a diagram and my code is getting too cluttered and difficult to read. For code style purposes, is it possible to define a node in one place and mess with its positioning later? ...
3
votes
1answer
55 views

Passing parameters to \pgfdeclaredecoration

The idea was creating decoration that draws half full half dashed vector. Based on percusse's suggestion I wrote the following MWE: \documentclass{standalone} \usepackage{tikz} \begin{document} ...
5
votes
2answers
80 views

TikZ: define center of a picture

I have a TikZ picture which I want to include as a centered figure in my LaTeX document. However, the "centering" I am trying to achieve is somewhat special and best explained by the image below: ...
4
votes
2answers
81 views

Multiple Arrows on Lines

I have been trying to draw a diagram that looks a little bit like the MWE below shows; as the title suggests, I'm wanting to place labeled arrows (only two labels: a or b) indicating a direction in ...
8
votes
1answer
137 views

Arrows in tables, or matrices

I have been experimenting with LaTeX for a couple of years now, but still consider myself a neophyte. I spent much of yesterday trying to create a table. I am trying to create a table with three ...
1
vote
5answers
78 views

Rectangle between midpoints of rotated rectangles

I need to draw a rectangle between the midpoints of two rotated rectangles (shown below). How do I do this? My current code is shown below. Current code \draw[thick] (0,0) -- (6,0); ...
3
votes
1answer
57 views

Label on vector - tikz

I have a line segment and a vector which is orthogonal to it. I would to add a label to the vector, e.g., x or y. Is it possible to do this via a parameter to the below code? \documentclass{article} ...
-1
votes
0answers
63 views

Which software is the best one to draw iterative curves? [closed]

Which is the best software in Linux Mint to draw iterative curves like $f(x)=x^{n}$?
4
votes
0answers
66 views

tikz: draw a piece of a path between given coordinates

I have a path in my application that I want to split up in smaller paths. These, I would like to draw with a label attached to them. Take the following image as an example: The upper arc is split ...
2
votes
1answer
34 views

Rounded corner box in itemized environment

Here is the MWE: \documentclass{article} \usepackage{tikz} \newcommand{\rbox}[1]{ \begin{tikzpicture}[remember picture, overlay] \node[rounded corners=3pt, draw]{#1}; ...
8
votes
2answers
123 views

TikZ: draw lines connecting border of shapes

Being new to TikZ, I am trying to draw several (labeled) circles which are connected by lines. In its simplest form, I am doing this via \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
0answers
42 views

Making TeXworks use tikz package

I need to create a document (I am using TeXworks) that requires the following packages/libraries: \documentclass[spanish]{article} \usepackage[activeacute]{babel} \usepackage[utf8]{inputenc} ...
4
votes
1answer
115 views

Can I instruct the Forest nodes to be at a certain level?

The MWE below is a machine-generated organizational chart. It works almost fine, except for those employees, who report to more than one supervisor. I had to add regular TikZ nodes and draw the ...
2
votes
1answer
76 views

Generating Picture

I'm trying to generate the picture that I created on Geogebra in Tikz code. The picture came as luck as I was playing with some functions. Now, I'm using the following code to produce the picture on ...
0
votes
0answers
65 views

Draw figures in tikzpicture (covering spaces and liftings)

I need help to draw these two pictures, in two different tikzpictures. I would really appreciate if someone could help!
1
vote
0answers
39 views

How to group box plots in pgf / tikz?

Grouping bar charts is easily done using pgf / tikz, e.g., \begin{tikzpicture} \begin{axis}[ width = 0.85*\textwidth, height = 4cm, major x tick style = transparent, ...
3
votes
0answers
41 views

Node size in graph with pgf 3.0

I want to draw some graphs with pgf 3.0, but the size of the nodes are not being taken into account when laying out the graph using spring layouts. Here is an example document: ...
6
votes
1answer
110 views

TikZ: Make stealth decoration follow arc

In this MWE \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[path/.append style={ decoration={ markings, ...
4
votes
2answers
113 views

Draw cosine and sine function with periods 1?

I want to draw $\sin(2\pi x) and $\cos 2 \pi x$ $\in [3/4, 5/4]$ in the same coordinate system. How do I do this ? \begin{tikzpicture} \begin{axis}[domain=3/4:5/4,legend pos=outer north east] ...
4
votes
1answer
75 views

Invoke gnuplot through pgfplots to get a matrixplot

I have a code which gets two parameters and depending on them the code has different runtimes what I want to illustrate in a matrix plot. I'm writing the thesis in LaTeX the obvious method for me, ...
-1
votes
0answers
59 views

Figure plot using pgfplots

Please help me code this figure in LaTeX. I am a beginner in LaTeX.
5
votes
1answer
105 views

Shape missing using pic in TikZ

Why the shape (sB) is unknown in the following code ? How to avoid this ? \documentclass[]{standalone} \usepackage{tikz,xparse} \usetikzlibrary{calc} \tikzset{pics/.cd, % Marque croix ...
3
votes
1answer
64 views

tikz: Different styles across a line

I need to have a line partially dotted. I have accomplished it with an horizontal line, by inserting a node to delete that part of the line and then drawing a new line. However, for bended lines I ...
4
votes
1answer
98 views

Include TikZ element inside tikzpicture

I'm making a graphic representation of the results in a competition. Each team has gotten points in five different categories, and I want them represented in a bar per team, two sets of points above ...
5
votes
1answer
96 views

Add circle to Smith chart using PGF

I'm using the Smithchart library with PGF/TikZ, and I'm trying to add a simple circle in the middle of the chart. However, the circle is plotted using the "smithchart coordinate system" so it looks ...
1
vote
1answer
44 views

Tikz nodes with `fit=(top)(bottom)` slightly missized

I like to create textboxes via TikZ. I start with that flexible example. And, Yes :) I do create texboxes. Here it is. But I still have two problems.. Q1 I use fit to create light gray ...
4
votes
5answers
150 views

Dependence graph with TikZ

im trying to do some like this with tikz: I try to do it like \begin{tikzpicture}[every node/.style={draw,thick, align=justify, % Blocksatz in Noden anchor=north% Anker der child node für ...
0
votes
0answers
25 views

Tikz graphs side by side [duplicate]

I have written following code to put the two tikz graphs side by side but I didn't succeed. Can some help me out. \begin{figure} \begin{subfigure}[b]{0.32\linewidth} \centering ...
4
votes
3answers
198 views

Draw a rectangle with rounded ends in TikZ

I want to draw some round-ended rectangles to use as labels, so I thought a filled arc either end would work (silly me :-) \draw [fill](0,0) arc[radius=5pt,start angle= 90,end angle=270]; \draw ...
2
votes
0answers
55 views

tikz-3dplot, geodesics and adressing endpoints in polar coordinates

I am trying to draw geodesics on a sphere. While many approaches, like for example this one, i am more interested in another way. If i specify two points, say qand p on the Sphere, i would like to ...
1
vote
1answer
74 views

Drawing curves on an arc with tikz

Im not really adept at drawing with tikz, could anyone help me with a specific diagram? i need a circle or an ellipsoid with two curves on it that do not intersect. Something like picture included ...
4
votes
1answer
101 views

Slide number limit when using a progress bar?

I have been using the code for a progress bar given by @GonzaloMedina in this post for a nice progress bar. This code is customizable and gives very nice progress bars I find. However, I realized that ...
3
votes
2answers
93 views

Colouring one side of a rectangle defined by \draw

I create a rectangle like this: \draw (2,2) -- (2,4) -- (6,4) -- (6,2) -- (2,2); I would like to give the red colour to the side defined by points (2,2) and (2,4). I tried doing \draw [red] (2,2) ...
3
votes
1answer
68 views

Problem with plotting 3d plot in Latex, I have a sample Matlab plot

I have a Matlab plot shown below which I want to replicate in Latex. The data for Matlab is: i_whole=[ 0 0 0 0 0 3.7000 3.8000 3.8000 4.2000 3.7000 ...
2
votes
1answer
133 views

How to draw a cone with descriptions on it?

beamer I would like to draw a cone in particular, with two descriptions like this: I'm using beamer enviroment. I would like to know a code to allow do it. Curved lines can be replaced by arrow or ...
2
votes
2answers
67 views

Tikz intersection of lines with unnamed points?

This works: \draw (0,0) coordinate (A); \draw (1,1) coordinate (B); \draw (1,0) coordinate (C); \draw (0,1) coordinate (D); \coordinate (X) at (intersection of A--B and C--D); but this doesn't: ...
5
votes
1answer
76 views

Drawing bonds between atoms with pgfplots

I'm trying to draw a molecule using pgfplots. I have successfully drawn the atoms with the code below: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage{tikz} ...
5
votes
1answer
43 views

Enable a default static frame for incompatible browsers with the animate package

I am working on a document where I want to embed animations using the animate package. A minimal compilable example of such would be the following: \documentclass{article} \usepackage{pgfplots} ...
6
votes
3answers
94 views

Vertical text changes scaling?

I've been looking for some hours for a solution to my problem and I've to admit that I really don't understand how to solve it. I drew a node with vertical text and a line going from this to a box. ...
7
votes
4answers
203 views

Macros/encapsulation in TIKZ

I'm considering starting to use TIKZ, and trying to figure out if it will do what I want, and how. I have a large document with many pictures of Bezier curves. For each of these, I'd like to draw the ...
3
votes
2answers
345 views

How can I fill the ring like this picture?

I want to fill a ring like this picture With Geogebra, I tried it by plot 4<=x^2+y^2<=9and this is the code in Geogebra \documentclass[12pt]{standalone} \usepackage{pgf,tikz} ...
18
votes
2answers
283 views

Insulation hatch

In civil engineering insulation hatch looks like this: I did all the math to re-create such hatch and I attach MWE below. \documentclass{standalone} \usepackage{tikz} \begin{document} ...
4
votes
1answer
62 views

How can I get the TikZ calc library to calculate some point coordinates correctly?

I have used the code shown below to draw a static CMOS inverter. I have tried to use the TikZ library calc to calculate the point at which drains of the PMOS and the NMOS devices meet; and the ...
6
votes
1answer
90 views

How draw from an intersection down to x axes?

Based on How to draw in pgfplot until intersection with plot line? I have come up with this: \documentclass{memoir} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{intersections, calc} ...
5
votes
1answer
83 views

How to draw in pgfplot until intersection with plot line?

I am trying to draw an arrow from the left side of my diagram and until it intersects with the plot. However I get this error message: ! Package pgf Error: No shape named intersection-1 is known. ...