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
33 views

“And” keyword gets attached to preceding argument, gets misread by TikZ

In the TikZ code of my tex file, I have a line \path[draw=cyan] (\xOne+\xTwo+\xThree,2*\yOne+\yTwo+\yThree) ellipse (\xThree and \yOne); which triggers the following error during compilation : ...
2
votes
1answer
37 views

TikZ takes two pages to display empty output

The simple .tex file below produces a three-page PDF with TexShop (I'm using the latest version on my Mac), the two first of which are blank and the third contains the "Normal text here" part. What ...
38
votes
1answer
592 views

How does PGF/TikZ work?

How has it been possible to develop a huge vector graphics package, PGF/TikZ, entirely within the TeX language? Exactly how is it working under the hood? Which techniques and TeX primitives does it ...
0
votes
0answers
33 views

How to overwrite a node setting in Tikz to align Tikz pictures to nodes? [duplicate]

A Tikz picture has four nodes and each node has a new tikz picture, an inheritance problem coming. I have four Tikz pictures where each is inside a node and each node has size of 4cm times 4cm (square)...
1
vote
2answers
132 views

How to create Simplical complexes of Betti Diagrams in Tikz?

I want to learn to create Betti diagrams and their simplical complexes such as where I need to learn to align the text properly (see Trial 1) and where I need to learn coloring surfaces and add ...
5
votes
2answers
134 views

How to draw a down arrow inside a table?

I want to draw a \downarrow (or any arrow) inside my table. The table is as shown in the one below: And I want to to be more like this: And this is the code I have: $\rotatebox[origin=c]{90}{}%...
3
votes
0answers
36 views

Badly aligned tikz objects and bad page-break in deluxetable

I am creating a table in latex, and I need to use a deluxetable environment. I use the package tikz to draw some circles in the table. The problem I am having is that I want to reposition those ...
4
votes
1answer
69 views

Smooth the junction between lines

I would like to make this tikz picture fancier. First of all, is it possible to smooth the junction between the different parts of the graph, for istance between the half circle and the line? Then,...
2
votes
1answer
26 views

How to make the texts below the image in the sidebar of beamer?

the is a simple demo of beamer: \documentclass{beamer} \usepackage{tikz,graphicx} \title{Title} \author{My name} \institute{My institute} \useoutertheme[right,height=0pt,width=0.12\paperwidth]{...
3
votes
2answers
92 views

Tikz and variables

I have defined two variables \def\aa{3} \def\bb{1} \def\qq{\multiply\aa by \bb} but when I try to use \qq in a \matrix command like \matrix[matrix of math nodes]{12 & \qq\\}; ktikz says: ...
3
votes
0answers
45 views

Fill pgfplot bars with colorbrewer

I want to use colorbrewer in my project since it provides color cycle lists but I struggle to use them in the right way I think. Please have a look at my MWE: \documentclass{article} \usepackage{...
3
votes
2answers
57 views

arrows=pgf in mhchem with TeXLive 2016

After updating to TeXLive 2016 (MacTeX 2016), I have trouble with TeX files previously correctly compiled under TeXLive 2015. Namely, using \usepackage[version=4, arrows=pgf]{mhchem} gives the error : ...
1
vote
1answer
34 views

How to declare a tikz “directory” or group of keys

In the mwe below, I declare a key /tikz/my key/radius, and I set up /tikz/my key so that using my key={radius=50pt} works. This is a common pattern, for example decorate, decoration={lots of options ...
0
votes
0answers
63 views

Drawing Cylinders and Spheres

Would it be possible to generate this diagram in Latex?
2
votes
1answer
60 views

Highlight the label with in the node

I am new in tikz,I am manually create an image,In that figure coloured part shows that highlight the label how I do this by tikz I am using the following code for the label, How alter this code. \...
4
votes
1answer
38 views

“append after command” in a tree (child path operation)

Related: Problem with "append after command" and "insert path", but I did not understand how to apply the solutions there in my case. I'm defining a simple tikz style which uses ...
5
votes
1answer
52 views

How to draw a horizontal line that spans the width of the picture, behind all elements

I'm trying to copy this image: And this is what I have so far (spacing is different but it's ok): All I need to do is add the horizontal line at the middle of the figure, at depth 2, behind all ...
6
votes
0answers
50 views

OS-dependent, bad rendering when embedding transparent images

I'm having a pretty strange problem with embedding a PDF image with some transparency in my Ph.D. thesis. I'm using the memoir document class, and compiling with pdflatex, although I have confirmed ...
3
votes
1answer
79 views

Are tikz and fancyheadings incompatible?

I've been using the package fancyheadings to have a footer that reads "page 2 of 3" and such, which was working fine until I added the package tikz to draw some figures. Now the footer doesn't show up ...
3
votes
1answer
71 views

tikz in table with right colored arrows and xshift and y shift

I have the following code as can be seen below the images. The output I have now is like the first image below. I want the output to be as in the image below with blue and red arrows in the middle. ...
1
vote
1answer
46 views

Problems with Mol2chemfig code

I have to include organic molecules into a report and for that reason I wanted to use chemfig. After having installed the package I tested it with one of the first lines of code in the documentation: \...
4
votes
3answers
152 views

Tikz picture inline

Is there any way of placing a tikzpicture code inline? Here is what I want to actuall achieve: A convex function is denoted by "tikz code for convexity" Someone told me this is possible. Also, ...
1
vote
0answers
35 views

Fillbetween not displaying when compiled

Below is a minimal example of a script which reads in data from a file and then fills in the region defined by the plot below the x axis and the x axis itself. The input file can be found here: http:/...
9
votes
1answer
101 views

How can I draw my own parametrized shapes?

I would like to create some nodes having a parametrized shape to create some schematic vehicles shown in the picture below. The picture shows a hierachical representation of a vehicle chassis platform....
7
votes
1answer
220 views

Draw Text in different shapes

I'm trying to draw text in shapes (using scaling and path). I want text to show up like this: I've tried a lot of different methods, but I'm having trouble doing so. I can get close to it using ...
4
votes
1answer
50 views

How to align dancers font chars within a TiKZ table

I want to draw a TikZ table with two columns, the left column contains letters from A to Z and right column the corresponding dancer. The code I use is: \documentclass[a4paper, 12pt,landscape]{...
3
votes
1answer
58 views

Axes pointing in both directions and positioning axes labels (Tikz). AD-AS Diagram

I would like to reproduce a graph like this one but I don't know how to make the axis as in the picture. Does anyone know how to? An similar example that doesn't have axis pointing both ways is: % ...
6
votes
0answers
62 views

Xelatex, and strange textcolor behavior in tikz

Here is a minimal working example: \documentclass{beamer} \usepackage{tikz} \setbeamercolor{background canvas}{bg=black} \setbeamercolor{normal text}{fg=white} \begin{document} \begin{frame} \...
4
votes
1answer
71 views

Draw nodes with tikz above each other

How can I draw nodes horizontally listed next to each other but with two nodes vertically listed as in the figure. MWE: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{...
0
votes
0answers
60 views

How to install TikZ on WordPress?

How to install TikZ on WordPress? I would like to use pgfplots in my WordPress site. I have LaTeX plugin activated. I presumed that if I exported TikZ code from GeoGebra and put it in my WordPress ...
1
vote
1answer
37 views

Draw lines with labels in the middle

Something confuses me when I draw a line with some label in the middle. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) -- node[below] {a} ++ (4,0); \end{...
4
votes
1answer
66 views

define color in pgfplots

I want to plot funtions and data with own colors using \definecolor{<name>}{<model>}{<value(s)>}. If I use this command in \tikzpicture it works. But if I use this command in ...
1
vote
0answers
15 views

Setting fontsize dynamically at runtime in matlab2tikz

I'm using the following matlab2tikz command to convert a Matlab plot into tikz: cleanfigure; matlab2tikz('test.tikz', 'height', '\figureheight', 'width', '\figurewidth', 'showInfo', false, 'strict', ...
3
votes
1answer
26 views

Result of Catchfile doesn't work inside a tikzpicture environment [duplicate]

This is a follow-up to this question. I am trying to get points to be graphed using data from an external file. The vertical coordinates are countries, and the horizontal ones are years. For this to ...
1
vote
0answers
41 views

Dimension too large when changing y axis mode

I am using tikz to plot a figure in x-y plane, however when I change the y axis mod to logarithmic scale, I face to an error "Dimension too large". I searched in this website, but there were the same ...
7
votes
1answer
152 views

How can I get a stacked bar with single values and sum on the side

Based on this question I was able to put partial and total values on my bar plot. My bars have some really small values though and it is impossible to fit the numbers in some ranges. I would like to ...
2
votes
1answer
53 views

Remove upper part in an image

I am new in tikz, I didn't want the red boxed part in the below image, I am using the following code. How I change my code ? \documentclass{standalone} \usepackage{mathtools} \usepackage{pgfplots} \...
3
votes
2answers
82 views

How to connect two rectangles, or alternatively, how to make nodes wider and longer than the text

I'm trying to translate a graphic in a book, and I need to connect some rectangles to do so. Here's what I have so far: As you can see, the position of the arrow is not pleasant looking because the ...
3
votes
0answers
37 views

comma separated decimal numbers in pgf-pie

can anyone tell me what to redefine (if it is possible) in pgf-pie package (https://www.ctan.org/pkg/pgf-pie) if I want it to typeset decimal numbers separated by commas, not by periods? \...
1
vote
0answers
14 views

How to keep my tikzpicture in the same page [duplicate]

I am using latex with 2 columns text format. I have a tikzpicture that moves to the next page once I create it. I do not know how to keep it within the same page and prevent it from moving to the next ...
3
votes
0answers
62 views

Remove most bottom space of tabular (or tikz-picture?)

I'm trying to add a table-like structure left of a ganttchart. It appeared to me that labeling every bar with its own tabular of fixed column-width would be the easiest and I got quite close to what I ...
2
votes
1answer
30 views

How can I scale my mindmap down in beamer?

I am trying to scale my mindmap tikzpicture down in beamer, but I am unable to reduce the size of the circle in the middle. \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{mindmap} \...
5
votes
1answer
96 views

How to rotate a circle around two axes?

I am trying to rotate a circle around two axes. The circle should be placed perpendicular to the red vector. Code: \documentclass[a4paper]{article} \usepackage{tikz} \begin{document} \begin{...
6
votes
1answer
85 views

How to rotate the box

How to rotate the box? How to change the above grid to the below shown grid I used this code to rotate \draw[step=1, red,thin,rotate=30] (-1cm,-1cm) grid (1cm,1cm); but i don't wan't to ...
2
votes
2answers
54 views

tikz: create a time-summary arrow with text

I have a doubt on the following request: I would like to obtain something like the picture attached. I tried a sort of "for" loop strategy, but it did not work. here is the code: \documentclass{...
1
vote
0answers
39 views

How to rotate grid only / prevent the rotation of grid

I am beginner in tikz. I am using the following code so that the grid also rotating how I prevent the rotation of grid / how I rotate grid by 0 . \begin{scope} [xshift=15 ,yshift=0, rotate=30] \...
6
votes
2answers
185 views

How to fill the space between two \draw lines

I am drawing two lines and I need to fill the space between them with a green color. How can I do that in tikz? \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{patterns} \begin{...
1
vote
0answers
38 views

How can I make an implicit graph using pgfplots?

My function is $(0.8x)^2+(y-(0.8x)^\frac{2}{3})^2=0.64)$; After googling, I came up with the following codes, but they don't seem to work. \begin{tikzpicture} \begin{axis}[xmax=1,ymax=1, samples=...
5
votes
1answer
48 views

Some modification in TikZ: insert text/math right to the figure

Following the question and answer in this question I tried to modify the code for my needs. I was able to do so, although I still have a problem. My code is: \documentclass{beamer} \usepackage{tikz} ...
5
votes
1answer
201 views

How to draw a sloping grid?

Could you help me make the code to draw a sloped gride like the image below in TikZ?