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

How to draw a complicated smooth curve

I want to make each of the bending very smooth. Only criterion to draw the curve is that it starts from (1,2.5) and ends at (1,2.75). No equation of the curve given. I failed to do that. Please help. \...
1
vote
1answer
63 views

TIKZ. Move the arrow

I have very simple tikzpicture table-scheme and I need to move arrow to the right.. Now it is looks like this: But I want to make it like this: My code: ... \\ \\ & \...
2
votes
0answers
52 views

PGFPlots intersection segments wrong curve and endpoint

When trying to answer How to delete a part of a curve in Tikz? , I ran into problems with intersection segments from PGFPlots fillbetween. I tried to change the curve from to[out=280,in=175] to ...
1
vote
1answer
67 views

Drawing an adjustable rectangle in Tikz

I have this code that I have obtained sometime ago from this site (sorry I don't know the exact source). It allows me to create a multiple choice answer sheet. I have modified it to some extent and ...
1
vote
1answer
50 views

TikZ bug (feature?): child node strangely leaning to the right

I try to put a tree next to a tree. Then I find the second tree is leaning strangely. Even if I change the node to a matrix node, the problem is still there. \documentclass[tikz]{standalone} \...
1
vote
1answer
59 views

Creating rack and pignon arrangement

I'm trying to create a rack and pignon arrangement in tikz. I found a code allowing to draw a pignon. I'm trying to add a rack in order to have the arrangement. I wrote this code \documentclass[...
7
votes
2answers
238 views

Projectile motion: change an old code and make it more beautiful

Given this image, where a golf player throws a ball with a angle of 54.0° above horizontal and a speed v₀=13.5 m/s. Looking this excellent old answer Sketching a graph mapping projectile motion using ...
1
vote
1answer
66 views

How can I replace the ifthen package in this TikZ/PGF command?

I would like to modify a command so that it doesn't need the ifthen package not necessarily because of this, Why is the ifthen package obsolete?, but just to used the funcationality in Tikz/PGF. The ...
0
votes
2answers
45 views

Can tikz plot a recurrence relation using `foreach` and no global definitions?

I would like to know you to plot a recurrence relation using foreach, which requires updating a variable inside the loop. To make this concrete without copying over a bunch of code, please consider ...
1
vote
1answer
74 views

Plotting a curve using “plot function” Vs Bezier curve (Method of tangents)

Regarding the shown MWE, I need to plot a parabola with the following properties: Parabola starts at point "A" Parabola ends at point "B" Peak of the parabola is at point "F&...
0
votes
1answer
44 views

Not enough plotting, graph is cut and asymptotes are not displayed

So, I just practicing some of suggested tikz code that I should use based on my previous questions. However, I have another problem where this code does not yield a perfect graph (I mean a full fit ...
1
vote
1answer
42 views

Put arrows in tree drawn with tikzpicture

I am starting to use LaTeX for a graph theory course I am following at uni. I managed to build this tree, I am only missing the arrows (that should be pointing downwards in all of the edges). \begin{...
2
votes
1answer
106 views

How to delete a part of a curve in Tikz?

I would like to do this: I am actually begin with this code: \begin{figure} \begin{tikzpicture}[scale=1.2] % Axis \draw [->] (0,0) node [below] {0} -- (0,0) -- (5.5,0) node [below] {Good 1}; \draw ...
1
vote
1answer
69 views

TikZ: Robust and automated creation of signal-flow graph (phase-variable form)

Adopting this answer, the following signal-flow diagram has been created by representing the following set of state equations: I would like to: 1- know how my code can be optimized and generalized to ...
1
vote
2answers
65 views

Remove vertical space above tikzpicture

I am trying to place two tikzpictures beside each other but I'm getting a vertical space above the left one! Any idea how to remove the space? \begin{tikzpicture} \draw [solid] (0,0) -- (0,6); \draw [...
0
votes
0answers
48 views

Plain Tex and Tikz: pgfsys-dvi.def does not support color

Here it is my little example \magnification 1200 \def\pagetop{792} \def\pgfsysdriver{pgfsys-dvipdfm.def} \input tikz.tex \usepgflibrary{arrows} \tikzpicture \draw[color=red,line width=2pt] plot (...
1
vote
2answers
44 views

Creating nodes for a binary tree

I would like to create a binary for visualization of common C binary tree functions. I have used split rectangles but to no success. Currently I have the following MWE: \documentclass[12pt]{article} \...
4
votes
4answers
169 views

Orthogonal projections on ellipsoids in TikZ

In TikZ, I want to draw the orthogonal projection from a point to a (rotated and shifted) ellipse. As a particular example, I would want to draw the shortest line from the point in the picture to the ...
4
votes
1answer
62 views

How to detect if expansion takes place while evaluating a \pgfmathparse-expression/if inside a \pgfmathparse-expression?

I intend to write a macro which behaves differently depending on whether used within a \pgfmathparse-expression or used outside a \pgfmathparse-expression. For example a commend \MyNicePi which ...
0
votes
0answers
35 views

PGFGantt Bar Label Loction and Improvement

How can I Make the bar label above, to the right or left of the bar. I tried but it does not seem to work. Also if you can make it look better. My code and : \documentclass{standalone} \usepackage{...
0
votes
0answers
24 views

Annotating / Labeling an Image with tikz-imagelabels and adding a custom style

I want to use the TikZ package tikz-imagelabels in conjunction with these types of labels I found used in a pie-chart demo but I have absolutely no idea where to start. Im not so good with TikZ to ...
2
votes
2answers
75 views

Making a simple legend on tikz

I'm writing a document that requires very few actual plots and I'm happy with the aesthetic of tikz. However, I'm having trouble finding a way to make a simple legend on tikz. I know there's a way ...
0
votes
0answers
28 views

TikZ: positioning library with multiplier

I'm using the positioning library in TikZ to places nodes. Is it possible to have some kind of multiplier applied to a placement, for example, something like (above=of C)*2? Minimum example with an ...
1
vote
1answer
52 views

Drawn line not landing up in endpoint

I am doing a construction including connecting two points by a line. Somehow the first line from K to E is OK but the one from K to M is not. How to solve this? Side question: is there an easier way ...
0
votes
1answer
37 views

setting a normal distribution over a graph's node using tikz

I would like to add a normal distribution inside a circle node using tikz package \node[scale=4,circle, fill=blue!55!cyan!25] (Og1) at (0,0) {}; The area under the plot would be coloured if it is ...
2
votes
1answer
39 views

Draw diagram block step and saturation with TikZ

I would like to create something like this diagram with the TikZ options Here I show you what I know how to do: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \...
0
votes
0answers
53 views

Function-3D curve on Tikz/PGF

So, i am new to Tikz/PGF and i am trying to draw an image showing the change of velocity w.r.t time and distance. The blue line shows that an object has at first a linear speed up to a point (function ...
0
votes
1answer
86 views

Conflict between Tikz and bookmark packages

I updated the packages in my distribution Latex this week and I lost bookmarks in the pdf : Compilation with Pdflatex work well but compilation with latex+dvips+ps2pdf break bookmarks on the pdf file. ...
1
vote
0answers
65 views

Tikz with equation regions

I'd like to plot in tikz the below constraint on the unit cube defined by the region x, y, z in [-1, 1]. x^2 + y^2 + z^2 - 2 * x * y * z <= 1 I found Making a 3D colored pyramid in tikz though it ...
2
votes
0answers
52 views

TikZ : matrix nodes name unknown after update

I just upgraded from fedora version 32 to version 33. Tikz has therefore been updated (from the 3.1.4b to 3.1.5b). Since this change, this figure no longer compiles (I uses Lualatex) : \documentclass{...
1
vote
1answer
35 views

Pgfplots, put decorative arrow center at the specified position

I would like to draw an arrow at the vertical part of a parametric curve. Consider, for example, the following trochoida. \documentclass{scrbook} \usepackage{tikz} \usepackage{pgfplots} \...
0
votes
0answers
59 views

Using tikz to transform a single letter

I want to transform one letter on a title page in a very specific way. To illustrate the effect I'm trying to accomplish, I've attached an image. Notice how the left half of the letter H is shorter ...
0
votes
1answer
31 views

TikZ/Pgf - I can't get “node” to work

I'm having trouble with some work and I would appreciate any help. I would like to add this kind of text into my project: And here's my code, I don't know why node[left]{$P^*=50$} and node[below]{$Q^*...
0
votes
0answers
39 views

How can I add an (coloured) edge to \foreach loop? (LATEX)

I drew a graph that consists of a cycle of length $n$ and two other vertices. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{tikz-network} \usetikzlibrary{arrows....
0
votes
0answers
18 views

adding tikzpictures side by side and adding shapes to terminal nodes instead of text

I have this scatter plot: I want to add next to it a directed graph / small decision tree, similar to the below example. I can also create one of the decision trees. I would like to add them side-...
12
votes
2answers
447 views

how to highlight (with glow) any path using Tikz?

I need to be able to do this kind of highlighting (or glow) on different figures like vectors, lines, circles, arcs, but I have no idea how to do it, this is a code example \documentclass[,varwidth,...
2
votes
2answers
97 views

importing an external image on top of a node using tikz

How can I generate this nodes and edge structure using tikz in latex? I created the following figure using tikz, now I'd like to put some figures on the top of each node (e.g. a heart with heart-...
0
votes
0answers
32 views

Positioning of full tikzpicture relative to coordinate

Is there a way to anchor a full tikzpicture at a specific coordinate with north, east, center, ... arguments? I configured a grid showing background coordinates when being activated in the frame by g ...
1
vote
1answer
44 views

Undefined control sequence when inserting tikzpicture in beamer

I'm new to both beamer and tikz, after looking at many examples I was able to create the tikz picture that I want in a regular latex article. I wanted to reuse the same image in beamer but when I do ...
1
vote
0answers
36 views

How to correctly position a graphics included in an anchored TikZ node?

In this MWE, \myfig seems to be shifted horizontally by some half \pgflinewidth: \documentclass{article} \usepackage{tikz} \def\myfig{\includegraphics[height=1cm, width=\linewidth]{example-image-a4-...
2
votes
2answers
94 views

Drawing an old punched card using tikz

I am trying to draw a punch card using tikz. The card is a 8 x 80 matrix. A card "stores" a sentence (e.g. a line from a program's source code) printed in the card header via an encoding ...
0
votes
1answer
55 views

How to denote the lengths of the lines in a triangle

The codes below draw a triangle and denote the lengths of two lines OA and OB. In the present codes the lengths are denoted as l_min and l_max. How can I add curves to indicate l_min and l_max are ...
0
votes
1answer
55 views

The node is decentering my tikzpicture. Help please

I am adding a node to a tikzpicture but it is decentering the figure on the slide. How can I fix this? Sorry. I did not find a similar Q&A here or elsewhere. My example code: \documentclass[12pt,...
0
votes
3answers
56 views

Convert Simulink blocks into TikZ model

does someone know how is the TikZ code to create this model with this equations? Note. Regardless of the colour of the lines and arrows in the image, they all have to be black and continuously drawn. ...
1
vote
1answer
49 views

Plane intersecting sphere with tikz and tikz-3d

I'm really surprised that I couldn't find an answer to this question, but here it goes: how can I draw a plane intersecting a sphere using tikz and tikz-3dplots? I managed to do the following, using a ...
1
vote
0answers
35 views

Showing the overlap between a sphere and the volume insdie a solid angle with Tikz

I want to describe how a line-of-sight integration of a 3D density function over a solid angle means using the pgf/Tikz package. The problem is to draw a sphere and then a solid angle that overlaps ...
2
votes
1answer
90 views

Is this horizontal alignment correct?

I am drawing over a figure, and I am surprised that the following does not look centered, visually: \documentclass{article} \usepackage{mwe} \usepackage{tikz} \usepackage{siunitx} \begin{document} \...
2
votes
1answer
154 views

How to recreate the shell method diagram?

I want to recreate the following diagram with Tikz. I tried to use this answer but I'm left in veil.
2
votes
2answers
118 views

Plotting the inverse of non elementary functions on tikz

While working on a physics problem (a certain version of the simple pendulum), I was able to solve the equation of motion to get the following result: I would like to plot theta(t) on tikz (for a ...
3
votes
2answers
198 views

“ominus” as plotmark in pgfplots

I have the following scatter plot: I would like to know how to make some points an oplus - which works, and some other points an ominus - which does not work. In the below tex code I can replace: \...