2022 Developer Survey is open! Take survey.

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

includegraphics in tikz node disappears when compat=1.3 changes to compat=newest

I have a tikzpicture where I draw a plot and add two png files on top of the plot. I add the png files with \node at (400,90) {\includegraphics[width=4cm]{figures/time_series/texas.png}}; When the \...
user avatar
  • 101
0 votes
1 answer
20 views

multiple bar in horizontal bar chart in latex

I am trying to show a performance comparison of the different machine learning models by multiple bars in a horizontal bar chart in latex. I have tried the following code: \begin{figure*}[!tbp] ...
user avatar
0 votes
1 answer
35 views

How to fill a region between lines and a curve in tikz?

I browsed various questions but I cannot find what I need. I started using tikz yesterday, so I am very confused and my code is horrendous. I am drawing a Penrose Diagram. This is where I am at: \...
user avatar
  • 3
0 votes
1 answer
25 views

Add label function to graph

I'm trying to add the label $y=x^3$ to the graph of the function using node but instead of placing it "above right" it appears "below left" for a reason I don't understand \...
user avatar
2 votes
1 answer
58 views

How to draw a path alternating in background and foreground?

I would like to draw a spring which "wraps" arround a bar, meaning every alternating line should be drawn on the background. Is is possible to define a tikzstyle for this? \documentclass[...
user avatar
  • 1,629
5 votes
1 answer
115 views

Small position discrepancy in tikz

I was drawing a small diagram with tikz, and I noticed there is a small discrepancy on the position of the nodes according to how you define their position. Here's the MWE: \documentclass{article} \...
user avatar
  • 480
3 votes
3 answers
117 views

Make tikz matrix of nodes uniform

I want to create a diagram with a couple tables and arrows/braces to describe what changes between the table as different functions are applied to it. However, when creating a table with matrix of ...
user avatar
  • 163
0 votes
0 answers
32 views

After compiling the tikz figure shows overlapping

I am having trouble with the following tikz figure. Any help will be appreciated. Compiling the code below, the following erroneous figure comes: \pdfminorversion=4 \NeedsTeXFormat{LaTeX2e}[1994/12/...
user avatar
  • 101
0 votes
2 answers
72 views

How to draw a circle in 3D such that the plane containing the circle is orthogonal to a given vector?

How do I draw a circle in 3D space such that the plane containing the circle is orthogonal to a given vector?
user avatar
  • 311
4 votes
2 answers
384 views

Most common command to compile a LaTeX document?

I am not sure if the question makes sense; this is my attempt. I am writing a program that generates a String that is valid LaTeX and compiles it. It will generate a PDF for my users. In my computer I ...
user avatar
2 votes
1 answer
47 views

A finite number of arrows in an ODE solution

I was trying to edit this answer a bit, I wanted to put 5 or 6 arrows on the red and blue lines, I couldn't do it. The only thing I managed to do is this: (a lot of arrows come out and it's not what I ...
user avatar
  • 377
2 votes
1 answer
43 views

How to place braces below a tree in tikz using relative coordinates (as opposed to hard-coded lengths)?

I'd like to place curly braces below the branches of a tree. The example below does exactly that, but hard-coded values for the placement of the labels "Toss 1" and "Toss 2" are ...
user avatar
0 votes
0 answers
18 views

Subfiles with twocolumn book does not display two columns

I want to have tikz-figures in a two-column document with a subfile structure but I am running in circles. When I throw in multicols I have two columns but no tikz-figures and when I throw out ...
user avatar
0 votes
1 answer
40 views

TikZ: Why is a scalebox-ed picture not exactly centered even with the centering option?

My figure is somehow centered, but not exactly centered. Why? A more general question would be: If I have a TikZ picture with already-computed coordinates, that I can't easily re-compute, how can I ...
user avatar
2 votes
1 answer
41 views

3D Matrix as Mark To market Cube for finance in TikzPicture

this isn't my first language), I am just starting out with the tikzpicture environment. Can anyone show me a better method to implement this I would also like to have the smaller arrow pointer and ...
user avatar
2 votes
1 answer
44 views

Nonlinear transformation applied on decorations along path with a custom pic

I am having a problem to apply a single nonlinear transformation to a path decorated with custom pics. A minimal example follows: \documentclass[margin=5pt]{standalone} \usepackage{tikz} \...
user avatar
3 votes
3 answers
135 views

Marking angles in a 3D trigonometric diagram

I am trying to draw the diagram below using TikZ. My attempt thus far is as follows. My attempt seems convoluted as it is a mix of 2D and 3D coordinates. I am trying to label and mark the angles of ...
user avatar
0 votes
1 answer
41 views

tikz visualization of matrix vector multiplication

I would like to visualization the multiplication between a matrix and vector with color cells as follows, how can I do it? Thanks.
user avatar
1 vote
1 answer
22 views

Node in three dimensions with pgfplots

I am using pgfplots to draw a curve in three dimensions. I've placed a point on this curve, and would now like to obtain the following two: The node's name should appear below the node; I would like ...
user avatar
  • 159
-1 votes
1 answer
63 views

How can I draw Circular sector with three empty fraction?

How can I draw Circular sector with three empty fraction and box between of them as following image? The following code is not run and not equivalent. Also, can I use TikZ one time instead of three ...
user avatar
2 votes
2 answers
154 views

How can I draw a box around a picture plus text?

Right now I am struggling with getting a box around some text with a figure. The idea is that I have a small picture on the lefthand-side with some text right next to it. And then draw a box around ...
user avatar
2 votes
1 answer
40 views

Positioning and Aligning Nodes in TikZ

I am trying to make a business card and have made the following so far (based on this): % !TEX TS-program = xelatex \documentclass[10pt,oneside,final]{article} % set all margins to 0 and set business ...
user avatar
  • 185
2 votes
3 answers
196 views

How can I draw rectangle with empty fraction?

How can I draw two separate rectangle with same size, different partition and equality to empty boxes fraction? The following code form GeoGebram (namely, Equivalent Fractions Rectangular Models). A ...
user avatar
8 votes
1 answer
148 views

How to draw a point at a given arclength along a curve in Tikz?

Consider following example: \documentclass{report} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) arc (0:90:1 and 2); \filldraw (0,0) circle (2pt); \filldraw[red] (-.1,.9) circle (...
user avatar
  • 2,860
3 votes
1 answer
55 views

TikZ calculation accuracy problem

Why does the pgf TikZ calculation accuracy fail? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\Radio{10} \pgfmathsetmacro\cRadio{pow(...
user avatar
0 votes
2 answers
79 views

TikZ - Node with multiple text fields

How can I make a repeatable node (node is probably not the right word here) that looks like this: The Field values are individual input texts. I've thought about using \newcommand to make the outer ...
user avatar
0 votes
0 answers
68 views

Help for drawing graphs in LaTeX

How do I graph something like that in LaTeX? This is the code I've got so far. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{...
user avatar
1 vote
2 answers
70 views

Writing mathematical expressions with chemical formulae

How can I write phrases like the ones shown below? Edit: I tried using the chemfig package but I got this:
user avatar
3 votes
0 answers
49 views

Creating a cone in TikZ

If I compile this file: \documentclass[12pt]{article} \usepackage[math]{kurier} \usepackage{pgfplots} \pgfplotsset{width=15cm,compat=1.18} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \...
user avatar
3 votes
4 answers
338 views

Subgroup diagram of $S_3$

I am trying to make the subgroup diagram of the symmetric group $S_3$. Analyzing some materials, I arrived at something close, but it is still far from desired. Below I present the commands that I am ...
user avatar
  • 225
0 votes
0 answers
35 views

pgf plot stacked bar graph random colors

I created this graph, but the colors are repeating since there are a lot of them. Is there a way to randomly generate colors for the bars? Here's the overleaf doc: https://www.overleaf.com/read/...
user avatar
0 votes
1 answer
34 views

Unspected behaviour using Shape geometric library inside axis environment

I want to draw this inverted triangle. For this, I used the library shades. \documentclass{standalone} \standaloneconfig{border=5mm 5mm 5mm 5mm} % Left bottom right top \usepackage{units} \...
user avatar
0 votes
1 answer
32 views

foreach command no working

I want to replicate this figure using tikz. Right now I am stuck with the lower part of the figure, the ground. I tried using foreach \x command, but for some reason I do not understand, it is no ...
user avatar
1 vote
1 answer
26 views

Error in matlab2tikz

I am attempting to plot two graphs together in one plot using matlab2tikz and I am facing a basic syntax issue that I have been trying hours to search for. The error is as follow: Extra }, or ...
user avatar
  • 210
0 votes
2 answers
31 views

Tikz: line ending between two rectangles

I would like to connect the east point of the diamond with the midpoint between two rectangles (Phase 2, Phase 3) using the tikz library; see the picture, please. Here is the sample code: \...
user avatar
  • 219
0 votes
2 answers
44 views

Tikz graphying with coordinates and straightedge and compass construction at the same time?

I want to show that there are 6 points on a given ellipse such that any of which with the 2 foci form a isosceles triangle. My code is as following: \begin{tikzpicture}[>=latex,scale=.9] \...
user avatar
3 votes
0 answers
61 views
+50

Classification of index in Phase Portaits

I am trying to make the following graphs horizontally, I used the following answer as a basis: input: \documentclass[border=1mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings,...
user avatar
  • 377
1 vote
1 answer
41 views

Can I "take a break" from a multicolumn environment for a TikZ figure?

A similar question has been asked before: How can I escape a multicolumn environment, but the answers are not sufficient. I would like to insert a tikzpicture in the middle of a multicols environment, ...
user avatar
1 vote
2 answers
59 views

Draw line that goes under node TikZ

I have a directed graph in which I want to draw vertical lines like the three red ones added here by hand: Each section represents a time period. The annotations e1 and v1 name the adjacent nodes. ...
user avatar
0 votes
1 answer
67 views

Drawing an advanced cube with tikz-3dplot

I want to draw a cube with x,y,z coords. I use the TikZ package for that purpose. However, my wished figure (see below) cannot be accomplished by this package alone (I read the tikz-3dplot manual). I ...
user avatar
  • 69
1 vote
1 answer
31 views

How can I align tikz nodes ragged left?

I'm producing a CV from a template which uses tikz nodes for a general skills section. This is what the section looks like: I would like the nodes to be left-aligned in relation to one another, ...
user avatar
  • 133
5 votes
2 answers
473 views

How to draw a commutative diagram like this one?

I need a diagram like this one: This is what I've got so far: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{tikzpicture}[node ...
user avatar
0 votes
2 answers
36 views

Pgf-pie in subfigure

I have the following code that draw four pie-chart using subfigure: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{subfigure} \usepackage{pgfplots} \usepackage{pgf-pie} \usepackage{...
user avatar
1 vote
1 answer
51 views

Making a node elliptical in TikZ

MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture} \tikzset{elips/.style={ellipse,draw},} \tikzset{yuvar/.style={circle,draw},} % yuvar ...
user avatar
2 votes
2 answers
82 views

How do I add horizontal, vertical, diagonal and curved edges in this Tikz diagram?

How do I draw this picture using Tikz? A MWE: \documentclass[12pt, a4paper]{report} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, quotes} \begin{document} ...
user avatar
  • 523
1 vote
1 answer
39 views

Procedural matrices in tikz

Is there a way to typeset a tikz matrix procedurally instead of manually? i.e. here's a MWE of a 4x4 identity matrix: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{...
user avatar
  • 147
0 votes
1 answer
30 views

Accessing element in coordinate

I have a list of coordinates defined in a loop. For every coordinate, I would like to draw two circles just off the coordinate. So if my chosen coordinate were A = (x0,y0), it would look like this: \...
user avatar
1 vote
0 answers
56 views

How to create an array of colors? [closed]

I am trying to pass an array of colors (of any length) into a macro command to then be used when filling the background of tikz shapes. I've been successful, however, I ran into an issue with the none ...
user avatar
0 votes
3 answers
95 views

Drawing a diagram in tikz

I am struggling to draw a TikZ picture. Here is what I want to draw (neglect the arrow that is crossed out). So far my graphics look like this: And this is the code I have, so essentially I am ...
user avatar
2 votes
2 answers
36 views

Changing only one property of font globally for all tikz pictures but keeping other locally set properties of font

I am writing a thesis with many plots. I would like to be able to change one property for all plots globally. In my example I try to change the size of the font of the ylabels of all plots, but I ...
user avatar

1
2 3 4 5
623