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
0answers
7 views

Pgfplot: Zoom in to predefined plot

I have one figure with two plots where one is zooming into the other. I am trying to have pgfplot show the following arrow with the highlighted area where the second image is zooming in: The figure ...
1
vote
1answer
31 views

Draw a circular node with a sine cirve in it to resemble the symbol a short sine wave

How can I do this in TikZ: I want to draw a circular node with a sine curve in it to resemble the symbol of a short sine wave like in the diagram shown in the link below. I can draw a circle but I ...
3
votes
0answers
29 views

getting confused with pgf

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east, legend style={draw=none} ] \addplot[forget plot,cyan,domain=0.001:8] {abs(log10(x))}; ...
4
votes
1answer
100 views

How do I make solid headers?

I am trying to replicate the formatting of a certain standardized test. It looks a little bit like this: I'm going to try memoir and tikz a little bit today, but I was wondering if there is an easy ...
1
vote
1answer
59 views

Linear regression on modified datas

I would like to create a linear regression on modified data. My raw data is on a file called data.dat like that : x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 If I do something like the code below, I get the ...
1
vote
1answer
28 views

clear me the doubt in positioning legend option

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east ] \addplot[cyan,domain=0.001:8] {abs(log10(x))}; \addplot[red!70!black,domain=-2:4] ...
1
vote
1answer
49 views

Normal distribution with discrete histogram inscribed

How can I produce the following image with tikz? I have seen the codes for plotting the normal curve, but how to get the rectangular shapes inscribed right at their centers? The red is not so ...
2
votes
0answers
22 views

PGFPlots polaraxis axis labels are swapped (or in the wrong place)

I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place. When using the polar axis; x coordinate is the angle (azimuth, phi) y ...
3
votes
2answers
30 views

Code Error From Geogebra for Tikz

I try many changes in this code, but I don't see the error. Can someone help me? \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} ...
1
vote
2answers
40 views

An error using “Positioning” package to place the titles of a hexagon and a pentagon

In the following tikzpicture environment, I have a hexagon and a pentagon aligned along their horizontal axes of symmetry. (In the hexagon, the vertex A is furthest to the right, the vertex B is the ...
1
vote
1answer
76 views

Typesetting a title on a tikzpicture (Version 2)

I have two very similar-looking polygons in different TikZ environments. Each polygon is symmetric across a horizontal line. I want to put them in one TikZ environment with the axes of symmetry ...
3
votes
2answers
326 views

Help me in drawing log(x) curve

\documentclass[addpoints]{exam} \usepackage{tikz} \usepgflibrary{arrows} \begin{document} \begin{questions}\usepgflibrary{arrows} \question Draw the graph of $f(x)=|\log x|$. Solution: ...
1
vote
1answer
31 views

I get problems when I use the same tikzmark label in every slide

Inorder for my tikzmark to be displayed properly, I need not to use different names for each tikzmark. It troublesome to keep track of the names, is there a work around this problem. In the below ...
0
votes
0answers
29 views

Error when compiling using tikzmath

I am trying to learn how to use Tikz and its library Tikzmath to make graphics. I am trying to practice by drawing a series of circles along a line. My code is as follows: ...
2
votes
2answers
51 views

tkz-kiviat : increase label length and get the right legend

I want to draw a spider/kiviat diagram. I am using the tkz-kiviat library but I have some problems. Here is my MWE \documentclass[xcolor={dvipsnames}]{beamer} \usetheme{Warsaw} ...
0
votes
0answers
24 views

Drawing solids made up of identical unit cubes [duplicate]

I need to draw some solid figures that are made up of unit cubes so that some pair can be fitted together to make cuboid or cubes.
4
votes
2answers
45 views

Translating a node style from tikz to tikz-cd

I'd like to switch from tikz to tikz-cd to draw diagrams of arrows (I just started practicing, so I don't know much), and I can't figure out how to translate the following node style: ...
9
votes
1answer
99 views

Parameters in a caption

I have a simple figure with a code like this: \begin {figure}[htbp] \centering % \begin{tikzpicture} [scale=1] \def \r {1/4} % y-scaling % % PARAMET. \def \a {1} %x^6 \def \b {-6} ...
5
votes
1answer
152 views

How to draw a series of simple circle packing illustrations, possibly with Tikz?

For an industrial problem, I would like to be able to draw a series of layouts of the cross section of multistrand electrical wires. These can be simplified by packing in a circular envelope a given ...
0
votes
1answer
46 views

Drawing and labeling the axes for the Cartesian plane

Nothing exciting here. I only have code to display the coordinate axes. I have a file in which displays of various functions are plotted on the Cartesian plane and displays of a pair of intersecting ...
3
votes
1answer
67 views

Custom Beamer theme does not arrange stuff as I expect

I am creating my own Beamer theme (let me call it mytheme in this thread) and currently working on title page. First I put the code shown below in beamerinnerthememytheme.sty, which is loaded by ...
2
votes
1answer
24 views

Overshooting axis arrows strange behaviour with tikzexternalize

I would like to use the following code to create a plot with a horizontal gridline and axis arrows which overshoots this gridline (like here). However due to the line \tikzexternalize[shell ...
2
votes
2answers
67 views

Telling to TikZ continue the previously-drawn path with a line-to operation?

This question seems quite simple, so I feel a bit sheepish about asking it, but I've spent quite a while scouring both this site and the manual without any success, so here goes... I found that ...
3
votes
1answer
66 views

Drawing and labeling angles in an axis environment

I am curious about the misinterpretation of TikZ commands to draw and label an angle in an axis environment. If, in the following code, I have $\theta$ drawn using the commands, \draw[draw=blue] (A) ...
3
votes
1answer
62 views

tikpicture moves location with every compilation

I am using TikZ to draw arrows or position figures. My code has three slides. TikZ worked fine with the first two, but with the last, the image moves with every compilation. I suspect the reason is in ...
1
vote
0answers
34 views

Package pgfkeys Error: I do not know the key '/tikz/patch/.pic' and I am goin g to ignore it

I get the following error while compiling: ! Package pgfkeys Error: I do not know the key '/tikz/patch/.pic' and I am going to ignore it. Perhaps you misspelled it. I'm using tex live with update ...
4
votes
5answers
202 views

Drawing and Labeling a Triangle for a Demonstration of the Double-Angle Formula of Cosines

I have a display of two triangles, but the triangle drawn in red is unintentional. TikZ is misinterpreting the coordinates for point C. The polar coordinates for C is given as \coordinate (C) at ...
3
votes
1answer
33 views

StrChar causes error when used inside tikzpicture

The following TikZ code attempts to make a graph by drawing vertices 1 through 6, then drawing edges from the list. The edges are formatted as 12, 23, etc., so the command StrChar from package xstring ...
3
votes
1answer
56 views

Below=of is not understood for tikz positioning

I am trying to use TikZ, but relative positioning of the nodes is not being understood. I am using the MacTex installation that I downloaded today. This code is copied from the TikZ manual, but ...
2
votes
3answers
99 views

To draw a hierarchy tree diagram

i am new to latex. how can i make a hierarchy tree diagram as shown below?
7
votes
0answers
55 views

TikZ: suspend drawing for part of a path

This is something very basic that I've often been slightly annoyed with when using Tikz, mostly since I think I've seen that it is possible somewhere before and I'm annoyed with myself for not ...
1
vote
1answer
35 views

Adding an equation to a graphical model created with tikz

I am using tikz. I have a graphical model and I want to add equations as explanations to the side. Just like in Thanks for your help! \documentclass{article} \usepackage{tikz} ...
2
votes
1answer
34 views

How to place a section heading inside tikz figure using titlesec and the runin option

I am currently workin on a big tikz figure and I want to place a section heading inside a box, which leads to a problem. A minimal example is here: \documentclass{article} \usepackage[T1]{fontenc} ...
2
votes
1answer
28 views

Weird whitespace occurs using \drawbeam in pst-optexp

In my drawing using pst-optexp, I found weird whitespace occured when using \drawbeam, \pstVerb and tx@addDict together. Here are the minimum reproduction codes for my claim: ...
1
vote
1answer
45 views

Background color of legend in graphics made with tikzpicture/pgfplots

I'm using tikzpicture and pgfplots to make graphics. And, I'm wanting a beamer presentation with black font and white writing. When I'm plotting the graph, the legend box is just a white box and I ...
0
votes
1answer
57 views

Changing font size of a text along path

I'm trying to put a text in a ring section. I found here an example that perfectly fits my needs: How draw part of ring or broken ring in TikZ? The problem with it is that when I change text size, ...
2
votes
3answers
89 views

TikZ rotating coordinate problem

I am trying to rotate point (B0) by 90 degrees ccw around (A1) and then loop it to get (B\k) and (A\k). What am I doing wrong? \documentclass[tikz]{standalone} \begin{document} ...
1
vote
2answers
146 views

How to draw these (indifference) curves in TikZ

I would like to reproduce the following plots but I have no idea how to do this. Does anyone of you know how to draw these curves in PGF/TikZ (or in any other suited way)?
2
votes
1answer
188 views

Draw Shadow to a plan

I want to draw something like this picture: As the shadow is curved, i decided to draw a trapezium and then draw a shadow on it. The problem is i want the coordinates of the trapezium corners. here ...
2
votes
1answer
57 views

doubt in drawing graph

I have generated the tikz codes from geogebra... \documentclass[12pt,a4paper]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \begin{document} \definecolor{qqqqff}{rgb}{0,0,1} ...
0
votes
0answers
25 views

How to keep dimensions and textbox positions of .fig when using matlab2tikz?

I have a Matlab figure (.fig) presenting some data points and different textboxs (among other elements). I would like to keep the .fig dimensions as well as the location of every element when ...
4
votes
1answer
111 views

How can I draw these patterns in another way?

I used Geogbra to draw this pattern of multiple squares. Then, I exported the figure as TikZ code. The generated code is the following: \documentclass[12pt]{standalone} \usepackage{pgf,tikz} ...
3
votes
1answer
47 views

Showing legend for boxplot in pgfplots

I am trying to display a legend for a boxplot created in pgfplots. However the size of the legend is almost as large as the plot and covers up all of my plot, how do I fix this? ...
10
votes
3answers
219 views

Drawing the three altitudes of a triangle with TikZ; incorrect orthocenter

You probably know that if you draw all three altitudes of a triangle, they will meet at a single point, the orthocenter. I'm trying to draw a picture that shows the intersecting altitudes with TikZ ...
4
votes
1answer
52 views

Minor grid in pgfplot not showing when specifying ticks manualy

Firstly I would like a minor tick between every major tick in my pgfplots graph (and minor grids). I wrote minor tick num=1 but it doesn't work. I am not using a logarithmic axis so it is unrelated to ...
5
votes
1answer
66 views

Use \foreach in non-Tikz context

I want to create my own footnote-command for floating environments: %begin figure bla\myFootnote{XXX} blabla\myFootnote{YYY} blabla\myFootnote{ZZZ} %end figure some text \printSavedFootnotes The ...
2
votes
1answer
150 views

Many body perturbation diagrams (closed Feynman diagrams) in latex with labelling

I would like to draw many body Feynman diagrams using latex. These are closed and often used in condensed matter and nuclear physics in contrast to the open scattering diagrams in particle physics. ...
6
votes
1answer
159 views

How can I correctly align the nodes of this TikZ picture?

I have the following TikZ picture: and I would like to have my nodes aligned in the way indicated in red. How can this be done? What I have so far is pretty messy and I don’t see how to achieve ...
5
votes
1answer
109 views

drawing complex dependency diagrams with tikz / forest

I want to draw the following Word Grammar diagram with tikz/forest: I am a great fan of forestand would like to have a style for such graphs, but I think this is non-trivial/impossible for this type ...
2
votes
1answer
39 views

Runaway argument in pgfmodulshapes.code.tex

While trying to compile the file: \documentclass[11pt]{article} \usepackage[active,textmath]{preview} \usepackage{amsmath} \usepackage{chemfig} \usepackage{amsfonts,amssymb} \pagestyle{empty} ...