Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-pgf]

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.

0
votes
0answers
18 views

How to embed a multiple subplots inside another subfigure using grouplots

Could somebody please give me a hint of how can I do this using grouplots and tikz. I have done it using subfigure and \includegraphics, however, I am facing problems to arrange the borders of the ...
2
votes
1answer
19 views

How to determine nodes to reduce their length using `tikzpicture` environment

This is and addendum of a previous question: How to insert elective subjects section within a diagram. What I want I would like to reduce the length of those nodes that only have a single column of ...
2
votes
1answer
34 views

How to scale tikzpicture table?

I need to scale this table to smaller size, all together with color boxes. I was not able to do it with scale command. Any help? Thanks. \documentclass{IEEEtran} \usepackage[dvipsnames]{xcolor} \...
1
vote
1answer
36 views

Euclidean Distance

I have the need to draw this project on Tikz, I have some doubts and I can not begin.
1
vote
0answers
32 views

A mean to simulate a no-op in tikz?

I use data to fill in forms (lua string.format instruction) to build tikz commands such as "%s \\draw[->,%s,draw=%s,%s](%.3f,%.3f)%s(%.3f,%.3f)node[midway,anchor=base,%s]{%s};" But sometimes, I ...
0
votes
1answer
17 views

line break inside tikz node pin [duplicate]

How do I get the line break inside a pin node to work in TikZ? \node[pin={\angle+0.5*\percent*3.6:hi\\there}] at (120:3) {}; I tried align=center but didn't work as a typical node.
3
votes
1answer
43 views

Set aspect ratio on 2D pgfplots plot

I would like to set the aspect ratio of a pgfplots plots without explicitly specifying width and height (i.e., leaving them default). For 3D plots, there is plot box ratio; for 2D plots, I tried ...
5
votes
1answer
164 views

Better use of rounded corners with tikz on \draw[->]

I have this code: % !TeX encoding = UTF-8 \documentclass[utf8]{article} \usepackage{tikz} \usetikzlibrary{matrix} \usetikzlibrary{positioning} \newcommand{\multilinks}[3]{\foreach \noeud in {#1} {\...
-3
votes
1answer
92 views

Could anybody help me coding the graphic below? Any tips? [duplicate]

That is all I've got so far from marmot: \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{patterns} \definecolor{lazy}{RGB}{189,208,112} \begin{document} \begin{tikzpicture}[declare ...
3
votes
2answers
49 views

"Illegal unit of measure (pt inserted)” Problem with foreach

I'm trying to make a series of circles with gradients. On the second page, which is created, there is only /2pt/1pt/2pt and on the last /20pt. I guess there's something wrong with my foreach loop, but ...
1
vote
1answer
38 views

Tikz/pgfplots Reduce distance between Tick labels line break

I'm pretty desperate with a problem I have right now. I'm trying to create a lollipop plot that has different categories on the y-axis and occurrences on the x-axis. According to the below code. Note ...
0
votes
0answers
42 views

Embedded picture with separate coordinate system (Tikz)

Am using Tikz, and have a slightly complicated drawing. Now I want to replace a rectangle in a certain place with a more sophisticated shape. This shape I have in SVG format, and I want to replace the ...
1
vote
1answer
22 views

Tikz figure alignment with page margins

I am making some section divisions in a style sheet using tikz. However, even though I start drawing the line at (0,0) it has an offset from the actual page content border. I also set \parindent and ...
4
votes
2answers
43 views

Tikz: place node leftmost of two nodes of different widths

I have the following tikz picture: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \coordinate (origin) at (0,0) ; \...
6
votes
2answers
135 views

Comment Box for Substitution Method of Integrals

I want to make a comment box like the image below that adjusts in size as I write up different examples. My MWE is not much \documentclass{article} \usepackage{amsmath, mathtools,tikz} \begin{...
1
vote
2answers
33 views

Lines and axis labels in pgfplots

I have two questions about the code below: How can I put the dashed lines in the right place (that is, from (0, 2) to (3, 2) to (3, 0))? At the moment they are in the wrong place. How can I move the ...
11
votes
1answer
91 views

TikZ-decoration: control decoration amplitude along curve

Working with path decorations based on this solution provided by marmot I am searching for a possibility to change the decorations amplitude along the graph. Having this plot applying the mentioned ...
2
votes
1answer
45 views

Labeling points on a plane

I have two points in a plane, both depending on several parameters. The coordinates of them shall fall within the range [0,1], i.e. within the red square: I would like to draw these points for many ...
6
votes
2answers
158 views

Matrix using tikz package

I am working on my dissertation and I have no idea how I should do this in LaTeX. And the shading definitely is challenging. I have only been able to do this so far, I am still an amateur at it. \...
7
votes
1answer
64 views

TikZ node shape depends on inside text

In one of my previous answers, my first proposal \documentclass[tikz]{standalone} \usetikzlibrary{quotes,angles} \begin{document} \begin{tikzpicture} \draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(...
2
votes
1answer
67 views

How to fill the area between n intersecting points in TikZ

Given two shapes, which are intersecting, how can we fill the area common to them in TikZ (i.e. the area between their intersecting points). Here, the even odd rule might not work as it is not ...
2
votes
2answers
139 views

A collection of the actual smartphones

Considering the recent excellent questions that I've really enjoyed Welcoming 2019 Pi day: How to draw the letter π? and What has been your most complicated TikZ drawing? I have carefully observed ...
0
votes
1answer
31 views

Remove asymptote of a function

I'm trying to draw the functions y=(0.05*0.4+0.1*2*x)/(0.05+0.1*2) and x=-0.1/(2*30*(y - 0.1))+y, by using tikz as follows \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \...
1
vote
1answer
76 views

Tikz picture of two mathematical functions

I'm trying to draw the functions y=(0.05*0.4+0.1*2*x)/(0.05+0.1*2) and x=-0.1/(2*10*(y - 0.1))+y, by using tikz as follows \begin{tikzpicture} \begin{axis}[xmin=0,xmax=1,ymin=0,ymax=1, samples=1000, ...
5
votes
1answer
698 views

A diagram about partial derivatives of f(x,y)

How can I draw this image using TikZ?
3
votes
0answers
76 views

How to animate that project

Update#1 I have now tried another approach in order to get the solution. In another file animation.tex I have now made every single step, saved it as PDF and let it play over my main.tex file. ...
7
votes
1answer
2k views

How to plot polar formed complex numbers?

I would like to draw the figure below in LaTeX and am having a bit of a difficulty. How can I do it? %\usepackage[dvips,pdftex]{graphicx} \documentclass[a4paper,12pt]{article}% \usepackage{amsmath} \...
2
votes
1answer
38 views

How to change the rotation of the angle with tikz

I have the following code: \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{calc,patterns,angles,quotes} \begin{document} \begin{figure} \begin{tikzpicture}[scale=1] \node (x1) at (0, 0,...
3
votes
1answer
52 views

Tikz diagrams and node placements

I'm designing a diagram for a 1-D potential well. I'm struggling to correctly place my a label below the right hand line. I resorted to drawing an invisible line and positioning the node at the end. ...
3
votes
0answers
31 views

How to define new anchor border in new shapes with tikz-pgf

I'm trying to build a libray of symbols by means of defining new shapes in pgf-tikz. To be honest, it's being a enormous task for me because I don't understand lot of things of code to do it. ...
1
vote
1answer
155 views

Draw saving money pig (Piggy Bank)

I use LaTeX, Texmaker and \documentclass{article} Related question: Welcoming 2019 Lunar New Year: How to draw a (lovely) pig? I want to draw saving money pig with TikZ. Please see image Thanks so ...
0
votes
1answer
33 views

Replicating the precise positioning of labels for axes on a pgfplots diagram

I have the graphs of |x| + |y| = 6 and y = x - 2, and y = x + 2 on separate Cartesian planes. One is drawn with pgfplots and the other is drawn with only TikZ. I like the position of the labels for ...
1
vote
1answer
26 views

Spurious space from \tdplotsetmaincoords

The MWE below results is spurious space due to the use of \tdplotsetmaincoords: The red is the bounding box and the gray box is from \fbox{}. Including an \unskip\unskip (commented out in the MWE) ...
3
votes
1answer
56 views

What is the domain in a tikz parametric plot?

I don't understand what's going on here. If the domain of the parametric parameter \t is 0:100, then the function sin(2pi*t) should oscillate about 100 times, but it only oscillates a couple. What am ...
-1
votes
0answers
58 views

How to draw the following diagram in Latex [on hold]

I was trying to draw the following diagram in Latex I don't have any idea how to draw. I have to draw similar pictures in my presentation. Also, please suggest me some softwares other than Tikz where ...
3
votes
1answer
47 views

Intersection of a circle and a line “path” (II)

Following this answer, would it also be possible to have similar styles to find the intersection point(s) for cases where the circle is defined in terms of (1) three points; (2) a point and a center? ...
4
votes
1answer
61 views

How to annotate and shade a matrix

I am trying to draw a dynamic programming matrix. My attempt so far is: \documentclass[]{article} \begin{document} \begin{tabular}{c||c|ccccc|cccccccccc} &&1&1&1&1&1&...
4
votes
1answer
38 views

Tikz regular polygon corner names

The following code gives No shape named S.corner 1 is known. error. What am I doing wrong? \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{angles} \usetikzlibrary{shapes} \usetikzlibrary{...
2
votes
1answer
42 views

Drawing step functions

How would I represent a one dimensional potential step such as the one shown in the attached figure? I've managed to get as far as defining my x and y axis but I'm not sure how to draw the function ...
8
votes
1answer
259 views

Increase thickness of graph lines larger than ultra thick

I have a beamer presentation with some pgfplots graphs and want to increase their thickness. I found this answer How to increase the thickness of the graph lines and remove the point?, but I found ...
3
votes
2answers
144 views

4 tikzpictures in a 2x2 layout

\documentclass{article} \usepackage{pgfplots} \usetikzlibrary{fit,shapes,positioning} \begin{document} \begin{tikzpicture}[ mydot/.style={ circle, fill, inner sep=2pt }, >=latex, ...
4
votes
0answers
58 views

End Tick Mark Not Showing in Tikz Image

I'm trying to create an empty box for my students to draw their own box-and-whiskers plot on an assignment: \documentclass{article} \usepackage{pgfplots} \begin{document} \centerline{ \resizebox{...
8
votes
2answers
85 views

Colouring of intersection of four circles with TikZ

I want to selectively fill intersection of four circles as shown below. I was able to make some of the intersections correctly but not able to figure out how to make the remaining ones. Here is the ...
0
votes
1answer
51 views

Tikz - Drawing fully connected neural network vertically

I want to reproduce the following image but vertically and with 1 input neuron: Is it possible to draw this vertically?
1
vote
0answers
33 views

Combine fill and pattern in a pgfplot boxplot?

Is it possible to combine a pattern with a background color in Pgfplot boxplot? \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \usetikzlibrary{...
7
votes
3answers
370 views

Plot a function of two variables equal 0

I would like to plot the function x2(1 − x2) − y2 = 0 in LaTeX. I tried running following code \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[utf8]{inputenc} \...
5
votes
1answer
68 views

Tikz: Copy segment length

Is it possible to have a macro which uses the length between to points to calculate another calculate, as in the following example: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \...
3
votes
2answers
299 views

Draw arrow on sides of triangle

MWE: \documentclass[12pt]{article} \usepackage{pgf} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \draw [line width=1pt] (0,5)-- (0,0); \draw [line width=...
63
votes
22answers
7k views

Welcoming 2019 Pi day: How to draw the letter π?

First of all: don't forget that exactly 140 years ago, Albert Einstein was born; but exactly one year ago, Stephen William Hawking passed away. What a special day for science! Question How to ...
1
vote
0answers
13 views

Setting label in newcommand via a pgfkey [closed]

I'm attempting to set a label in a macro(?) I created with a new command. I'm passing several values to the command in the first argument via pgfkeys, but the \label macro is just using the literal ...