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)

3
votes
1answer
113 views

How to draw lettering on tile or ceramic in LaTeX

I know that LaTeX is able to do incredible things. I want to know how to achieve something like this: I need to draw an oval placard such as: But I have not idea how to do it. I'm not asking for ...
2
votes
2answers
80 views

TikZ: How to spread out nodes/shapes FBD?

Basically I'm trying to make a free body diagram with one main diagram and 2 separate force diagrams for ease of viewing and analysis. However, the two separate ones keep on overlapping on top of the ...
4
votes
3answers
221 views

drawing arrows on curves and shading regions in TikZ

I need to draw the following figure in my latex using TikZ. I did the following: \begin{tikzpicture} \draw (-2,0) -- (2,0); \draw (0,-2) -- (0,2); \draw (0,0) circle (1cm); \draw (1,-.3) node[right] ...
2
votes
1answer
70 views

How to change the following graph?

I have the following tikz picture I created: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[auto=left,every node/.style={circle,thick,minimum size=5pt}] \draw node ...
3
votes
1answer
71 views

pgfplots - How can I set all the default line widths / thickness values to a certain value?

Upon discussion and examining a few printouts (by my own printer) of some pages of a document, I decided to try and change the line widths to another default value, e.g. semithick (a little increase ...
1
vote
0answers
67 views

Cube root function

TikZ seems to graph the cube root function with the code provided - on the positive x-axis. Why isn't TikZ plotting the whole graph? \documentclass[10pt]{amsart} \usepackage{tikz} ...
3
votes
2answers
132 views

Problem in TikZ with fancy contour around a chapter title

\documentclass[11pt]{book} %\usepackage{estructuraLibro} \usepackage[utf8]{inputenc} % Required for including letters with accents \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs ...
5
votes
1answer
95 views

pgfmathparse inside tikz child doesn't work

Consider the following MWE: \documentclass{article} \usepackage{pgf, tikz} \begin{document} \begin{tikzpicture} \node {} child foreach \i in {1,2,3} {node {$\i$}}; \end{tikzpicture} \end{document} ...
3
votes
1answer
87 views

Differences between paths drawn between nodes and coordinates in tikz

Referencing this very helpful posts and the Tikz manual, which states: Whenever TikZ encounters a whole node name as a “coordinate,” it tries to “be smart” about the anchor that it should choose ...
8
votes
2answers
284 views

Vector field on a ball

I am not very skilled with Tikz. I am trying to picture two kinds of vector fields on the sphere $S^2$ in $\mathbb{R}^3$ using the Tikzpicture package. One going from left to right ($X(x_1, x_2, x_3) ...
3
votes
1answer
117 views

Tikz - code suggestion?

Tikz: I would like to draw a figure in optics, a laser. See image. Can anybody help me? Any suggestion for code? Here's the MWE: \begin{figure}[htb] \centering % ...
1
vote
1answer
52 views

How can one drawing a mirror image of an inductor in TikZ?

I want to draw the mirror image of an inductor in TikZ so that if the devices is drawn horizontally then the bumps are on the lower side rather than the upper side. Does someone have an idea of how ...
3
votes
1answer
53 views

Combining surface plot, explicit colour and legends in pgfplots

This question is a result of this one. I would like to make a surface plot using tikz/pgfplots using explicit colour and including legends. Is this possible? I have gone through the entire manual for ...
6
votes
1answer
88 views

Nesting fractal tikz decorations

I am trying to come up with some code to allow the use of a decoration (for example the Koch snowflake from decorations.fractals) where you provide a single parameter to determine how many times to ...
4
votes
1answer
63 views

pgfplots: extending a regression line beyond the tables points

How can I extend a regression line made in pgfplots? I would like to extend the line to just shy of the top of plot boundary and just above the bottom of the plot boundary. ...
5
votes
1answer
133 views

How can I put text in squares?

How can I put text in squares? Please see my code: \definecolor{MainRed}{rgb}{.6, .1, .1} \def\bigrectangle{(-7,-1) rectangle (6.5,4.7)} \def\firstrectangle{(-9,0) rectangle (-5,4)} ...
2
votes
2answers
76 views

How to elongate the branches attached to one specific node?

I'd like to make longer only two immediate branches attached to the VP node (red ones in the picture) without altering the height of the other branches above and below. Any idea? Thanks! ...
2
votes
2answers
93 views

Getting pictures from TikZiT to LaTeX and seeing them in PDF format

I'm using TikZiT(see link) to draw graphs with nods and edges. How to translate that picture to pdf version of my LaTeX document if possible. There is a code below picture in TikZiT which I copy ...
0
votes
0answers
108 views

define an IC like NAND gate

Using PGF package (\pgfdeclareshape command), How can I define the "NAND gate" (IEC format)? I'd like to have "number of inputs" an an option (just like the real NAND gate). In fact, I'd like to use ...
11
votes
2answers
289 views

How to make “This page intentionally left blank.” in KOMA script

This question is sequel to question How do I make pages which were "intentionally left blank"? The accepted solution there \documentclass[openright]{scrbook} \newcommand*{\blankpage}{% ...
6
votes
2answers
99 views

Specific .tikz file cannot be input in LaTeX

I have created this surface plot in Matlab and use the wonderful program Matlab2tikz to export it to LaTeX. It generates me a .tikz file and when I try to use it I get an error. I have found out! ...
4
votes
1answer
48 views

label arrow at midpoint in tikz

In tikzcd I know of the 'description' qualifier which places the node with a white background on top of and in the middle of the arrow. How can this best be achieved in tikz?
3
votes
2answers
99 views

Aligning subfigures in a 2x3 grid with tikz

I have a number of plots obtained with matlab2tikz. Now I want to align these plot in a neat way. I used the subfigure package, but the result is not aligned very nice, see My latex code is: ...
4
votes
2answers
161 views

Drawing a Cube with Tikz/PgfPlots Looks Stretched along X-Axis

I'm trying to draw a cubic structure (fcc crystal structure) with Tikz. I'm using pgfplots' axis cs function for the 3D projection. But the result looks like a rectangle stretched along the x axis. ...
2
votes
1answer
104 views

Background colors with mdframed: is this behavior normal?

Introduction With the help of this answer, I tried to define a semi-transparent background for a theorem-like environment. Here is my solution: \documentclass{article} ...
3
votes
1answer
128 views

What is the right choice of coordinates for a given TikZ picture?

The way I’ve programmed in TikZ so far (but maybe I have been missing something), I have never heard of ways to tell TikZ where to put the origin of the coordinate system on the printed page. But ...
3
votes
1answer
87 views

Zoom in as \spy does to produce very huge characters in TikZ

Is there a way to output "very big" (many times larger than \Huge) characters in a TikZ picture ? Toying with an example file from http://www.texample.net/, I was able to produce some piece of code ...
4
votes
2answers
178 views

TikZ: incrementing a foreach loop

I am working on plotting a random vector (X, Y) in the plane where X and Y are defined as a roll of the die and X is die1 plus die2 and Y is die1 minus die2. I am having trouble setting up a foreach ...
7
votes
1answer
70 views

Pgfplots: styling the grid properly

I have to draw a grid with coordinates and lines. I was going to do this manually with TikZ, but it seems like pgfplots might be the cleaner way to go. Right now this is what I have with pure TikZ ...
3
votes
0answers
49 views

Bug in PGF data visualization's scaling mapper?

Take a look at the trivial use of PGF data visualization below, \begin{tikzpicture} \datavisualization [ scientific axes, visualize as scatter, all axes=label ] data [format = ...
3
votes
1answer
55 views

pgfplots: bar plots and xticklabels display

I have a bar plot and I would like to set x labels but when I do so, the x-axis is not appropriate: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
43 views

Wrong \href anchor location

I use hyperref and pgf packages. I need pgf to include and position an image: \pgfputat{\pgfxy(-0.2, -2.4)}{ \pgfbox[left,base]{ \includegraphics[width=0.19\textwidth]{\@universitylogo} ...
1
vote
0answers
89 views

How can I customize this chapter heading like so?

I want to add the word chapitre (french for chapter) on top of the grey rectangle, as in the image below. How can I do that?
1
vote
1answer
36 views

Trouble combining translation with plot coordinates

I have a piece of TikZ code that works fine until I try to rewrite some parts of it so as to make it more customizable, by defining some points as translates of others. When I start doing that, part ...
2
votes
0answers
61 views

Tikz Sphere without using Shade

I am using following graphic in my beamer slides I use evince pdf viewer and I find that the pdf displays very slowly. When I click for next page, it appears around 15-20 seconds later. I have a ...
4
votes
1answer
97 views

A tree with complicated nodes as each child in tikz

Trying to make a tree where each child is a set of nodes that can be created separately and then linked somehow in to different positions in a tree. Lets say I have a group of nodes and edges such as ...
7
votes
1answer
124 views

How to obtain a custom arrow tip in TikZ

I wonder if it is possible to obtain exactly the following arrow tip with TikZ-PGF? I have searched all possible solutions in the PGF manual and in this site but only near ones are available. Here are ...
5
votes
2answers
125 views

Small tikz decorated arrow between words inside a tikz node

Effectively, what I want to do is very simple but I am not sure where to go. I have several nodes of the following form \node (1) at (0,0) {text1 $\rightarrow$ text2}; \node (2) at (0,2) {text2 ...
4
votes
2answers
172 views

Latex Binomial tree (space and overlapping)

I encounter the following problem: I want to fit a (vertical) binomial tree but the siblings from the third level overlap (no matter how I adjust the distances they either overlap with each other or ...
6
votes
1answer
92 views

Draw partially dashed vector using decoration

This question is sequel to this question Dash pattern that starts with space The idea is how to draw a vector that is, say 50% full line and 50% dashed line. percusse suggested this solution ...
6
votes
2answers
201 views

Plotting a distribution with tikz package

I'm trying to generate a plot of a censored Gamma distribution. I've managed to make the plot of the Gamma-pdf and reference the censoring point, but I'm failing to suppress anything beyond it. In ...
1
vote
0answers
77 views

Forms and graphs

I am trying to write a document for my students to practice on quadratic functions. Using a form, the student can enter the coefficients of the quadratic functions and is then given the discriminant ...
0
votes
0answers
86 views

Gear or cogwheel tikz graphic

I found the code that permits the design of a gear. But what I want is to be able to Control the distance between teeth so I can increase their numbers. Fill each tooth with different colour. Be ...
5
votes
1answer
81 views

Unintended line thickness variation with pgfplots

I admit that I may be abusing pgfplots somewhat, but I want to add a plot of a function into a tikz-picture in a certain way. I have now managed to get this to run, I'm just wondering why the line ...
4
votes
1answer
105 views

Specify the length of the arrow in TikZ

This should be an easy one. Instead of specifying where the start and finish of the arrow should be, I want to specify how long the arrow should be. It might sound like the same thing, but when you ...
7
votes
1answer
133 views

Concentric Cylinders with tikz

I am trying to draw two concentric cylinders with tikz to show the change in volume with respect to radius, while the height remains fixed. The left ilustration below is the first drawing, where the ...
3
votes
1answer
56 views

Displaying a portion of tikz picture

Using the answer here, I was able to draw a hexagonal grid. I would like to display only a circular region (centered at the origin) of this lattice, similarly to what was done in this question, but ...
5
votes
1answer
82 views

confine heading in tikz node using titleformat

I'm using a quite fancy style for my chapter heading, i.e. \documentclass[12pt,open=left]{scrbook} \usepackage{tikz} \usepackage{pgfplots} \usepackage{titlesec} \usepackage{titletoc} ...
5
votes
1answer
105 views

Setting minimum size for tikz node using default unit length

I have two node styles with a minimum size set to 7mm and they look perfect: \begin{tikzpicture} \tikzstyle{style1} = [circle,draw,fill=white,minimum size=7mm,font=\Large]; ...
6
votes
1answer
356 views

Feature (bug?) of dots notation in foreach-statement

I want to draw something in tikz where the range of an inner loop depends on an outer loop (by construction of the math involved). I need to differentiate between even and odd number in the inner ...