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)

1
vote
1answer
205 views

Packages needed for Latex from sagemath

I'm trying to export sagemath graphs using these commands: sage: M = Matrix ([ [0, 1, 1], [1, 0, 1], [1, 1, 0] ]) sage: # (the order is the number of edges) sage: G = Graph(M); G.order() sage: ...
6
votes
1answer
414 views

Problems with \pgfplotstableread and relative paths

I have this folder structure in my project: main.tex mystyle.sty tex mytex.tex img myimg.tex dat mydat.dat And the following files: main.tex: \documentclass{scrartcl} \usepackage{mystyle} ...
1
vote
1answer
179 views

How to create a Labeled Hierarchy using Tikz?

how would I create something like this? Is this tikz? What is the most user-friendly tutorial to starting tikz?
5
votes
1answer
197 views

tikz diamond node white space

I wonder how I can remove the white space between the diamond node and the link in the following MWE. \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{positioning,shapes,arrows} ...
6
votes
1answer
311 views

TikZ: showing a plane moving in 3 space

I have 2 identical planes a distance of \Delta t apart. I want to show that first plane is being pushed in the direction of the second plane. I was thinking maybe some randomly placed arrows tangent ...
6
votes
2answers
237 views

positioning of a matrix bigger than margins

A document I'm working on has a table that was complicated enough for me to try and make it using a pgf matrix of nodes. However, the resulting matrix ended up being slightly too big for the page. ...
6
votes
1answer
270 views

Different marker at specific intervals using pgfplots

I have a number of large data files with x rows in the range of 0 to z. Is there an easy way to set a different marker at specific intervals using pgfplots/TikZ? How can I produce a figure such that ...
5
votes
1answer
149 views

Alter font used for every pin in a plot

In some scatter plots I'm producing, I want to label each point using a pin. I achieve that by adding \node elements after the \addplot but within the axis environment, and using the pin property: ...
8
votes
1answer
491 views

Why does a tikz spy specified as a chamfered rectangle show up as a simple rectangle?

I'd like to use a tikz spy shaped like a chamfered rectangle. The code runs without complaining, but the result is a plain rectangle. "rounded rectangle" works as expected, as does ...
10
votes
1answer
422 views

TikZ- best practice for line starting on a circle's edge?

I'd like to know how I can achieve the best seamless crossover between a node (in this case, a circle) and a line starting on that node. I would like the line to only touch the circle's edge. So far I ...
3
votes
1answer
862 views

Drawing selected borders of a node [duplicate]

Is there a way to draw only selected borders of a node? The node shape I have in mind is rectangle. The \node[draw]... syntax draws all four borders of the node. But what if I want to draw only the ...
4
votes
1answer
230 views

Add a gaussian curve in a specific location in a tikz diagram

I'd like to put a gaussian curve in a specific location in a diagram I am creating with tikz. I found the question Bell Curve/Gaussian Function in TikZ/PGF, and I can use this to add the gaussian ...
0
votes
1answer
180 views

Problems with xelatex and arc in tikz

When I use \setdefaultlanguage{thai} and arc command, output not smooth. How to set my XeLaTeX code? I think this ploblem about thai scale, or not. \documentclass{article} \usepackage{polyglossia} ...
10
votes
2answers
284 views

Drawing an envelope in tikz

How could I define and evelope shape like for example this one in Tikz? If possible it would be great it there was an option to write inside the upper triangle (and so the shape should be able to ...
8
votes
1answer
629 views

TikZ nested rectangle split with rounded corners

Using TikZ, I want to create a nested rectangle split, with rounded corners, that looks like this: The question that most closely resembles this problem is Nested rectangles , however the proposed ...
5
votes
0answers
259 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
4
votes
1answer
915 views

Changing text color for charts using pgf-pie

Is possible to change text color inside pie chart using the pgf-pie package? Is possible change the color of text on a single slice of the pie? \documentclass[tikz]{standalone} \usepackage{pgf-pie} ...
4
votes
0answers
103 views

How to randomly display a word from a list of words (a random student's name of my class)? [duplicate]

Last year, I came up with a solution to randomly display the names of my students in a presentation using the package tikz. Unfortunately, I'm not a LaTeX guru, and it's far from perfect: ...
1
vote
1answer
527 views

How to draw the four conic sections

How to draw the four of geometry of conic sections from TikZ, circle parabola ellipse and hyperbola. I want 3D bi-cones figure like this:conic sections for my student in analytic geometry.
1
vote
1answer
229 views

Combine tikz external with pgf layers to “split up” a huge tikzpicture?

I have a huge tikz picture (consisting of up to several 10k elements, mostly rectangles and arrows) and want to "split up" the file using externalization to avoid expanding tex's main memory size (or ...
6
votes
1answer
3k views

\addplot and \draw

I generated some pgf/tikz code with Geogebra with good result \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \draw[->,color=black] (-6.72,0) -- (7.8,0); ...
2
votes
1answer
347 views

Circuitikz Current Source

I'd like to know if it is possible to place a current source that looks like the following:
1
vote
1answer
104 views

vertical alignment of 3 columns with different content

I'm using the linguistic avm library along with tikz and I am trying to put a \leftrightarrow vertically centered between the attribute-value matrix and the tikz image. Thanks in advance for any ...
2
votes
1answer
406 views

absolute position changing in TikZ environments

I am working on slides in beamer with a modified version of the Torino theme. When drawing with TikZ, the absolute positioning seems to not work as expected. In particular, when I have two tikzpicture ...
7
votes
1answer
2k views

How to overbrace / underbrace in text mode (using TikZ?)

I want to create something that somewhat looks like this: I know about \overbrace but that only applies to math mode. I couldn't find an \overbrace for text. And while I probably could use math ...
7
votes
2answers
230 views

TiKZ node name prefixes in scopes

I am using TiKZ to draw two copies of the same graph above each other, and now I want to add edges between a vertex in one copy and a vertex in the other copy. It suddenly occurred to me that it would ...
3
votes
1answer
125 views

Matrixcells problem with the y-axis only

I observe a strange behavior with matrixcells.dtx by @AndrewStacey. The cells give me a complete tiling but when some rows are taller than average the tiling is shifted (see pictures and example ...
6
votes
1answer
206 views

Wrong scaling in xyz coordinate systems

As stated in the Manual in section 10.2.1 "the default z-vector points to (-sqrt(2), -sqrt(2)). But when I draw: \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
5answers
376 views

Draw a picture of primes ideal lying over a prime ideal

Let $K$ be a number field and $L$ be a finite extension of $K$. Then, let $\mathfrak{p}$ be a prime in $K$ and $\mathfrak{P}$ be a prime lying over $\mathfrak{p}$. I would like to draw the following ...
5
votes
1answer
106 views

empty space under the drawing

this is my tikz code: \usepackage{tikz, tikz-3dplot} \begin{figure}[ht!] \centering \tdplotsetmaincoords{45}{110} \begin{tikzpicture}[scale=8, tdplot_main_coords] ...
0
votes
0answers
57 views

Breaking line inside tikz node [duplicate]

I have the following code. I cannot for the life of me find a way to lay the table under the pink figure .. \documentclass{article} \usepackage[english]{babel} \usepackage{tikz} ...
7
votes
1answer
184 views

White space creeping in when I place a tikz picture inside another tikz picture

I'm trying to design a seating chart for my classroom. I've done this using pstricks. I wanted to try it in tikz. What I'm doing is drawing a rectangle to represent each desk. Since the desks ...
10
votes
2answers
133 views

If I have two nodes defined at the end points of a diagonal of a rectangle, how can I define nodes for the other two corners?

I have two nodes which I want to define to be opposite corners of a rectangle. I would like to be able to define nodes at the other pair of opposite corners. I tried the following, but it gives me ...
11
votes
1answer
182 views

Given four nodes forming a quadrilateral, how do I find the node at the intersection of the diagonals [duplicate]

I'm trying to find and name a node at the intersection of the diagonals of a quadrilateral formed by four other nodes. However, I'm not drawing a path. All I can seem to find in the tikz manual are ...
2
votes
1answer
82 views

How to set shape's size from another shape

I would like to set shape's size basing on the size of another shape produced by the fit environment. The MWE I use is the following: \documentclass{report} \usepackage[english]{babel} ...
1
vote
1answer
141 views

Global set node background

I know I can do this: \draw (5,0) node[above=3pt,fill=white,inner sep=0pt] {$5$} But I wonder if it is possible to set the 3pt, fill=white, and inner sep=0pt globally for every node in my document? ...
0
votes
1answer
60 views

How can I use linebreak inside \coordinate, in tikz? [duplicate]

well I need to write some text right next to my shape. But it's too complicated when making it all coordinate i and write it. How I make it easier?
2
votes
1answer
498 views

Tikz-Tree: Arrow-style depending on parent node

I have drawn a tree in tikz with different styles for nodes (this simplified example has nodes with style a or b). The arrows from nodes to childs are always the same and I would like to apply ...
1
vote
1answer
70 views

Easiest way to connect the center with a point on the circumference

I have to draw many figures like this: with different angles but not for pie charts. What is the easiest way to draw the lines from the center to the circumference? I searched a lot but only found ...
12
votes
3answers
367 views

Draw Polygonal Number Using PSTricks (or TikZ)

I would like to draw the following using PSTricks (or TikZ): (Found on http://i1.wp.com/mathandmultimedia.com/wp-content/uploads/2012/08/polygonal-numbers.png.) I can do it myself using an ...
5
votes
1answer
209 views

Scale position of circle but not radius

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \draw[help lines] (-3,-3) grid (3,3); \draw (-3,0)--(3,0) node[right] ...
4
votes
0answers
438 views

Changing Size of Arrows, Labels, Loops in Diagrams and Directed Graphs [closed]

Consider this MWE: \documentclass[12pt]{article} \usepackage{tkz-graph, tikz-cd} \usetikzlibrary{calc} \usetikzlibrary{decorations.markings} \begin{document} Blah ... blah. ...
3
votes
1answer
405 views

Matplotlib PGF images in subdirectory

I have a two-dimensional image plotted by Matplotlib using the PGF backend. It is stored in the figures subdirectory (since I have a lot of images and don't want to clutter up the main folder). As an ...
8
votes
1answer
2k views

Drawing control diagram in Latex

I am new to LaTeX and I am trying to draw a diagram similar to the one in the figure: This question was answered and the following is a code for similar diagram. \documentclass{standalone} ...
1
vote
0answers
45 views

Clip, but add arrowheads to end of clipped curve [duplicate]

I have the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \clip (-5,-5) rectangle (5,5); \draw[help lines] (-5,-5) grid (5,5); \draw[->] (-5,0) -- ...
5
votes
1answer
224 views

inkscape2tikz: exact text positioning

Take the following screenshot from Inkscape: where the "baseline" of strings Pa and pa are snapped to the black line. This is the LaTeX output once the graphic is converted with inkscape2tikz: As ...
6
votes
1answer
250 views

Colored box around enumerate labels

I want a colored box around enumerate labels. My actual code is this: \documentclass{article} \usepackage{tikz} \usepackage{enumitem} \newcommand{\fff}[1]{\tikz \node[ inner sep=1.5pt, ...
4
votes
2answers
477 views

Creating a digraph with formulas instead of nodes

I am looking to make a diagram with lines similar to this one: Labeling Edges in a Weighted Digraph But I am trying to have a mathematical formula, which is the label, instead of being above the dot ...
7
votes
1answer
142 views

Labeling the center of a closedcycle area

I have this figure: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \usepackage{kpfonts} \newcommand{\func}{ .00038*(x+8)*(x+6)*(x+3)*(x-1)*(x-6)*(x-8) } \pgfplotsset{ every x tick ...
4
votes
2answers
269 views

Help creating quite complex Tikz figure

I would like to creat the attached figure in Tikz. As i am quite new to tikz i do not know what to use and how to start. As it has some intricate lines and arrows. Any suggestion is welcome