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
1answer
41 views

Tikz \foreach to work with the aligned environment

I am trying to use the \foreach command to create something with the same effect as: \begin{align*} 1 \\ 2 \end{align*} The following code fails to work: \begin{align*} \foreach \x in {1,2} ...
2
votes
2answers
1k views

How to draw the following figure in Latex

\begin{center} \begin{tikzpicture}[scale=0.50, thick, acteur/.style={ circle, fill=black, thick, inner sep=2pt, minimum size=0.cm,scale=0.50 ...
3
votes
2answers
33 views

Pgfplot. Reduce intensity of an RGB color

I want to reduce the intensity of the fill in the graph. However, specifying !10 after the RGB color in the fill section, results in an error. I really need to use the RGB color, to be consistent with ...
0
votes
1answer
34 views

How to know the tikz working area coordinates in a beamer frame with header and footer?

In this example, slightly modified, the positionning of 'N' has been corrected with textheight to not be masked by the header: \documentclass[beamer]{beamerswitch} \usetheme{metropolis} \usepackage{...
4
votes
1answer
51 views

Curly braces along a circle arc

I have drawn the below given figure using tikzpicture. In this figure, I want to draw the curly brace in shape of a circular arc (bent) along the circle from -45° to 90°. This is needed to label the ...
3
votes
2answers
32 views

Problems placing tickzpictures below each other and centered

I have the following tickz pictures which are cuboids of different dimensions. \documentclass[tikz]{standalone}% \usepackage{pgf} \usetikzlibrary{arrows,automata,shapes.multipart,calc,decorations....
-2
votes
2answers
80 views

How can I draw a very simple diagram in Tikz?

I want to draw a diagram consisting of a dot and an arrow that start from above the dot, curls round in a loop and ends back to the right of the dot, like: However, I don't know Tikz well enough, and ...
0
votes
2answers
58 views

Using Tikz to draw PV cycles and diagrams?

I'm transcribing some physics notes and I was unsure how to transcribe this diagram of an Otto Cycle in Tikz. Any assistance would be greatly appreciated.
5
votes
2answers
652 views

Translating a shape 3 times: What is a smarter way to code?

The following code outputs a "C" shaped polyomino translated twice as shwon in the figure below. As can be seen from the code, I have written the same description for the polyomino 3 times. What I ...
0
votes
2answers
50 views

Commas in formatting: y-values

When I compile the following code with the whole Tex document, it prints comma. On the other hand, if I compile it in a new single document, it prints the periods. Do you know what may be causing ...
3
votes
1answer
37 views

Drawing two curves in the same plot with labels

Hello fellows and folks! I need to draw the following curve. Could you please give me a hand? I tried my best the other day but I had serious problems with the labels inside and outside the plot. ...
3
votes
1answer
65 views

How to use \ExplSyntaxOn and \ExplSyntaxOff inside tikzset?

If you place ExplSyntax on/off inside tikzset, code (that is expected to work) within ExplSyntax would generate errors. But if you bring ExplSyntax outside of tikzset (enclosing the tikzset), it makes ...
4
votes
1answer
61 views

Random Numbers and Variables in Latex

Below is my MWE. I understand the gist of tikz and foreachs, but when it comes to variables I don't understand most yet. I want an arrow pointing from each cell to a module, and them from the module ...
5
votes
2answers
134 views

Gaussian kernel density estimation with data from file

I am trying to draw a histogram next to a density function, both with data from a file. The histogram is already working: \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \begin{...
1
vote
1answer
21 views

Use data points from table to generate an untirupted line pgfplot

I have this figure: The continuous line is the gauss function plotted. I want to replace the function with my data points (which is the the red-dotted line) and look the same. Meaning having a ...
-1
votes
1answer
72 views

How to draw these boxes and arrows?

Is there a simple code for me to draw these? I do not possess the ability to understand latex code. Something like p1=[0,5] p2=[0,10] ... draw.box(p1=p1,p2=p2,...) draw.box(...) draw.arrow(...)
1
vote
1answer
29 views

Including external tikzpicture with preamble

I am using the standalone package which is awesome but I have a problem: I'd like to have a tikzpicture in an external file but with custom colors or something but when I include it in the main file ...
2
votes
1answer
49 views

TeX capacity exceeded when externalizing

I have several large TikZ plots I want to externalize. Without externalization, everything works fine. Document: \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} %\tikzexternalize ...
1
vote
1answer
33 views

Dimension too large error - tan graph

I have put a restriction on the y values but I still get a `dimension too large' error. Can anyone suggest how to prevent the error? \documentclass[12pt]{article} \usepackage{amsmath,amsthm,amssymb,...
2
votes
1answer
37 views

Clipped Circle Label In Triangle

I have a triangle which has a [clip] path that is used to create a circle that looks like a arc to show the angle. I need to label it with a node as $\theta$. How can I achieve this? The current code ...
5
votes
3answers
95 views

How can I fix the label locations on my tikzcd diagram?

I am having trouble with the label locations on my commutative diagram. Here is my code: \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[ampersand replacement = \&...
-2
votes
2answers
71 views

Drawing straight line between the two points [duplicate]

How can I make this graph by latex,
4
votes
1answer
224 views

Pixelized Circle in Tikz

I'm trying to generate something like this in TikZ: Which can be generated for an arbitrary radius here, which uses this code. I know how to do it manually in TikZ but it is a real pain. Since I saw ...
1
vote
1answer
62 views

Drawing figure with perfect spacing

I'm trying to make a figure with a parabolic type curve that is equally spaced and looks uniform between the two axes. I made the following using Mathcha. \begin{figure}[h!] \centering \tikzset{...
3
votes
1answer
51 views

Fill inside a tikz path

I have a tikz path generated by svg2tikz. I would like to fill inside this path, but tikz just fills a portion of the curve. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{...
3
votes
3answers
127 views

Aligning group plot titles horizontally

I'm trying to figure out why my plot titles are not horizontally aligned. I tried several sources but could not find an option to control title alignment. Below image is what I get. As you can see ...
1
vote
0answers
71 views

How to globally modify variable from externalized tikz picture?

Is it possible to update global variables from within externalized tikz picture? I would like for global modifiers(in this case \tl_gput_right:Nn) to outlast the scope of tikz picture. Here is the ...
2
votes
1answer
66 views

Plotting graph with piecewise linear interpolation

I want to plot a graph with piecewise linear interpolation from a CSV data file. Currently, I have only managed to plot a graph like the following one: Here is my Latex code: \documentclass{article} ...
2
votes
3answers
284 views

tikz drawing rectangle discretized with triangle lattices and its centroids

Is there a way to draw the following figure using tikz This post is similar but the for loops are complicated for me to understand. The rectangle domain is 2.0 x 1.0 (width x height) and there are ...
-4
votes
1answer
91 views

How to draw a graph with circles and triangles as shown in the image

Hello, please help me draw this image with latex tikz
0
votes
1answer
75 views

What are common software packages used to draw fancy images in physics papers? [closed]

In physics papers, we often see images aimed to explain a particular theoretical/experimental configuration considered. These images vary among 3D shapes to explain the mathematics (like stereographic ...
2
votes
0answers
48 views

How to remove the extra blank line when using TikZ in algorithm2e?

I want to remove the blank in line 13. However it doesn't work. Can someone help me? Thank you! \documentclass[11pt,titlepage,letterpaper]{article} \usepackage{amsthm} \usepackage{amsmath} \...
2
votes
1answer
52 views

Draw a beam for a mechanical calculation

In my LaTeX document, I need a graphic of a beam to calculate the unknown forces and so on... Now, I create something like this: \documentclass[tikz]{standalone} \begin{document} \begin{...
2
votes
2answers
47 views

Aligning 2 Minipages to the top of a figure and scaling nodes

Below is my MWE and an example how it should look like. I asked a kind of similar question yesterday, see here. Now the problem is, I need both graphs to be vertically the same height, so equally ...
6
votes
2answers
234 views

Adding labels and comments to a matrix

Fellows and folks! I have been fighting to draw what's on the picture for a long time: I cannot draw those 3 arrows that are pointing to the same comment. Plus, the other two arrows that are ...
1
vote
2answers
52 views

Double line is displayed as a rectangle [duplicate]

MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node (x) {X}; \node[above right=1mm and 2mm of x] (y) {Y}; \draw[double,double ...
2
votes
2answers
110 views

Positioning arrow labels at absolute distance from end or start

I am making arrows using \begin{tikzpicture} \tikzset{ operatorNode/.style={ every node/.style={minimum size=1cm,draw,rectangle} }, variableNode/.style={ every node/.style={...
1
vote
1answer
19 views

Error when refactoring Tikz, scope argument gives error when given via a command

When I do \begin{scope}[every node/.style={minimum size=1cm,draw,rectangle}] \node (v1) at (2,0) {$\#1 \cdot \#2$}; \end{scope} it works. But when I do \newcommand{\operatorNode}...
1
vote
2answers
80 views

creating a square 9x9 grid

I am new to latex. Is there a way to create shogi diagram like this picture using tikzpicture? I have tried tabular with square cell and rotating package for rotating kanji and created some very plain ...
2
votes
3answers
196 views

Tikzpicture in figure problem

Below is my MWE. My only problem is, I need the tikzpicture to be pagewidth (textwidth) and not overflow to the right. I tried adjustbox, fbox and resizebox. \documentclass[ a4paper, % ...
5
votes
1answer
103 views

Labeling matrices/rectangles and drawing Sigma inside rectangle

I came across this picture and I would like to know if you could give me a hand with it. I know how to draw the rectangles but, when it comes to the labeling thing, I am a total mess. Not to mention ...
2
votes
1answer
33 views

Misplaced bar in grouped bar charts

The first column, which corresponds to the leftmost bar in each group is shifted heavily to the left. Why? (The tikzpicture has to be in a beamer environment.) \documentclass{beamer} \...
6
votes
3answers
298 views

Tikz draw contour without some edges, and fill

I'd like to draw two wave-shaped contours, as in the figure below, and fill the area between. I tried the following code, but it produces an undesired black vertical edge on the right. How do I remove ...
0
votes
2answers
77 views

How to draw a commutative diagram? [closed]

Please I need the LaTeX code of the following diagram.
4
votes
1answer
40 views

Replace bar charts in a figure with text for each Y variable

I have a figure that was initially a bar chart. I replaced the values with text in the middle. I want the text to be aligned left inside the graph for each Y value. There is also a middle line ...
4
votes
1answer
42 views

Centering subcaptions in a tikz pgfplot subfigure environment?

I am having a difficult time centering subcaptions for a figure. The figure looks like the following: But as you can see, the Panel A and Panel B subcaption are nowhere near being centered with ...
0
votes
1answer
107 views

How to incorporate body posture sketches in LaTeX?

Situation / Problem Lets say, I want to create a document with workout or other sports instructions. There might be video-tutorials but I do not want to use stills nor photographs. Rather, the guide ...
1
vote
1answer
26 views

Style of lines in raw gnuplot and pgfplots

I am drawing a function using raw gnuplot in pgfplots and I am not able to make the lines thicker and to change the colour (for instance grey). My example is the following: \begin{tikzpicture} \...
0
votes
1answer
56 views

How can I draw this spiral (with vertical sides) in tikz?

How can I draw this spiral (with vertical sides) in tikz? The only way I would know how, would be to copy and paste code to draw semicircles of different radius, followed by connecting the ...
2
votes
2answers
43 views

Cannot shift plot in Tikz picture

I have nodes that are placed at specific positions in my Tikz picture, and I would like to put a plot next to it. To do this, I am using a shifted scope. However, when I change the shift values, ...