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)

5
votes
1answer
476 views

How to eliminate spacing in tikzpicture?

It seems that, when using Tikz, nodes and/or the tikzpicture environment add space around a drawing. An example is shown in the following MWE, where a simple square is drawn three times. First it is ...
1
vote
1answer
840 views

Disable “clip” and “use as bounding box” in TikZ

Problem I use a tool which generates TikZ-Code (R with tikzDevice, to be precise). But the generated picture has a wide white border which I want to remove. When I manually (or with a script) remove ...
10
votes
2answers
2k views

Is it possible to load a TikZ library locally?

Is it possible to load a TikZ library and make it local to a tikzpicture? I'm writing a long document, and feel like the different TikZ libraries required for different diagrams are "littering" the ...
4
votes
2answers
1k views

Displayed Math in tikz-cd diagrams

I have been using tikz-cd package to produce diagrams however I'm not finding a way to use displayed math within it. My point is that when I use the product sign for instance inside of it, it simply ...
0
votes
1answer
417 views

How to get horizonzal alignment right for nested rectangles?

I know that nesting tikz pictures is considered bad, but I did it anyway as I don't want to mess around with manual positioning. I'm nesting several rectangles similar to another question for circles. ...
9
votes
1answer
439 views

Setting weekend background color

I'm making a calendar in LaTeX with tikz-pgf and I would like to set to gray the background color for the weekend. In the examples I found on the Internet and in the documentation, I can see how to ...
3
votes
1answer
282 views

TikZ arrow tip is displaced

My quetion is twofold: 1) I want to have a timeline graph with some intervalls. This is my code: \draw[->|] (8,5)--(10,5); \node[] (sh4) at (9.5,5.5){$s^{\text{h}}_{4}$}; \draw[|<-] (10,5)--(...
15
votes
1answer
240 views

Is there a nag package for TikZ?

It turns out that I've been using several deprecated commands, such as \tikzstyle and right of. Is there any way to have TikZ or pdfLaTeX warn in those cases, such as nag does?
6
votes
1answer
497 views

Adding a normal vector to a curved mesh area

How can I put a normal vector on the outer blue mesh? TeXample \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{amsmath} \usetikzlibrary{arrows} \usepackage{...
6
votes
2answers
663 views

TikZ matrix decoration

What I'm trying to achieve is a code structure to draw this kind of diagram: I need to decorate a two-rows matrix grouping one or more columns with a square bracket above them, and then again with ...
2
votes
1answer
2k views

opacity and shading of an ellipse

I am making a picture of the tidal force effects on the Earth. My current picture is decent but I would like where the bulging occurs on the edges to be little bit darker in blue, but I don't want ...
5
votes
2answers
604 views

How to use declared TikZ functions in \foreach condition?

How is it possible to use a declare function in the condition of \foreach? Here's my MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[declare function={a = 0; b = ...
7
votes
1answer
598 views

How to shade a line and how to offset a line?

Newbie here. Could anyone tell me how to (1) shade a line and (2) how to offset a line? I have a very simple graph, This is a mesh used in finite element analysis, I have already used tikz to build ...
3
votes
1answer
436 views

Automated table for excercise points in tikz

I'm a computer science student. And I write most of my excercises in LaTeX. So I often have to create a table for excercise points, with different numbers of excercises and different amounts of points ...
12
votes
1answer
839 views

How to draw an unbalanced curly brace in TikZ?

How can I draw curly braces where the "pinch" is not in the middle of brace, i.e. one of the "legs" is longer than the other, using TikZ?
5
votes
1answer
3k views

Adding coordinates to grid in tikz

Is there a simple way to add coordinate (left and bottom) to the grid in tikz?
0
votes
0answers
40 views

How to draw \leadsto line? [duplicate]

I wish to replace straight line with the \leadsto line. I tried \draw[leadsto] (s2)--(s3); however it can not work. Below is my code \documentclass[tikz]{standalone} \usepackage{tikz} \begin{...
9
votes
1answer
2k views

How to make a zero-size node?

How can I make a node with zero size and node distance, such that a node that is positioned to the right of it lies on the same spot? My solution to the first node in a node-drawing loop was to start ...
3
votes
1answer
110 views

How to refer to the corner of a node?

Is there a node suffix for the corners of a node? I'd like the brace in this example to go from the lower-left corner of the first box to the lower-right corner of the last. \documentclass{...
2
votes
0answers
31 views

node at sloped path and/or not respecting every path/.style [duplicate]

I'm producing a schematic Nyquist plot, and I want to create an arc between the x-axis and a straight line, which should be denoted PM (phase margin). I use the intersections library to find the ...
17
votes
2answers
1k views

Creating a triangular table

Is there a way to create something that looks like this? I have looked at the \rotatebox command, but that will not get the same "jagged" edges on the bottom, and looked at How to draw a diagonally-...
2
votes
1answer
261 views

ray from the origin of a sphere to the radius

In my previous post shifting a sphere, I have two spheres which were lifted from texexamples.net On the left bottom side, there is a sphere with a ray from the center to the radius of the sphere. I ...
3
votes
1answer
355 views

Shifting a sphere in code from Texample.net

From Texamples - Stereographic and cylindrical map projections, I decided to use the first sphere. However, I want to setup two spheres. When I add another sphere, only the shaded circle shifts ...
3
votes
1answer
751 views

Equivalent of QTikZ for PSTricks

I have recently seen the very useful QTikZ program for interactive viewing of TikZ diagrams. I was wondering if a similar program exists for drawing PSTricks diagrams.
12
votes
5answers
662 views

Parsing hexadecimal numbers to binary and iterating over bits

I'm currently working on a software for an graphic display, so I recreated it in TikZ for documentation purposes: I currently use this to set individual pixels on the display: \setpixel{x}{y} ...
5
votes
1answer
257 views

Is possible to draw graphics with a function or any function?

Let us want to draw a function y=x^3(the first figue) and y=x^4(the second figure),, like graphics this following and i use Microsoft mathematics to draw it.
4
votes
0answers
288 views

Making a family of graphs in TikZ by a few definitions [closed]

I am trying to make in TikZ a family of graphs, as in included pictures. I can make them one by one, using nodes (circle/square/triangle, black/white) and joining them. However it seems to me, that ...
5
votes
1answer
978 views

How to draw a scheduling scheme?

I would like to draw an arbitration scheduling scheme. I tried to draw one with xfig, but the result is... not so nice ;-): Does anyone know a good way to draw this in LaTeX? The result don't have ...
4
votes
1answer
916 views

Vertical alignment of TikZ within text

I have a bit of TikZ in my text, namely: \documentclass[]{standalone} \usepackage{tikz} \begin{document} Some text (\tikz{\node[scale=0.5,solid,draw,thick,blue,rectangle,fill=white] {A};}), ...
5
votes
1answer
915 views

How to get text above fork style edges in a TikZ tree

I'm new to TikZ and have a problem with a decision tree. In the example below I would like to have text above the horizontal line of an edge. Something like: Check A | ...
7
votes
1answer
330 views

Error message with hobby package

I am trying to use the hobbypackage with this minimal example from the manual: \documentclass{article} \usepackage{tikz} \usetikzlibrary{hobby} \begin{document} \begin{tikzpicture}[scale=.5,use Hobby ...
1
vote
0answers
68 views

Draw a cone in TikZ [duplicate]

How could I do something like this in TikZ?
3
votes
1answer
339 views

Paragraph Spacing within a Tikz Environment

I am looking to replicate the look of paragraphs within a tikz environment (actually a minipage). \documentclass[letterpaper,12pt]{book} \usepackage{tikz} \usetikzlibrary{shapes,snakes,backgrounds,...
11
votes
4answers
1k views

Trapezium rule for integration using TikZ

I have problem to draw graphic with LaTeX (especially TikZ)? Like this:
2
votes
1answer
504 views

how to make mindmap nodes links within presentation

Wanting to make secondary and tertiary nodes links to other frames within presentation. A great example would be linking the mountain bicycle node to the frame titled "mountain bicycle". The code I ...
8
votes
2answers
857 views

how to make mindmap fit on frame?

I'm in the process of creating a Beamer presentation using some tikz concepts, how do I make a mindmap fit to the slide? My code is as follows: \documentclass[T]{beamer} \definecolor{links}{HTML}{...
5
votes
1answer
338 views

question about pgf-blur package in xelatex

Here is my code: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{shadows.blur} \begin{document} \tikzfading[name=fade down, top color=transparent!30, bottom color=...
6
votes
1answer
490 views

Create a Frequency Allocation Diagram

I need to reproduce a frequency allocation diagram in TeX. I prefer TikZ but open to PSTricks. I can create a simple bar allocation char using \node but unsure how to create layered blocks like the ...
9
votes
1answer
169 views

Where is the trailing space after TikZ node text gone?

I've been fiddling with TikZ nodes to get framed text (part of mdframed boxes, but that's beside the point) when I discovered something that puzzles me. If you run the code below: \documentclass{...
7
votes
2answers
3k views

How to elegantly create a pyramid hierarchy in tikz

I want to create a pyramid hierarchy in tikz with smooth sides (unlike this step-pyramid) and place text in each level. Shown below is how I am currently doing this, is there a better way? \...
3
votes
1answer
1k views

how to draw double circle nodes in tikz more clear?

I like the drawing final states in Peter Linz's Book, more clear than final states in tikz. can do it with apply an option in tikz, or other packages?
6
votes
2answers
1k views

How to make an image for backgrounds with exact A4 dimensions?

In order to make a background image that fits the page perfectly, I have tried two things. The first is to use a document class where the dimensions of the page can be set to that of A4, which ...
10
votes
1answer
2k views

Equal (=) sign within TikZ label

I was trying to use an equal sign within a TikZ picture as a subcaption of an inner TikZ picture for comparing two images. Here is my code: \documentclass{report} \usepackage{amsmath} \usepackage{...
2
votes
1answer
248 views

Multithread integral function executing picture

I need to make a picture that should look like I saw a similar question here but the red function line appears neither when I use --shell-escape nor when I use --enable-write18. I use TeXstudio, by ...
3
votes
3answers
572 views

Create an automaton with LaTeX [duplicate]

I want to create this automaton with LaTeX: The code: \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm, semithick] \node[initial,state] (A) {$1$} ; \node[state,...
7
votes
2answers
857 views

How to decrease the counter in tikz foreach loop

I have the following code: \documentclass[11pt]{article} \usepackage[a4paper]{geometry} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{positioning} \begin{...
4
votes
2answers
386 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 ...
4
votes
1answer
747 views

Combining diagonal table cell lines with minimum row clearance

So, yeah, it just never ends I guess. I'm fully aware that the following table is not exactly going to win an award for its stunning beauty no matter what. But the most important problem is that in ...
8
votes
1answer
1k views

TikZ data visualization - multiple plots in the same axis

I am trying to declare a new data format with the TikZ data visualization library for a custom data file format. The data files have a header section with Field name = Value followed by a blank line ...
3
votes
1answer
264 views

resizebox fails for tikzpicture when used in conjunction with listing package

Here is the example that fails \documentclass{standalone} \usepackage{tikz} \usepackage{float} \usepackage{listings} \usepackage{color} \usepackage{textcomp} \usetikzlibrary{shapes,positioning} \...